dedoussis / icloud-hide-my-email-browser-extension

Enjoy iCloud's Hide My Email service in your favourite browser
https://chrome.google.com/webstore/detail/icloud-hide-my-email/omiaekblhgfopjkjnenhahfgcgnbohlk
MIT License
289 stars 15 forks source link

Regularly logs out, breaks, needs to be reinstalled #36

Open mpr1255 opened 1 year ago

mpr1255 commented 1 year ago

I am not sure how to reproduce this bug, since I don't know what's causing it. But briefly, the behaviour is that:

(1) I get a "Failed to sign in." error when trying to login (after having previously logged in). However, my phone and computer gives me the 2fa login screen fine. (2) After I uninstall and reinstall the plugin, then try login again, it works. (3) After some unspecified period of time (I honestly don't know how long -- days? weeks?), the behavior of (1) and (2) is observed again.

Practically this means uninstalling and reinstalling the plugin every second or third time I go to use it. Which defeats the purpose of the plugin I suppose.

If there's anything I can do to provide more information on the bug, please let me know. I wish I knew TS and could help contribute and debug it. Very useful and excellent plugin otherwise.

dedoussis commented 1 year ago

Hi @mpr1255! Thanks a lot for reporting this issue. Haven't managed to reproduce it myself yet.

Are you running the extension on Firefox or Chromium?

It would be very useful if you could capture some debugging context next time you encounter this error. In particular, when you encounter the same error again:

  1. Accept the 2fa login prompt of Apple
  2. Close the extension pop-up.
  3. Go to chrome://extensions and inspect the views of the service worker [0]
  4. A new DevTools browser window will pop up. Minimise the window and go back to your main browser window.
  5. Open the extension pop-up and try logging-in again. You should be presented with the same error message.
  6. Go back to the DevTools window:
    1. Under the Console tab, you will find the logs of the service worker. Please paste them here.
    2. Under the Network tab, you will find all network calls initiated by the service worker. Please paste the requests and response here. Make sure to redact your Apple ID username and password.

Thank you very much in advance. I understand that this isn't the simplest debugging workflow.

[0]

image
Bl4ckBl1zZ commented 1 year ago

Hello there, me and my friend are experiencing the same issue. Whenever we login, it sends the request successfully, we even receive a 2fa code on our phones, but there is an issue after that as you can see on the screenshots . image image

dedoussis commented 1 year ago

Hi @mpr1255 and @Bl4ckBl1zZ! The issue is due to Chromium unexpectedly disabling some static declarative net request rules of the extension. I could not figure out what's the exact root case behind that. It is possible that this could be a bug of Chromium.

Have just pushed a patch to work around this Chromium behaviour. It's been released as version 1.1.2 but awaits a review from the Chrome webstore team.

Bl4ckBl1zZ commented 1 year ago

Thank you, I’m looking forward for this update when I’m back from vacation.

mpr1255 commented 1 year ago

You are a champion. I'm really sorry I didn't follow through on all the debugging... Glad you were able to figure it out, and well done.

micnguyen commented 11 months ago

Can confirm that I also experience a lot of log outs. Keenly awaiting new version as re-logging in each time makes this un-usable. Thanks.

EDIT: Oh interesting, I am already on 1.1.2. I will keep observing to see if this issue occurs on the new version.

EDIT 2: I am on 1.1.2 and have lost my Credentials again.

Target0998 commented 9 months ago

Hey!

I'm using Brave(Chromium). I observed, that every time i update the browser the extension logs me out, i assume because of the browser fingerprint change, but honestly no idea (shouldnt it use cookies?).

If i try to log back in upon clicking the button nothing happens, not even the 2FA prompt comes up. I hope, that this will be resolved with the apple site login.

dedoussis commented 9 months ago

@Target0998 Since Jul '23, Brave has a bug due to which declarativeNetRequest rules of extensions stop working when the browser process is terminated: https://github.com/brave/brave-browser/issues/30854

Without its declarativeNetRequest rules, the extension cannot make requests to the Apple APIs, hence it automatically signs you out. This is also why subsequent sign-in attempts do not even trigger a 2FA prompt.

You will notice that if you refresh the extension through brave://extensions, it will start working again, but only until you shut down the browser.

In the brave issue above, there are some super hacky workarounds suggested (like having the extension periodically refresh itself) but I'd probably prefer to wait for the Brave team to fix this regression.

dedoussis commented 9 months ago

@micnguyen is this still a problem on your end? How often do you need to sign-in? What browser are you on? (if brave pls refer to the comment above)

micnguyen commented 9 months ago

@dedoussis It's still a problem. But I don't think it's related to this extension - I'm noticing other Chrome extensions that require a login also don't keep a login. Anyone experiencing the issue with this extension seeing similar behaviour on other extensions?

dedoussis commented 7 months ago

FYI the brave team has pushed a fix for this bug. They plan to have it released by end of Feb.