-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Breaking changes after updating extension to v3 #1002
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
Comments
Oh dear. A couple quick questions to get a sense of what's going on:
|
I'm able to reproduce the issue with the example project for redux-most, looking into it. |
@j-dowell I believe I have a solution. There was an observable property leaking through the Redux DevTools store that was exposing the lifted state. However if I release the fix, I'm concerned that your app will break even worse. In my testing it seemed that What version of Redux are you currently on? If you're on a version less than |
Huh. What's the observable ponyfill issue, specifically? |
The issue is: Redux 4.1.0 does not depend on So it seems like Redux should polyfill |
Grrr. We specifically removed that dependency in 4.1.0 specifically because it was a lousy 1-line dependency and I didn't want to have to rely on it. Could we just advise users to import the polyfill first if it's a thing they need to depend on? |
Was the dependency causing any specific problems? It seems like adding a few bytes to the bundle size is easily worth it in this case in order to avoid the special instructions of having to import the polyfill first, any complications that arise from that, as well as any developer time spent trying to figure out why it's broken. It's a pretty bad gotcha and easily solved on the Redux side of things. I like getting rid of dependencies as much as the next person, but this one seems like a net positive. |
No specific problems, but it seemed unnecessary to have a dependency for that one-line polyfill, and I've been advocating for years that the JS ecosystem should cut down on tiny dependencies to help consolidate and improve installation. So, I was trying to follow my own advice there. I don't want to re-add that dependency, but I'm open to discussion on it. |
Hi! Is there a way to downgrade to a previous version? We're having issues as well, and I'm not sure what to do to make it work again. It seems drastic to force us to update our code, when an extension is updated without our consent. I magically found the latest version of the extension on my system, without purposefully upgrading. |
@sorinpav Unfortunately Chrome Extensions automatically updates extensions without consent and doesn't have a way to downgrade which is a severe limitation of Chrome Extensions. For now the best way to work around it is to download the Another possible workaround would be to try to |
Thank you so much! That sorted our redux devtools extension. It's really frustrating to see breaking changes like that, hopefully it gets sorted out soon. The redux version I'm using is 4.1.2. |
@Methuselah96 Thanks for looking into it. But our app is already using |
Thanks for the info. My guess is that the reason it breaks with the extension but not with plain Redux is because the order of import is the Redux DevTools extension, |
@sorinpav Are you also using |
@Methuselah96 no, I'm not using any of that |
@sorinpav Got it, what problems are you having with the new extension? |
@Methuselah96 the new extension just seems to not show any state whatsoever. I get state:undefined if I remember correctly. Maybe I haven't set things up properly, but the existence of this issue tells me I'm not the only one with this problem. |
Hi @Methuselah96 |
@sorinpav Got it, sorry to hear you're having problems. This root issue of the OP is very distinctly caused by a weird interaction with symbol-observable and the extension that should only affect people who are using symbol-observable or a library that uses it like most.js. It's likely your root issue is different. If you could open a new issue with a description that shows the code you're using to set up your Redux store that would be extremely helpful. Thanks! @a-c-sreedhar-reddy Sorry to hear that. Are you using any libraries that depend on symbol-observable and can you show me the code you're using to set up your Redux store? |
@a-c-sreedhar-reddy Also, are you getting the internal object when calling |
@Methuselah96 i will open something up tomorrow morning if that's ok! Once again, thank you for all your help tonight! I'll be back tomorrow! |
@j-dowell Can you try out Redux DevTools - Next when you get a chance? It is a beta extension that includes #1003. I would expect it to crash your app if I understand the situation correctly and I just want to make sure it does what I expect so I can decide how to proceed. |
@Methuselah96 Sure, just installed and it crashed with:
|
@Methuselah96 Yes we added
This is how we instantiate redux store. const composeEnhancers = composeWithDevTools(options);
export const globalStore = createStore(
rootReducer,
composeEnhancers(
applyMiddleware(
...getDefaultMiddleware({
thunk: true,
immutableCheck: false,
serializableCheck: false,
}),
),
// other store enhancers if any
),
);
We wrap store in a |
@a-c-sreedhar-reddy : while I don't think it's directly related, that is a realllly weird way to set up a Redux store. It looks like you're mixing pieces of the plain (Also I'd be interested in hearing, in a separate discussion thread, why you opted you turn off the dev check middleware.) |
@a-c-sreedhar-reddy Thanks, that's really helpful. A couple follow-up questions:
|
@Methuselah96 Yes it crashed
|
@j-dowell @a-c-sreedhar-reddy Just released v3.0.3 with a fix. It's released on Firefox and Chrome. Let me know if it fixes your issue. @sorinpav Feel free to try the new version as well, but I suspect the issue you're having is caused by something else. |
It worked with 3.0.3. Thanks @Methuselah96 ✌🏻 |
Thanks @Methuselah96 3.0.3 also fixes an issue we were having with accessing the observable manually using symbol-observable. Appreciate the quick turnaround! |
@markerikson To conclude our earlier conversation, it turns out RxJS stopped using a polyfill for Symbol.observable as well which makes me agree that Redux should not be using The solution of making sure to run polyfills first doesn't work for the extension since the Chrome extension code runs before any user code. I've made it so that the DevTools doesn't resolve Symbol.observable until the user creates a store and it will produce a console warning if Symbol.observable doesn't match between Redux and the DevTools. If a user gets that warning it means that they polyfilled Symbol.observable after importing Redux and before creating a store. |
@Methuselah96 It appears that the 3.0.3 version did not sort our issue. I've tried both the "-next" and the official Redux-devtools extensions. v3.0.3. They don't seem to work for us. Should I start a new issue, or should we reopen this one? Also, could you please re-iterate what details you would need from our config? |
@Methuselah96 gotcha. Really appreciate your detective work and digging here! |
After updating the Redux Dev Tools extension (Chrome) to v3 this weekend, our app is no longer working when the extension is enabled. Still works on Firefox as the add on hasn't been updated yet.
We use redux-most as middleware, like so:
And now when accessing state (using withState), instead of the regular state object being returned it looks something like this:
Where the actual state object can be located at the last index of
computedStates
Does anyone have any ideas as to what happened here and how it could be resolved? Thanks
The text was updated successfully, but these errors were encountered: