signalapp / Signal-Android

A private messenger for Android.
https://signal.org
GNU Affero General Public License v3.0
25.63k stars 6.15k forks source link

Message draft from content shared into Signal reappears after being sent and resuming app window #8947

Open wesinator opened 5 years ago

wesinator commented 5 years ago

Bug description

When content is shared into signal and sent, resuming the Signal window does not reset the message draft or return to the main messages list see also #4729

Steps to reproduce

Actual result: shared text that was already sent is still populated in draft message after resuming the app . Requires clearing out the draft text, closing Signal and reopening to reset the message convo thread.

Also, Signal does not return to the messages list after shared text - #8074

Expected result: Clear the shared content draft after sending, and return to main message list view after sharing.

Screenshots

Device info

Device: Nokia 5 Android version: 9 Signal version: 4.43.8

Link to debug log

https://debuglogs.org/6c595ee8289e9f90321b4a6e4b6e01e3a4d7cccb486d407c4f39697970e5ab1e

wwwizzarrdry commented 5 years ago

I haven't been able to track down the exact steps to reproduce consistently, but I get this behavior quite often. It just occurred again today while sharing a YouTube url.

  1. I was inside the YouTube app.
  2. Tapped the "share" arrow button.
  3. Selected Signal from available apps to share to.
  4. Selected desired recipient from within Signal.
  5. Waited for YouTube video preview thumbnail to generate.
  6. Sent and visually confirmed message delivery.
  7. Tapped square on Android home row and swiped "up" to close the Signal app.
  8. Later opened Signal and the previously sent YouTube video was still populated inside the message box.

Perhaps this is caused by closing the app while still inside a thread and immediately after sending a message. Maybe this quick close doesn't clear the memory properly and Signal keeps the message in a "draft" State rather than properly clearing the message box.

Perhaps if I had backed-out to the main contacts list first, before closing the app, that this would trigger the proper cleanup routine for the message box?

Device : Google Pixel 2 (walleye) Android : 9 (5670241, PQ3A.190801.002) App : Signal 4.45.2 (5182)

reimer-atb commented 4 years ago

I also experience this bug most of the times when I share something to Signal. But not always, and like @wwwizzarrdry could not find a consistent pattern to reproduce this bug.

Usually, it happens if I do the following:

  1. Tap share button in some application (for me mostly Firefox)
  2. Tap Signal
  3. Select existing conversation from Signal conversation list
  4. Tap Send
  5. Tap "back" button - that is Android's back button at the bottom of the screen, not Signal's back button in the top left corner
  6. -> Previous app (Firefox) gets focus again
  7. Open "App switcher" (or however the thing is called which allows you to switch between different running apps)
  8. Select Signal

Result

Signal shows draft message with shared content from above. I have to manually clear the input box.

Sometimes tapping the "back" button in step 5 will not return to Firefox immediately but to Signal's conversation list. I then have to tap the "back" button again to return to Firefox. In those cases, it seems that the draft message does not appear again when returning to Signal in step 8. But I am not 100% certain that this is always the case.

Device: Nokia 8.1
Android: 10
Signal: 4.58.5
wwwizzarrdry commented 4 years ago

It is likely to be related to how Signal + Android OS manage the text associated with the "share" feature in Android.

Maybe signal has its own local storage associated with text copied via the native share function in Android?

Does the clipboard have a timestamp to determine recency of copied text?

As a test, I'm posting to this thread on my Android phone and just long-pressed and selected paste (right here in the text field). It pasted a uri I had previously copied 2 days ago. So we know Android stores your clipboard (likely) indefinitely or until memory wipe on reboot.

However, when I opened Signal just now, the uri was not immediately pre-pasted into the message box. So the issue must certainly be related to the share function and not solely based on just any copied text in the clipboard?

I just tested sharing a website uri to signal.

  1. Opened Brave to a website.
  2. Selected Share from the brave menu.
  3. Chose Signal as the app to share to.
  4. Selected a recipient.
  5. The text was pre-pasted as expected.
  6. I did not send the message.
  7. Returned to Brave (thereby closing the ephemeral instance of signal)
  8. I returned to the home screen and opened Signal, then entered a conversation.
  9. The copied uri text did not pre-populate.

    *. I repeated these steps, but this time I sent the pasted message.

  10. Reopened Signal, entered a conversation, and now, too, the copied text was not still pre-populated in the message box (as is the expected behavior).

Hmm, so did signal fix this bug? I could have sworn that I just experienced the "phantom" paste event very recently, but then again, it's kind of like the Shining around here and I may be losing my mind in quarantine...

reimer-atb commented 4 years ago

@wwwizzarrdry In the case where I did not send the message I would expect that Signal keeps the draft message and I can access the draft message when I open Signal again. And at least for me that seems to work all the time.

reimer-atb commented 4 years ago

Any update? The issue still exists in Signal 4.64.4

reimer-atb commented 4 years ago

The issue still exists in Signal 4.71.5

Any chance of getting this fixed? It is a very annoying "feature".

infinitewaveparticle commented 3 years ago

@fumiakiy Will this be fixed anytime soon? It's been happening for 2 years.

fumiakiy commented 3 years ago

Well this issue could be worked around by merging the pull request. When and if it would be merged (if ever) is not up to me though.

Merging a PR is a strange and complicated decision; it's strange because merging a PR means the product owner accepts the responsibility of maintaining a feature (or a bug) that the code written by a stranger may add to their product. You never know if the original author of the code would keep being responsible for what could happen by adding the code to the product.

All I could do is to write good enough code, a good commit message and a good pull request description, so good that the devs might feel less burdens pulling in lines code a stranger wrote for their product.

infinitewaveparticle commented 3 years ago

Makes sense. Signal seems to be painfully slow at fixing what they've messed up (bugs... Including extremely serious ones) - if they do it at all - and extremely focused on adding new features which only introduces more and more bugs that they'll never fix.... SMH... If this keeps up, then more and more people who actually care about what Signal claims to provide will be leaving the app.

Sent from ProtonMail mobile

-------- Original Message -------- On Jul 25, 2021, 10:43 AM, Fumiaki Yoshimatsu wrote:

Well this issue could be worked around by merging the pull request. When and if it would be merged (if ever) is not up to me though.

Merging a PR is a strange and complicated decision; it's strange because merging a PR means the product owner accepts the responsibility of maintaining a feature (or a bug) that the code written by a stranger may add to their product. You never know if the original author of the code would keep being responsible for what could happen by adding the code to the product.

All I could do is to write good enough code, a good commit message and a good pull request description, so good that the devs might feel less burdens pulling in lines code a stranger wrote for their product.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

stale[bot] commented 2 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

wwwizzarrdry commented 2 years ago

This is still a recurring problem in version 5.28.10

infinitewaveparticle commented 2 years ago

I can also confirm this. Not fixed.

Sent from ProtonMail mobile

-------- Original Message -------- On Jan 26, 2022, 1:36 AM, wwwizzarrdry wrote:

This is still a recurring problem in version 5.28.10

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>

Hanl0n commented 2 years ago

This is still not fixed. Here is a debuglog with two examples: https://debuglogs.org/android/5.32.0/4f2e3632c05656bc203d34ef9e2f1813de5be121aad7ba86be350f6f6e536029

1644422496848 and 1644423850911 have this bug.

1644423894509 does not.

alex-signal commented 2 years ago

Skipping the intent if you re-open from recents sounds ok, but I'm wondering if it'll mess things up with search or other things like that. It's worth discussing so I brought it up with the other team members.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

infinitewaveparticle commented 2 years ago

This is still very much an issue

Sent from ProtonMail mobile

-------- Original Message -------- On Apr 11, 2022, 10:27 AM, stale[bot] wrote:

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>