Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

group messages don't get sent for a while

Open dcherian opened this issue 8 years ago • 40 comments

  • [ ] I have searched open and closed issues for duplicates
  • [ ] I am submitting a bug report for existing functionality that does not work as intended
  • [ ] I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
  • [ ] This isn't a feature request or a discussion topic

Bug description

Group messages aren't getting sent for a while. I hada signal video call in the mean time so it's not necessarily a network issue.

Steps to reproduce

  • send a message and wait

Actual result: message doesn't get sent Expected result: message gets sent immediately

Device info

Device: Nokia 6.1 Android version: 8.1.0 Signal version: 4.29.5

Link to debug log

https://debuglogs.org/3b26aaada0fc34b0f7231aa0586b5d62114334a9f32ffe15e98a000514174653

dcherian avatar Oct 26 '18 04:10 dcherian

My friend on the same group had the same issue yesterday and today. It's frustrated him enough that he has quit

dcherian avatar Oct 26 '18 04:10 dcherian

It looks like you're getting rate-limited:

10-25 20:51:52.803 12339 12524 I Job     : [6838bbbe-f9e7-442e-bd79-7993e6331dfb] PushGroupSendJob :: Retrying after a retryable exception. (Time since submission: 804187 ms, Run attempt: 5)
10-25 20:51:52.803 12339 12524 I Job     : org.whispersystems.signalservice.api.push.exceptions.RateLimitException: Rate limit exceeded: 413
10-25 20:51:52.803 12339 12524 I Job     : 	at org.whispersystems.signalservice.internal.push.PushServiceSocket.makeServiceRequest(PushServiceSocket.java:754)
10-25 20:51:52.803 12339 12524 I Job     : 	at org.whispersystems.signalservice.internal.push.PushServiceSocket.getPreKeys(PushServiceSocket.java:257)
10-25 20:51:52.803 12339 12524 I Job     : 	at org.whispersystems.signalservice.api.SignalServiceMessageSender.getEncryptedMessage(SignalServiceMessageSender.java:774)
10-25 20:51:52.803 12339 12524 I Job     : 	at org.whispersystems.signalservice.api.SignalServiceMessageSender.getEncryptedMessages(SignalServiceMessageSender.java:754)
10-25 20:51:52.803 12339 12524 I Job     : 	at org.whispersystems.signalservice.api.SignalServiceMessageSender.sendMessage(SignalServiceMessageSender.java:654)
10-25 20:51:52.803 12339 12524 I Job     : 	at org.whispersystems.signalservice.api.SignalServiceMessageSender.sendMessage(SignalServiceMessageSender.java:632)
10-25 20:51:52.803 12339 12524 I Job     : 	at org.whispersystems.signalservice.api.SignalServiceMessageSender.sendMessage(SignalServiceMessageSender.java:196)
10-25 20:51:52.803 12339 12524 I Job     : 	at org.thoughtcrime.securesms.jobs.PushGroupSendJob.deliver(PushGroupSendJob.java:211)
10-25 20:51:52.803 12339 12524 I Job     : 	at org.thoughtcrime.securesms.jobs.PushGroupSendJob.onPushSend(PushGroupSendJob.java:107)
10-25 20:51:52.803 12339 12524 I Job     : 	at org.thoughtcrime.securesms.jobs.PushSendJob.onSend(PushSendJob.java:71)
10-25 20:51:52.803 12339 12524 I Job     : 	at org.thoughtcrime.securesms.jobs.SendJob.onRun(SendJob.java:49)
10-25 20:51:52.803 12339 12524 I Job     : 	at org.thoughtcrime.securesms.jobs.MasterSecretJob.onRun(MasterSecretJob.java:18)
10-25 20:51:52.803 12339 12524 I Job     : 	at org.thoughtcrime.securesms.jobmanager.Job.doWork(Job.java:75)
10-25 20:51:52.803 12339 12524 I Job     : 	at androidx.work.Worker$1.run(Worker.java:95)
10-25 20:51:52.803 12339 12524 I Job     : 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
10-25 20:51:52.803 12339 12524 I Job     : 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
10-25 20:51:52.803 12339 12524 I Job     : 	at java.lang.Thread.run(Thread.java:764)

Can I ask how large the group is that you're in?

greyson-signal avatar Oct 26 '18 05:10 greyson-signal

I suspected so. It's 5 numbers including me but 2 of those don't work.

Are messages being worde queued up for delivery to those?

dcherian avatar Oct 26 '18 09:10 dcherian

By "2 of those don't work", what do you mean?

And looking at the logs I can't say if a message is going to a specific person or not. All I know is that there's some GroupSendJobs that aren't going out because the service thinks you've gone over a send limit.

greyson-signal avatar Oct 26 '18 17:10 greyson-signal

It's a group with 5 numbers, 2 of which aren't active.

What is the send limit?

dcherian avatar Oct 26 '18 17:10 dcherian

What is the send limit?

There's various limits we have in place for different server actions to prevent abuse. You shouldn't be able to hit them in normal usage, but here we are :)

2 of which aren't active

Ok, so does that mean that they've uninstalled Signal, but are still in the group? Do you know if they manually unregistered before doing so?

If you long-press a message that you've successfully sent and look at the message details (by pressing the 'i' button in the action bar), what do you see in terms of checkmarks next to people's names? For a message that is stuck sending, do the same thing and tell me what you see there as well.

Thank you!

greyson-signal avatar Oct 26 '18 18:10 greyson-signal

Ok, so does that mean that they've uninstalled Signal, but are still in the group? Do you know if they manually unregistered before doing so?

The numbers are in the group. One was a typo. The second's been uninstalled; not sure if they deregisterd.

If you long-press a message that you've successfully sent and look at the message details (by pressing the 'i' button in the action bar), what do you see in terms of checkmarks next to people's names?

Delivered to everyone but the 2 numbers above.

For a message that is stuck sending, do the same thing and tell me what you see there as well.

When this happened, I only saw a spinner in the main conversation view. The check mark appeared 20 minutes after hitting send.

dcherian avatar Oct 26 '18 19:10 dcherian

Happening right now in a single person conversation

https://debuglogs.org/98d50512d2c480f37b1892d98b22aef88f8f027d5de07bed6f0b2254defb1040

Message hasnt sent for 10 minutes and I have internet access right now. When i hit the info button on the message I see "pending"

dcherian avatar Oct 27 '18 01:10 dcherian

Still hasnt sent after 45 minutes. I tried sending another one and it's pending too. I'm receiving messages from the other person.

https://debuglogs.org/c07c5c227690ddd187b2ba38bc513a1208509712b3a1662ad89f63e89b9cddac

Update: messages were finally sent https://debuglogs.org/5f1a22f460a61829e129aceef4fdba93e20bd4a221f41963f3a55bca853e84cd

dcherian avatar Oct 27 '18 02:10 dcherian

This is affecting me too. Very annoying in groups with dead numbers :(

kyleedwardsny avatar Oct 27 '18 04:10 kyleedwardsny

This is affecting me too. Very annoying in groups with dead numbers :(

Yeah true and same here

brownstic avatar Nov 01 '18 12:11 brownstic

Again trouble in a single person conversation. This is becoming unusable

https://debuglogs.org/8d0300b8fa2fef9eefdc21c3ef5db25d627527116fc48050c801ab82964b791d

I hit send at approximately 14.19. hasn't sent in twenty minutes now

dcherian avatar Nov 04 '18 22:11 dcherian

Our group chats are also having the same issue, multiple of my friends are reporting it...and since I'm the one who convinced everyone to switch to signal, here I am.

Some of the messages never get sent. Most of them come out of order, and it's across multiple group chats.

Debug: https://debuglogs.org/3303cfaa3e5eb617f16330ed744808cefd188ba98e58c1e8078469bb0a756d37

AtHeartEngineer avatar Nov 06 '18 02:11 AtHeartEngineer

I can confirm the issues with @AtHeartEngineer above. I can also confirm that for @greyson-signal that my issues aren't just rate limits but messages just not sending. On mobile I hit the rate limit regularly with one number, so I'm used to the rate limit issue. But in the last week messages get stuck with the spinning circle. If I open the desktop app 30 minutes later the messages that I've sent aren't there, and I can confirm via regular text that no one has seen them.

It also seems to be causing multiple messages to come out of order. Suddenly I'll receive a message that's 'New' but saying it was delivered up to ~20-30 minutes later. After confirming with the sender, I can confirm that he did send it 30 minutes ago and I'm only just now receiving it out or order in my messages.

Oddly if I restart my phone, a few of my 'Stuck Circle' messages will go through, but not all. Force closing the app doesn't seem to work. I'd say this started just a few days ago.

Edit: I can also now confirm that the problem exists on both Android and Apple. No problem with the desktop client as of yet.

Someguitarist avatar Nov 06 '18 02:11 Someguitarist

Restarting did not help in both my cases.

dcherian avatar Nov 06 '18 03:11 dcherian

I have the same issue in a group chat with few members, one of which is not active. Restarting also didn't help.

WoodenGhost avatar Nov 09 '18 16:11 WoodenGhost

@AtHeartEngineer It looks like you're also bumping into the rate limit issue. It looks like we're somehow mishandling situations when you start group chats with new people, or when you have people in a group chat that have unregistered.

@Someguitarist How are you confirming that this isn't a rate limit issue? Can you provide a debug log?

@dcherian Your situation is different. Originally you had a rate limiting issue, but in your one-on-one conversations, what's basically happening is that we're telling the system to schedule a job to send your message, and the system is choosing to delay that send for a long time. Given that you have network and your app is foregrounded at the time, it shouldn't be delaying it, but every phone can potentially have a different implementation of JobScheduler, so here we are. I'll have to think of a way to work around it.

@WoodenGhost Please provide a debug log.

greyson-signal avatar Nov 09 '18 17:11 greyson-signal

@greyson-signal Thank you for the quick response and your work in general! Here is the debug log.

WoodenGhost avatar Nov 09 '18 20:11 WoodenGhost

@WoodenGhost Thanks for the log! However, I don't see anything in this log to indicate a longer-than-normal send time? There was one case where a send took ~4s (not unreasonable in poor network or if there was an attachement), but the majority took < 100ms.

The log only covers ~2.5 hrs. Did the long send happen before then? If so, can you send a debug log the next time you see it happen? Thanks!

greyson-signal avatar Nov 10 '18 00:11 greyson-signal

Reporting in behalf of a friend:

  • Messages in one group have not been sent since 3-4 days (and other members confirm they haven't received anything from that user since 3-4 days in that group).
  • Sent messages have the spinning status indicator.
  • Receiving messages works
  • There are 12 members in the group (plus around 5 slave devices)
  • 1 member (+**********07) is not a Signal user anymore and has unregistered at some point but still lives on as a zombie user in the group.
  • Same device with @dcherian but Android 9 and Signal 4.29.7

Debug logs:

  1. https://debuglogs.org/766c48c8bef03892f247e7a0a2734ff397c342c0d067ac93fd4256b7a37f46e4
  2. I couldn't find anything in the first log so I asked my friend to try sending a new message to the group and capture another log (I believe he tried to remove the thread in the mean time and we tried to update the group too): https://debuglogs.org/04547856287a0edb1d00e1f3091536d8ca6015ebeca69b9c04c3f3a0181e437e
  3. I didn't see any rate limit errors in the new log so I asked one more https://debuglogs.org/9cd1da91b430cfac9f1ad8e1c834b9415c18c156b26960003ea2693ec1d7d96d

No rate limit errors in the last log either but sending messages still doesn't work in this group.

I have no clue what's causing this.

2-4601 avatar Nov 10 '18 19:11 2-4601