Need help finding root cause of Safari App Extension crash

I've been battling an app crash of our Safari App Extension now for months, aside from not being able to reproduce this on my machine locally, there are hundreds of crash reports sent in to Apple through the App Store with the same crash so I know it's a thing.

Based on the crash itself it looks like it's crashing when it's calling WebKit's WebPageProxy::runJavaScriptInMainFrameScriptWorld(). From the Safari dev tools console on the front-end I don't see any JavaScript errors or issues coming through, the application simply crashes and this crash logs results.

I'm not sure how to debug or troubleshoot an issue like this or to figure out what exactly is happening with it. There is an extensive list of symptoms, crash logs, etc. These can be seen here in GitHub: https://github.com/bitwarden/browser/issues/1021 (should be publicly accessible).

Crash logs:


Console output logs:


The code repository is located here: https://github.com/bitwarden/browser

The sibling macOS desktop app code that packages this for distribution is located here: https://github.com/bitwarden/desktop

Need help finding root cause of Safari App Extension crash
 
 
Q