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

v3.2.0 no longer working on chrome #1731

Closed
opeologist opened this issue Aug 26, 2024 · 33 comments
Closed

v3.2.0 no longer working on chrome #1731

opeologist opened this issue Aug 26, 2024 · 33 comments

Comments

@opeologist
Copy link

chrome automatically updated this extension to v3.2.0 and it no longer sees/connects to stores on my site like the previous version did. no code changes in user land have occurred.

are there additional steps to enable the extension's use post-manifest v3? that looks to be the only change in v3.2.0

any help would be appreciated, thanks!

@Methuselah96
Copy link
Member

Methuselah96 commented Aug 27, 2024

Sorry that the new version is not working for you! There shouldn't be any additional steps to get it working, I will work on adding some diagnostic logging so that we can see what's going on. If you need a fix sooner, you can download the chrome.zip from one of the earlier versions and manually install that by going to chrome://extensions, turning on Developer mode, unzipping the extension, and selecting "Load Unpacked.

@opeologist
Copy link
Author

wound up having to revert to v3.1.11 to unblock me while this gets sorted. checked before reverting if 3.2.3 fixed the issue and it was still not working. let me know if you need me to test anything related to resolving this! thank you!

@Methuselah96
Copy link
Member

Methuselah96 commented Sep 4, 2024

Can you check if there are any console errors for either the "Redux" DevTools tab or the background service worker?

You can check the "Redux" DevTools tab by right-clicking in the panel when you have the tab open and going to "Inspect View."

You can check the background service worker by going to "Extensions," enabling "Developer Mode," and clicking on the "service worker" text that appears in the Redux DevTools extensions square.

Or if there are any errors in the regular DevTools console for your page, those could be relevant as well.

@Oikio
Copy link

Oikio commented Sep 6, 2024

I have similar issue, no errors in consoles of service worker or redux devtools.

One thing though, devtools works if it's tab with Redux Devtools was open/focused in Chrome DevTools focus when page reloads, but will fail to connect to store if one opens after page was loaded.

UPD: version 3.2.2.

@shadow1349
Copy link

I am having a similar issue with version 3.2.4. When I open the devtools I just get this
image

I am on Chrome (desktop) Version 128.0.6613.120 (Official Build) (arm64) and an M3 Mac

@PhantomLinker
Copy link

I am having a similar issue with version 3.2.4. When I open the devtools I just get this image

I am on Chrome (desktop) Version 128.0.6613.120 (Official Build) (arm64) and an M3 Mac

I have the same issue after installing some updates today. Also Version 3.2.4 of the Extension. Chrome Version 128.0.6613.121 (Offizieller Build) (arm64) on an M1 Mac.

The project runs NGXS instead of vanilla Redux or NgRx.

I found a workaround: Right Click on the extension -> "Open in a window" which should still display the Error Message -> reload/refresh the site so that the stores will load again =)

@shadow1349
Copy link

@PhantomLinker, that's interesting. I don't get the error when opening in a new window but a refresh does show the store. However, when I close the extension and re-open it it breaks again.

@PhantomLinker
Copy link

@PhantomLinker, that's interesting. I don't get the error when opening in a new window but a refresh does show the store. However, when I close the extension and re-open it it breaks again.

Yes. Closing and Opening the extension will display the Error again. It might be a Bug in the Initialzation process of the extension.

@Gianarci
Copy link

Gianarci commented Sep 12, 2024

Same problem here. Plugin version 3.2.4, Chrome version 128.0.6613.137 (Official Build) (64-bit)

@MrTob
Copy link

MrTob commented Sep 12, 2024

same problem. Chrome Version 128.0.6613.138 and NGXS

@Methuselah96
Copy link
Member

Methuselah96 commented Sep 16, 2024

I've released v3.2.5 which adds logging to the background service worker.

Can someone post a screenshot of their background service worker console log by going to "Extensions," enabling "Developer Mode," and clicking on the "service worker" text that appears in the Redux DevTools extensions square?

Here's a sample of what it looks like for me:
image

@Mathyn
Copy link

Mathyn commented Sep 17, 2024

@Methuselah96 Not sure I did it right but this is what I got. I am using this plugin in combination with NGXS.

DebugRedux

As a side note: the plugin never works for me when I click the dedicated extension button (it always claims it cannot find a store).

The extension DOES somewhat work for me if I open my browser console (F12), then navigate to the redux tab and then refresh my browser page.

With 'somewhat' I mean:

  • It loads the current state of the stores
  • It does not show any new actions being dispatched
  • It does not update the state of the stores beyond the initial state

For the second case I am unsure how to get the debug logs, if you can help me with that I can provide these as well (perhaps if you compare the two that provides some useful info?).

@uksparky
Copy link

uksparky commented Sep 17, 2024

@Methuselah96 I've had similar issues as described above, when using autoselect instances and reloading a page I get the attached.
Screenshot 2024-09-17 at 12 12 07

@Methuselah96
Copy link
Member

Thanks! I'm able to reproduce the issue with NGXS, looking into that.

@VitorHFLopes
Copy link

VitorHFLopes commented Sep 18, 2024

Thanks @Mathyn !

For now, that saves a lot!

@Methuselah96
Copy link
Member

I've looked into this, unfortunately I'm not sure there's a trivial fix. The issue is due to changes in Manifest V3, namely that background pages are no longer persistent, so we can no longer store past state and actions on the background page.

This isn't a problem with normal Redux because we're already storing the past state and actions on the page, so when the Redux DevTools window is opened, it just requests all that past data. It doesn't look like the NGXS DevTools plugin is currently set up to do this. It worked with Manifest V2 because all past state and actions were stored on the background page, so it would just use that whenever the Redux DevTools window was opened.

I'll have to give this one some thought. Thank you all for your patience.

@Methuselah96
Copy link
Member

Methuselah96 commented Sep 18, 2024

Is there anyone here who is not using NGXS, or another custom Redux DevTools integration? Just checking to make sure that's the main issue here.

@opeologist
Copy link
Author

Is there anyone here who is not using NGXS, or another custom Redux DevTools integration? Just checking to make sure that's the main issue here.

we're using zustand if it helps

@razvanilin
Copy link

Is there anyone here who is not using NGXS, or another custom Redux DevTools integration? Just checking to make sure that's the main issue here.

I'm having similar issues in a Vite + React + Redux Toolkit setup. The store gets connected 90% of the time, but the main issue is that the Redux DevTools tab stops updating with new dispatches unless I close the devtools and open it again

@uksparky
Copy link

Is there anyone here who is not using NGXS, or another custom Redux DevTools integration? Just checking to make sure that's the main issue here.

I am and the console image i previously attached is from a plain redux app with redux devtools extension.

My symptoms are similar to those of @razvanilin

It seems like some sort of connection is timing out after a while as i can be fairly confident if I have devtools open and manage to connect it to an instance then after a few minutes that instance no longer sees any dispatched actions. If I then close dev tools and reopen then I get the white loading circle.

@Methuselah96
Copy link
Member

Methuselah96 commented Sep 18, 2024

Thanks all! Sounds like we have two main issues:

  • Some third-party integrations (e.g., NGXS and Zustand) no longer work
    • Current workaround is to have the Redux DevTools tab open before loading the web page and/or refresh your web page once the tab is open
  • DevTools loses connection if it remains inactive for too long
    • Current workaround is to refresh the web page and reload Redux DevTools, but that's obviously not ideal

Let me know if you have an issue that doesn't seem like it fits in either category.

I'll be working hard on fixes and post any updates here, sorry for the interruption. Both of these issues are not trivial to fix and are unfortunate by-products of the loss of a persistent background page in Manifest V3.

@zehawki
Copy link

zehawki commented Sep 18, 2024

@Methuselah96 thank you for looking into these issues!

I'm having a similar (but different) issue on

  1. Chrome 128.0.6613.138 and Brave [Version 1.69.168 Chromium: 128.0.6613.138]
  2. Redux DevTools 3.2.5
  3. Vanilla react setup: React 17 + CRA

Redux DevTools just freezes completely upon hot reloading. After that irrespective of how many times I reload, nothing will refresh. The only way to recover is to close dev tools and reopen. Once I reopen dev tools, Redux DevTools connects just fine to the store, and shows me the existing (past) actions, states, etc etc and works fine after that. Until the next hot reload. At which point I have to do this rigmarole again.

Edit: Hmmm... I was still on https://www.npmjs.com/package/redux-devtools-extension. Moving to this package has solved the issue for me. But what is strange is that this issue has surfaced for the first time just a few days ago.

Still further edit: Nope, issue is continuing to occur.

@andyghiuta
Copy link

@Methuselah96 I've encountered the same issue with Manifest V3 and here's something that helped keeping it alive:

// https://stackoverflow.com/questions/66618136/persistent-service-worker-in-chrome-extension
// https://bugs.chromium.org/p/chromium/issues/detail?id=1152255
const keepAlive = () => setInterval(chrome.runtime.getPlatformInfo, 20e3);
chrome.runtime.onStartup.addListener(keepAlive);
keepAlive();

@MaksimAliakhnovich
Copy link

MaksimAliakhnovich commented Sep 19, 2024

  1. Chrome 128.0.6613.138
  2. Redux DevTools 3.2.5
  3. NextJs 14+

image
this screenshot is after disabling, the development panel was closed. At some point it turns off and does not respond to buttons, events do not come, you can not make a commit to clear history. refreshing the tab does not help, only restarting the browser

but when the developer panel was opened everything worked fine even after a long time. as it seemed to me

maybe this will help with something

@Methuselah96
Copy link
Member

Methuselah96 commented Sep 20, 2024

The DevTools losing connection should hopefully be fixed in v3.2.6, let me know if you are still experiencing that behavior

@uksparky
Copy link

The DevTools losing connection should hopefully be fixed in v3.2.6, let me know if you are still experiencing that behavior

I used it briefly this afternoon for a few hours and it seemed to be working well, good work dude.

@Mathyn
Copy link

Mathyn commented Sep 23, 2024

The DevTools losing connection should hopefully be fixed in v3.2.6, let me know if you are still experiencing that behavior

Just gave it a quick try and the issues seem to be fixed when using NGXS. Will continue to test the rest of the day but so far looks really good. Nice job man!

@opeologist
Copy link
Author

ty for the updates! i'm able to see my store again on the latest version of the extension without issue. i think this can be closed as successful. thanks again!

@shadow1349
Copy link

Hey there, thanks for all the effort! I'm trying on version 3.2.6 and it seems to only work when I open it in a new tab and not in dev tools or when I use the pop up.

image
image

I'm not sure how to get logs for those. Let me know how I can provide any additional details.

@Methuselah96
Copy link
Member

@shadow1349 Are you using Redux, or a different state management library? Can you try v3.2.7 (by removing and re-adding the extension from the Chrome Web Store)?

@shadow1349
Copy link

Just updated, 3.2.7 works perfectly. Thank you!

@Methuselah96
Copy link
Member

Methuselah96 commented Sep 23, 2024

I've finished rolling out v3.2.7 to all users, so I believe the main issues here should be fixed. Thanks all for helping me diagnose these issues!

@Methuselah96
Copy link
Member

@zehawki I tried reproducing your issue with hot reloading and CRA, but was unsuccessful. Can you try out the new version, and if you're still experiencing problems, can you create a new issue?

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

15 participants