Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signal Desktop does not receive all the messages #1297

Closed
1 task done
ejpcmac opened this issue Jul 6, 2017 · 14 comments
Closed
1 task done

Signal Desktop does not receive all the messages #1297

ejpcmac opened this issue Jul 6, 2017 · 14 comments

Comments

@ejpcmac
Copy link

ejpcmac commented Jul 6, 2017

  • I have searched open and closed issues for duplicates

Bug description

For a few days now, when Signal Desktop is closed for more than a few minutes and I receive or send messages on my phone, these messages are not sync’ed when I open Signal Desktop. It works well when Signal Desktop is open or if I just closed it and re-open it.

I tried to send me a message from signal-cli to see if I get the receipes: when I reproduce the bug I can see the receipes from my phone, but not those from Signal Desktop. It seems the messages are wether not delivered at all, wether ignored by Signal Desktop.

Steps to reproduce

  • Close Signal Desktop for more than a few minutes (the bug occured this evening after 20 minutes, today after exchanging messages on my phone at work and when opening Signal Desktop after the day)
  • Exchange messages via Signal on the paired phone

Actual result: Messages exchanged since Signal Desktop has been closed are not sync’ed
Expected result: Messages should be sync’ed

Platform info

Operating System: OS X Yosemite 10.10.5
Browser: Chrome 59.0.3071.115
Signal version: 0.41.3

Link to debug log

https://gist.github.com/ejpcmac/451fa889df05b82334b24d6156dfe5c4

@scottnonnenberg
Copy link
Contributor

What version of the iOS or Android app are you using? Can you provide the logs from that app as well?

And, to be clear, you're talking about sending messages to yourself and not to another user, right?

Can you tell me any more about that transition from successful sync behavior to missing messages? I'm seeing errors in your log like this "Duplicate PreKeyMessage for session" "Too many message keys for chain" which make me think that you may need to send a message from your desktop app to yourself to get this to go away. What happens when you do that?

@ejpcmac
Copy link
Author

ejpcmac commented Jul 6, 2017

I’m using Signal for iOS 2.13.1.0. The logs were disabled so I can’t provide them unfortunately. But on this side it seems to work well.

No, I’m talking about sending messages to others.

To illustrate the flow:

  • This morning after waking up I deactivated airplane mode on my iPhone. I had one message on Signal and I read it.
  • A few minutes after that, I started Signal Desktop, the message was there. I replied to it via Signal Desktop (it was sucessfully sync’ed with my iPhone)
  • I closed Signal Desktop and went to work without my personal computer.
  • At work, I exchanged a few messages with my brother via Signal for iOS.
  • Back to home, I opened Signal Desktop, and none of the messages exchanged during the day were there.
  • Now, with Signal Desktop is open and I send a message to my brother from Signal iOS, I see it in Signal Desktop. Same if a close Signal Desktop for a few seconds / minutes. But not if I reproduce this tomorrow, as I did yesterday.

@sarahbrand
Copy link

I'm having a similar issue with Signal Desktop. When I open it after Chrome has been closed for a while, the messages from my phone don't sync properly. When I opened Signal Desktop just now, the most recent message shown was from 17 hours ago, but I've sent and received multiple Signal messages from my phone since then.

Operating System: Windows 7 Home Premium
Browser: Chrome 59.0.3071.115 (64-bit)
Signal version: 0.41.3 (Desktop), 4.7.4 (Android)

signal_log_07072017.txt

@ejpcmac
Copy link
Author

ejpcmac commented Jul 10, 2017

@scottnonnenberg Signal for iOS v2.13.1.0 seemed to have a problem: it used nearly 90% of my battery power in background.

After upgrading Signal for iOS, I cannot reproduce this issue anymore.

@michaelkirk
Copy link
Contributor

michaelkirk commented Jul 10, 2017

@scottnonnenberg Signal for iOS v2.13.1.0 seemed to have a problem: it used nearly 90% of my battery power in background.

@ejpcmac Sorry for the tangent, since this thread was originally about missing messages...

We did make some substantial power improvements in Signal-iOS 2.13.1, but it sounds like you already had 2.13.1 installed when you saw crazy battery drain. We haven't (knowingly) made any big changes around that since 2.13.1. It sounds like you didn't have debug logging enabled when this happened, but now that you do, could you submit a log (over at https://github.com/WhisperSystems/Signal-iOS/issues/new) if you see this battery drain again?

@ejpcmac
Copy link
Author

ejpcmac commented Jul 10, 2017

It sounds like you didn't have debug logging enabled when this happened, but now that you do, could you submit a log (over at https://github.com/WhisperSystems/Signal-iOS/issues/new) if you see this battery drain again?

@michaelkirk Yes, for sure. I’m now running Signal-iOS 2.13.4 with no issues, but I’ll keep the log enabled. I don’t know if both issues —missing messages and background hard-work— could have been related in some way, but both appeared and disappeard simultaneously.

@scottnonnenberg
Copy link
Contributor

@sarahbrand Looking at the log you provided, your desktop app was idle for a long time, repeatedly getting 'queue is empty' responses from the server. The next time this happens, can you be sure to send a couple messages right before sending the logs? I'd like to know if the app is not getting the messages at all, or if it getting them but not doing the right thing with them. Sending a message to the contact would be good as well, just to make sure that's happening properly.

@ejpcmac In the log you provided, I don't see a long period of idle time as you describe, so that's interesting. It's something different - a lot of these messages: "Message key not found. The counter was repeated or the key was not filled." This tells me that something has gone wrong between the sender and the receiver - they've somehow gone out of sync. When this happens next, please send a log as soon as possible thereafter, so we can try to understand how we get into the state in the first place. Sending a message to the problematic contact from the desktop will help as well, and of course logs from the other person would always be good.

Thanks!

@riyapenn
Copy link

Are different logs needed? Here are some new ones with steps of sending from desktop, then sending from iOS. This has "Message key not found ..." errors

iOS: https://gist.github.com/1f3958ecf3240814dee3863c6d33f74c
Desktop: https://gist.github.com/f86e093f350a55a8bca23979ce731805

@ejpcmac
Copy link
Author

ejpcmac commented Jul 14, 2017

@ejpcmac In the log you provided, I don't see a long period of idle time as you describe, so that's interesting.

@scottnonnenberg This is because I copied-pasted the log from the point I re-opened Signal Desktop, when the problem occured.

When this happens next, please send a log as soon as possible thereafter, so we can try to understand how we get into the state in the first place.

I’ll do. But for the moment I can’t reproduce it anymore.

Sending a message to the problematic contact from the desktop will help as well, and of course logs from the other person would always be good.

When I did send a message from the Desktop right after the bug, it worked great. It was not with a particular contact but with all of my contacts.

@sarahbrand
Copy link

When I did send a message from the Desktop right after the bug, it worked great. It was not with a particular contact but with all of my contacts.

This is my experience as well. The queue in Signal Desktop shouldn't be "empty" if I'm sending and receiving messages from my phone, right?

@scottnonnenberg
Copy link
Contributor

@sarahbrand Correct. When you see this line in the log got request PUT /api/v1/queue/empty it means that the server has given you all the messages it has, and we have responded that we successfully received them.

It may be the case that the new messages are coming in but the application is having problems processing them. If you don't see entries about new messages or errors, then that will a lot harder to track down. This PR adds some additional logging and some additional resiliency features which should help us eliminate missing messages: #1314

@scottnonnenberg
Copy link
Contributor

Signal Desktop 0.42.1, released to the Chrome Web Store today, allows unlimited message keys when communicating with your own devices (PR #1348), which should help at least some of you who have commented on this issue. Please take a look at the newly-released update and re-open this issue if you run into problematic behavior again.

@andrewkhardy
Copy link

Hoping to reopen this. My Signal Desktop client never updates messages that I have sent during the day on my cellphone. here are the clients logs
https://debuglogs.org/b66300b2df3d4d9efd20621789598c1b2b9f1bf464d10a5672748e40bd307270

@scottnonnenberg-signal
Copy link
Contributor

@lessconfused Please enter a new bug, following the full issue template. It really helps to have both the logs and a complete story of the behavior you saw. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

7 participants