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

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

Open
mpr1255 opened this issue Jul 17, 2023 · 11 comments
Open

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

mpr1255 opened this issue Jul 17, 2023 · 11 comments

Comments

@mpr1255
Copy link

mpr1255 commented Jul 17, 2023

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
Copy link
Owner

dedoussis commented Jul 18, 2023

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
Copy link

Bl4ckBl1zZ commented Jul 18, 2023

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
Copy link
Owner

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
Copy link

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

@mpr1255
Copy link
Author

mpr1255 commented Aug 17, 2023

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
Copy link
Contributor

micnguyen commented Oct 19, 2023

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
Copy link

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
Copy link
Owner

dedoussis commented Nov 29, 2023

@Target0998 Since Jul '23, Brave has a bug due to which declarativeNetRequest rules of extensions stop working when the browser process is terminated: brave/brave-browser#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
Copy link
Owner

dedoussis commented Nov 29, 2023

@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
Copy link
Contributor

@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
Copy link
Owner

dedoussis commented Jan 28, 2024

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

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

No branches or pull requests

5 participants