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

[Bug]: Thread 0 Crashed:: CrRendererMain Dispatch queue: com.apple.main-thread #39938

Closed
3 tasks done
AndyLyttle opened this issue Sep 21, 2023 · 2 comments
Closed
3 tasks done

Comments

@AndyLyttle
Copy link

Preflight Checklist

Electron Version

26.2.1

What operating system are you using?

macOS

Operating System Version

macOS Ventura

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

No response

Expected Behavior

Deploying App to App Store via using MAS format from

(neither work - both get same error)

  1. Electron forge
  2. Electron builder.

Actual Behavior

Steps:

  1. Generate PKG through forge Makers (or through Electron builder)
  2. Upload PKG to App store connect via Apple transporter app
  3. Release pkg via testflight for download
  4. App Launches, then crashes

Testcase Gist URL

No response

Additional Information

I dont think i can create a fiddle for this - its for the desktop versions - but i am getting the same error from the following tries:

  1. my actual app i want to deploy using electron-forge
  2. a hello world react app using electron forge
  3. a hello world react app using electron-builder

All get the following crash:

https://pastebin.com/E61mmx8k

@codebytere
Copy link
Member

@AndyLyttle looking at the dump:

Kernel Triage:
VM - (arg = 0x0) pmap_enter retried due to resource shortage
VM - (arg = 0x0) pmap_enter retried due to resource shortage
VM - (arg = 0x0) pmap_enter retried due to resource shortage
VM - (arg = 0x0) pmap_enter retried due to resource shortage
VM - (arg = 0x0) pmap_enter retried due to resource shortage
 
 
Thread 0 Crashed:: CrRendererMain Dispatch queue: com.apple.main-thread
0   Electron Framework            	       0x11a02280e node::AsyncResource::get_async_id() const + 10793118
1   Electron Framework            	       0x11a022829 node::AsyncResource::get_async_id() const + 10793145
2   Electron Framework            	       0x11a022846 node::AsyncResource::get_async_id() const + 10793174
3   Electron Framework            	       0x11b66bd78 node::AsyncResource::get_async_id() const + 34162184
4   Electron Framework            	       0x117ce01f0 v8::internal::V8::FatalProcessOutOfMemory

This is what happens when you exceed heap limitations in V8. This is not an issue with Electron - it's a function of the app you've written and the V8 JavaScript engine underpinning Chromium/Node.js. See #22705 (comment) for potential paths forward.

@codebytere codebytere closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2023
@AndyLyttle
Copy link
Author

AndyLyttle commented Oct 3, 2023

We did see this and profile the app, it never goes over 100MB usage.

What solved this error was entitlement changes,

In electron forge you cant seem to specify different entitlements for different things

We moved to electron builder and by specifying entitlement files correctly, the app now ran as expected

image

For anyone facing an issue like this in future - the Login Helper entitlement was of particular importance, we think this is what was crashing our app, When we put com.security.apple.inherit within this, it crashed every time, but when we just included ONLY com.security.apple.sandbox, also ONLY for the mas.loginhelper entitlement (due to us deploying to the app store), The app worked every time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: 👀 Unsorted Items
Development

No branches or pull requests

2 participants