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

Overmind 19.1.0 throws tree mutation Error on Firefox #307

Closed
mieky opened this issue Aug 28, 2019 · 7 comments
Closed

Overmind 19.1.0 throws tree mutation Error on Firefox #307

mieky opened this issue Aug 28, 2019 · 7 comments

Comments

@mieky
Copy link
Contributor

mieky commented Aug 28, 2019

It looks like Overmind 19.1.0 (current "latest") gives what I think is a false tree mutation error on Firefox 67.0, but works fine on Safari and Chrome. This issue only seemed to appear in v19.

Loading the "Overmind demo1 - Vue" (https://codesandbox.io/s/k094r7rmyr) throws this error in the console:

Unhandled promise rejection Error: "proxy-state-tree - You are mutating the path "posts", but it is not allowed. The following could have happened:
        
        - You are passing state to a 3rd party tool trying to manipulate the state
        - You are running an asynchronous action from an other action where you forgot to "await" it
        "

If you make actions.getPosts() in overmind.js non-async, the error seems to disappear.

Might be related to #300?

@mieky
Copy link
Contributor Author

mieky commented Aug 28, 2019

@christianalfoni I would appreciate it if you would be able to confirm this is an actual issue and I'm not imagining things 😊

@christianalfoni
Copy link
Member

Hi @mieky and thanks for the example sandbox! I will have a look at this tomorrow morning, extremely weird that it only happens on Firefox. But at least we have a reproducible example, which is a very good start :)

I will let you know tomorrow morning what I figured out!

@christianalfoni
Copy link
Member

Okay, I have been checking this. For some reason Firefox is not returning a native promise from async functions. This is extremely weird, as I would expect this to be like a build step thing... but that should have affected all browsers.

I might need to implement some "promise like" thing... but this is so weird, will investigate further

@christianalfoni
Copy link
Member

Okay, giving up understanding this... might as well support other Promise implementations as well, so will implement a promise-like check instead

@christianalfoni
Copy link
Member

Okay, got help from @FWeinb to find the issue: vuejs/vue-cli#2012 (comment)

Will create a better promise check now

@christianalfoni
Copy link
Member

Okay, a new release is on its way. Now it works as expected :) https://codesandbox.io/s/overmind-demo1-vue-k8rjf

@mieky
Copy link
Contributor Author

mieky commented Aug 29, 2019

Wow, that was fast! Thank you, and kudos for the swift reaction 😊🙌

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

2 participants