twofas / 2fas-ios

Source code for 2FAS iOS app
GNU General Public License v3.0
525 stars 39 forks source link

Notifications from the extension only work reliably when the app isn't open #81

Open cotman opened 7 months ago

cotman commented 7 months ago

Not sure if you'd consider this an app or an extension issue...

I'm using app version 5.2.6 and extension version 1.6.2 (running in Chrome Version 121.0.6167.184).

When I launch the (paired) extension to contact my phone for a code, the notification is nearly always received and displayed if the app isn't running or in the foreground. However, if the app is already "up" on my phone and displayed, I seldom get a notification from the extension - the "Notification" section in the app is also empty when this happens. If I close the app and re-click from the extension. then I get the notification and everything works as it should...

ghymacx commented 7 months ago

Same here. No push notifications safari extension and iOS 17.4 latest beta.

cotman commented 7 months ago

This is oddly variable for me, although not in a good way ;) . I'd say that around 95% of the time I don't receive notifications from the app, via the extension, if the app is already open on my phone. However, around 5% of the time I do.

Should have mentioned I'm running iOS 17.3.1.

cotman commented 6 months ago

Just upgraded to iOS 17.4 - behaviour seems to be the same.

I've tried to get into the habit of closing the app after approving each notification from the extension, it then mostly works for the next notification approval (although not always). If I forget though, and leave the app open, it's still around 95% of the time that I don't get a notification that I can approve in the app.

yiveynod commented 6 months ago

I second this issue. I haven’t done any closer investigation on it, but for me I almost never receive a push if the app is already open. The safest way for me to know that I’ll receive the push is to lock my screen. iOS 17.4

adocyn commented 6 months ago

Hi, we're investigating it.

enchained commented 6 months ago

I'm using the app (v5.3.5) on iOS 16.6.1, extension 1.6.4 on Edge 122.0.2365.92, and I've had a similar issue. I've enabled the browser extension for the first time, and there were no notifications while the app was open or in the background. Then I force-closed it and clicked the extension once more. Still nothing happened. Then I opened the app manually and I think it automatically offered me to select a service, twice in a row.

Then I logged out of service and tried for it again, it worked both with closed and running in background. When in foreground, it did open the prompt, but there was no push sound or notification left. I tried the same with a new service, still was not able to clearly reproduce the first issue.

adocyn commented 6 months ago

Hi, we've run a battery of tests and we couldn't find anything wrong. To summarise the behaviour is as follows:

We monitoring the BE and we'll continue to do so, but for now we can't detect anything wrong with it. If this will persist I will ask you to join our discord and I will send you in private a request for apps logs. From that we can learn more.

cotman commented 6 months ago

So, I've installed the latest version of the app, 5.3.5, and I'm now using extension 1.6.4 with Chrome 123.0.6312.86 (on Linux) and now iOS 17.4.1.

Here's what repeats the behaviour for me nearly every time (with an interesting twist, that I've just discovered, at the end :smile: ):

  1. My phone is locked, and 2FAS isn't running
  2. I trigger the extension in Chrome
  3. I receive a notification on my lock screen which I tap
  4. My phone unlocks, 2FAS starts and provides me with the "Approve" dialogue - I accept it, the code is filled in Chrome, all is good :heavy_check_mark:
  5. I don't interact with my phone again, and it locks itself
  6. I trigger the extension in Chrome
  7. I receive a notification on my lock screen which I tap
  8. 2FAS opens but doesn't give me an "Approve" dialogue :negative_squared_cross_mark:
  9. I wait a bit - nothing happens
  10. In 2FAS I tap on "Settings", then back to "Tokens", then the "Approve" dialogue appears...
cotman commented 6 months ago

Just as a follow up on my last comment: I've been using step 10 as a workaround for the last two weeks - it works 99% of the time.

The issue, at least, for me, is that the "Approve" dialogue needs to be coaxed into making an appearance in the app, and tapping between "Settings" and "Tokens" seems to do that.

adocyn commented 6 months ago

@cotman yes, it triggers fetching list of awaiting authorisations from server. I'll check the steps you've provided. Thanks!

mbking1 commented 4 months ago

I'm seeing the same behavior as @cotman and I use the same solution: click on Settings and then Tokens. This causes the approval dialogue to appear.

adocyn commented 1 month ago

Is this still an issue with newest release?

mbking1 commented 1 month ago

Yes, this issue has been fixed. Thank you.

Mark

On Aug 19, 2024, at 3:58 AM, Zbigniew Cisiński @.***> wrote:

Is this still an issue with newest release?

— Reply to this email directly, view it on GitHub https://github.com/twofas/2fas-ios/issues/81#issuecomment-2296039835, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATQZVVYZR5TYDROIPMMYJDDZSGXTNAVCNFSM6AAAAABDQZEPBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJWGAZTSOBTGU. You are receiving this because you commented.

cotman commented 1 month ago

It hasn't been fixed for me - I'm running 5.3.9 and still see the same behaviour as originally reported.

cotman commented 1 month ago

As a chaser to my response above - I've now been using the new version of the app for some time (i.e. 5.3.9) on iOS 17.6.1, and I don't see any change in behaviour from the original bug report - I'm still using the same workaround of tapping "Settings" then "Tokens" to get notifications to appear when the app is already running.

ShawnCBerg commented 3 weeks ago

Anecdotally, I had been experiencing this same behavior with the Chrome extension and iOS app for quite some time, but the last week it seems to not be happening anymore. Came here looking to see if I could find a bug resolution and stumbled on this issue. Not saying it's resolved for everyone, but it hasn't happened to me in about a week and it used to happen once or twice a day before when the Approval dialog wouldn't appear.