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

[Bug] Extension times out and is unresponsive, just "spinning" if you click away for a while. #217

Open
daidoji opened this issue Nov 6, 2024 · 6 comments
Assignees

Comments

@daidoji
Copy link
Contributor

daidoji commented Nov 6, 2024

To reproduce

  1. New extension loaded from a build of main @ 2799a clean no settings.
  2. Config url with http://127.0.0.1:3901 http://127.0.0.1:3903 etc.. with keria instance running
  3. Generate passcode, get to first page successfully.
  4. If you click off the extension and then back on in a short time period you'll be taken back to that page. If you wait about a minute or so when you click back it'll just have the "spinning" happening like the extension isn't loaded. In the web worker logs it'll say it reconnected successfully. We couldn't narrow down exactly what that time was but it seems like its more than a minute.

To resolve

Extension should be active the entire time before passcode times out. No spinning if possible.

build env

Chrome: Version 130.0.6723.92 (Official Build) (64-bit)
Build Extension from main commit: 2799a16

@daidoji daidoji changed the title [Bug] [Bug] Extension times out and is unresponsive, just "spinning" if you click away for a while. Nov 6, 2024
@HunnySajid HunnySajid self-assigned this Nov 7, 2024
@HunnySajid
Copy link
Collaborator

@daidoji thank you for reporting this.
I have to check if it is due to timeout or some other issue. Will get back with my findings or a fix PR.

@HunnySajid
Copy link
Collaborator

hey @daidoji
I am trying to reproduce this behaviour but do not have any success yet.
I have some observations though:

  • I have seen this happening on certain pages where content script is not loaded.
    E.g chrome://extensions/ that is restricted by default. It happens due to the fact that whenever extension popup opens it tries to connect with the content script on current active tab.
    It throws following error Error: Could not establish connection. Receiving end does not exist. if it could not connect with content script. I am looking into a work around to handle this case.
  • Other than this I suppose our content script should work on all of the pages e.g any webapp as it is in our policy, (see manifest.json)
    "matches": ["file://*/*", "http://localhost/*", "https://*/*"],
  • Regarding service worker, it does not go inactivated and is kept active intentionally (fix: keep sw activated during session #206) so that could not be an issue.

I am still looking to reproduce it, I would appreciate it if you could describe the exact steps to reproduce if you face it again.

I have an open PR #220 regarding passcode storage changes. You can give it a fresh try as this one gets merged.

Thanks

@daidoji
Copy link
Contributor Author

daidoji commented Nov 11, 2024

@HunnySajid hmm, I will try but the steps above should be what we experience. My partner @dc7 experienced this on FF as well. Not just the extension page but while we're using the extension at multiple points.

I also think we don't get any connection with https (sorry I have changed this issue to reflect that). I think we filled out #215 to reflect that this didn't work for us with a weird error.

Its intermittent but I think you might check again that its always active, we had some logs showing that the timeout calculation for wiping the password shows some weird stuff like the web worker is getting backgrounded and the timer is going away strangely. However, I think this error is due to the extension somehow losing contact with the web worker somehow because the console will print a "Connected" log when this spinning issue happens.

Its strange that you can't reproduce, on Friday we ran into this more than 10 times probably in a two hour pair programming session. I will try and get more screenshots and reproducible steps though if I can.

@daidoji
Copy link
Contributor Author

daidoji commented Nov 11, 2024

Here's a new screenshot I grabbed while the issue recurred today:
image

You can see the successful connection request in the web-worker while the extension remains unresponsive and spinning. Only waiting for the global timeout seems to resolve the issue.

@dc7
Copy link

dc7 commented Nov 11, 2024

Same issue, commit 6c12, Firefox 132.0.1 (64-bit).

Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.

Untitled

@HunnySajid
Copy link
Collaborator

Alright, so I just tried to handle the could not establish connection error that was supposedly causing the infinite looping issue:

@dc7 can you please give it a try to see if you are able to proceed or it's still stuck
Latest artifact:
https://github.com/WebOfTrust/signify-browser-extension/actions/runs/11812020340

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

No branches or pull requests

3 participants