Most web pages cause an unhandled promise rejection within the LastPass Safari extension. We have a global "unhandledrejection" handler installed, so it sees that unhandled rejection and shows a "something went wrong" page. How do we ignore errors like this from extensions?
-
Show this thread
-
This isn't a problem with reporting to BugSnag etc. It's just `window.addEventListener("unhandledrejection", ...)`, and LastPass' extension is broken so we see their error.
2 replies 1 retweet 6 likesShow this thread -
LastPass' extension breaks on most web pages right now. So either: 1. everyone uses an error filtering mechanism that I can't seem to find via google, or 2. LastPass users can't use the web at all, or 3. no one actually uses `window.addEventListener("unhandledrejection", ...)`?
5 replies 1 retweet 9 likesShow this thread -
apparently it's (3) (┛◉Д◉)┛彡ƃuᴉɯɯɐɹƃoɹd qǝʍ
4 replies 4 retweets 46 likesShow this thread -
OK, so if I can't use the unhandledrejection event, how do I catch all unhandled promise rejections and show the user a "something went wrong" page?
8 replies 0 retweets 1 likeShow this thread -
Replying to @garybernhardt
If you want to protect yourself against misbehaving browser plugins, I think the answer is fundamentally that you can't. Ultimately you're running the code in an unknown dynamic environment with arbitrary third party code running within it. Can't have it both ways
1 reply 0 retweets 2 likes -
Replying to @sgrif @garybernhardt
Seems like the best bet might be to just sniff for known bad plugins and skipping this behavior or showing the user an additional message in this case (trying to do this per-error instead of globally seems like a lost cause IMO)
1 reply 0 retweets 0 likes -
Replying to @sgrif
So you're saying the best bet is a list of special-cased ignored errors, but that's probably not going to work out well in practice because of the effort required to maintain it?
2 replies 0 retweets 0 likes -
Replying to @garybernhardt
Basically, yes. Detecting the plugin and disabling this behavior entirely for that case seems much more practical/stable/possible
1 reply 0 retweets 1 like -
Replying to @sgrif
Oh, so you mean "disable error reporting entirely for users who have known-bad extensions installed"? I think I misinterpreted you the first time.
1 reply 0 retweets 1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.