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

Second time I open the post box, all the post box additions are gone #165

electroly opened this issue Sep 4, 2019 · 1 comment


Copy link

commented Sep 4, 2019


A problem occurred when processing a post: TypeError: Cannot read property 'closest' of null

Not sure what is causing this specific exception but I will take this chance to reiterate what I said the last time a misbehaving script killed everything in the post box:

I continue to suspect that the addon's overall reliability could be improved by isolating failures in one script from affecting the other scripts, as we discussed in Slack some time ago. As soon as anything blows up inside MutationObserver that's it, the rest of the scripts don't even get to try. The code in MutationObserver has a try/catch but it doesn't do what we need: it prevents one added node from stopping future added nodes in the mutations list from processing, but it does nothing to stop one misbehaving script from failing every single time it is invoked, thereby killing the rest of the scripts that rely on MutationObserver. The postbox scripts are much more brittle than they used to be before MutationObserver was added, and I think it can be trivially fixed using the technique we discussed (track the individual observers yourself so you can wrap each call in a try/catch).


This comment has been minimized.

Copy link

commented Sep 4, 2019

@electroly electroly closed this Sep 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.