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

Chrome extension stops listing actions - update to chrome 70 #566

Closed
avilao opened this issue Oct 25, 2018 · 8 comments
Closed

Chrome extension stops listing actions - update to chrome 70 #566

avilao opened this issue Oct 25, 2018 · 8 comments

Comments

@avilao
Copy link

avilao commented Oct 25, 2018

After listing about 10 actions nothing else happens. Issue started happening after upgrading to Chrome 70.

@AmyScript
Copy link

Having this issue too but it's after listing > 10 actions. It always get stuck at the same spot and no longer displays dispatched actions and the updated state. Verified that the code and state is working from logging out the redux state.

@avilao
Copy link
Author

avilao commented Nov 7, 2018

Yes, still happening to me also :(

@zalmoxisus
Copy link
Owner

Cannot reproduce the issue. Tried in Chrome 70.0.3538.102 (Official Build) (64-bit) and in 72.0.3611.0 (Official Build) canary (64-bit).

Tried in both ways:

  1. First open http://zalmoxisus.github.io/examples/counter/, click Auto increment then open extension's devpanel.
  2. First open devtools then click Auto increment.

By default it should be limited to 50 actions, but that can be increased/decreased as specified in the API.

Please check my example and if possible provide an example to reproduce.

@avilao
Copy link
Author

avilao commented Nov 15, 2018

It has nothing to do with the action limit I guess. From what I have been able to dig it might have something to do with the size of the message. The extensions seems to stop working after throwing this error message:

Failed to send message Error: Message length exceeded maximum allowed length.

My app did not change. Maybe the limit of the sendMessage msg size has been reduced?

@zalmoxisus
Copy link
Owner

Thanks for debugging it. Seems that Chrome added a limit on sent message to 32MB. The state over time increases and as soon as it reaches that limit isn't able to send updates, so the data on monitor remains unchanged.

I'll think on the solution, probably we'll have to split messages into chunks. However, the fact that it is serializing more than 32MB isn't good, it will affect the app performance significantly and if continues to increase, at some point, it will freeze. A recommended approach is to strip some not necessary data using actionSanitizer / stateSanitizer.

@zalmoxisus
Copy link
Owner

zalmoxisus commented Nov 18, 2018

Thinking into that, there's a reason why Chrome imposed that limit, and for now I'll go with the warning with a link on how to configure the store in order to avoid this issue. Unfortunately, there's no way to know from extension side what we could strip to make it out of box. Adding a workaround to the limitation by splitting the messages up into chunks would be a temporal solution till the state grows enough to freeze/crash the extension. This is open for suggestions.

@avilao
Copy link
Author

avilao commented Nov 19, 2018

I would favor splitting the messages. Even though 32mb seems much, I don't think it's that much of a size for complex apps.

At least in my case, the extension never broke even if the state got big. But I see your point, if someone is careless about the state management then the app will probably crash somewhere on the way.

@zalmoxisus
Copy link
Owner

I added splitting messages in #582. It should work in2.16, which will land in a day on Chrome Store. Thanks again for all the details!

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

3 participants