mobx: [issue] "e.observing is null" since last update of firefox
Hello, our app started to have an issue on Firefox with their last update:
e.observing is null
with mobx: 2.5.2, mobx-react: 3.5.6,
(for example I had FF 47.8, I think, and it updated to 49.0.1)
Since then we have an issue related to a <select /> which values are observables.
When a value is selected, it throws e.observing is null.
This bug was confirmed by various people, developers and customers.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 25 (10 by maintainers)
Had a similar issue. Older version of Firefox worked fine, latest (51.0.1) would fail with observing is null error. Seems to be similar to what @drewhamlett showed above.
Our problem was that we had a component with the
@observerattribute but the component had nothing to observe:Removed the
@observerattribute and it worked.“mobx”: “^2.7.0” “mobx-react”: “^4.0.4”
@jmca Thanks, this solve the
observing is nullissue for me too.@AoDev Here’s my upgrade path: mobx: 2.6.0 --> 2.7.0 mobx-react: 3.5.7 --> 4.0.3
I ran into this too under similar conditions (an
@observercomponent that doesn’t listen to any observables, but has child@observercomponents that do). While I haven’t found a reproducible small test case, I do have a repo that exhibits the issue. It seems like we’re hitting a Firefox JS engine bug, as unlikely as that sounds, but I haven’t found a matching bug in Bugzilla. That would corroborate the reports that this only happens in certain environments (prod vs. dev, maybe related to the level of optimizations kicking in?).In
bindDependencies, under certain conditions, the assignmentderivation.newObserving = nullappears to be taking effect before the assignment ofobservingandderivation.observing. In this screenshot, note the values ofwindow.a(displayed in the console) andb(displayed in the sidebar):ais an Array[100] as expected, butbis null when it should be the same object asa.Moving the
derivation.newObserving = nullassignment later in the function (e.g. after the first loop) seems to mitigate the problem, as do various other benign tweaks to the function. Unfortunately, if the cause is truly a Firefox JS engine bug, that would only be a bandaid. This doesn’t seem to be a problem with mobx itself.I was able to repro with the following:
npm install && npm run builddisclaimer: I work for Mozilla but not on the Firefox team.