Giter Site home page Giter Site logo

Comments (3)

nbonamy avatar nbonamy commented on June 9, 2024

By adding app.commandLine.appendSwitch('in-process-gpu') I can get rid of the GPU crash (not sure about side effects though) but then I get in an infinite loop of:

[86722:0422/212905.366246:ERROR:network_service_instance_impl.cc(599)] Network service crashed, restarting service.

from electron.

nbonamy avatar nbonamy commented on June 9, 2024

Created a blank project using instructions from https://www.electronforge.io/templates/vite:
npm init electron-app@latest my-new-app -- --template=vite

Did no modifications except:

  • updated appBundleId
  • added provisioning profile
  • added code signing identity

After upload and validation by Apple and install through TestFlight, the binary crashes immediately with
Trace/BPT trap: 5

Dumped the defaults entitlements and added com.apple.security.cs.allow-jit. After same process seeing same issue:

[55402:0423/185727.855235:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=5
[55402:0423/185727.857508:ERROR:network_service_instance_impl.cc(599)] Network service crashed, restarting service.
[55402:0423/185727.980709:ERROR:network_service_instance_impl.cc(599)] Network service crashed, restarting service.
[55402:0423/185728.079651:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=5
[55402:0423/185728.287614:ERROR:network_service_instance_impl.cc(599)] Network service crashed, restarting service.
[55402:0423/185728.393762:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=5
[55402:0423/185728.495650:ERROR:network_service_instance_impl.cc(599)] Network service crashed, restarting service.
[55402:0423/185728.602091:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=5
[55402:0423/185728.702365:ERROR:network_service_instance_impl.cc(599)] Network service crashed, restarting service.
[55402:0423/185728.809737:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=5
[55402:0423/185728.912410:ERROR:network_service_instance_impl.cc(599)] Network service crashed, restarting service.
[55402:0423/185729.019420:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=5
[55402:0423/185729.120553:ERROR:network_service_instance_impl.cc(599)] Network service crashed, restarting service.
[55402:0423/185729.227165:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=5
[55402:0423/185729.329023:ERROR:network_service_instance_impl.cc(599)] Network service crashed, restarting service.
[55402:0423/185729.436412:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=5
[55402:0423/185729.537897:ERROR:network_service_instance_impl.cc(599)] Network service crashed, restarting service.
[55402:0423/185729.645649:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=5
[55402:0423/185729.645665:FATAL:gpu_data_manager_impl_private.cc(448)] GPU process isn't usable. Goodbye.
Trace/BPT trap: 5

Entitlements:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>com.apple.security.app-sandbox</key>
    <true/>
    <key>com.apple.security.cs.allow-jit</key>
    <true/>
    <key>com.apple.security.device.camera</key>
    <true/>
    <key>com.apple.security.device.microphone</key>
    <true/>
    <key>com.apple.security.device.usb</key>
    <true/>
    <key>com.apple.security.files.bookmarks.app-scope</key>
    <true/>
    <key>com.apple.security.files.user-selected.read-write</key>
    <true/>
    <key>com.apple.security.network.client</key>
    <true/>
    <key>com.apple.security.print</key>
    <true/>
  </dict>
</plist>

Should I post that in https://github.com/electron/osx-sign instead?

from electron.

nbonamy avatar nbonamy commented on June 9, 2024

Problem solved. After trying so many different things and given the time it takes to test anything (upload, wait for validation...) I cannot be 100% sure but I believe it is about making sure I do not use the same entitlements for main app and other files (I need additional entitlements so cannot use default ones):

      osxSign: {
        identity: process.env.IDENTITY_MAS_CODE,
        provisioningProfile: './build/MAS.provisionprofile',
        optionsForFile: (filePath: string) => { 
          let entitlements = './build/Entitlements.mas.child.plist'
          if (filePath.endsWith('YOURAPP.APP')) {
            entitlements = './build/Entitlements.mas.main.plist'
          }
          return {
            hardenedRuntime: true,
            entitlements: entitlements
          };
        },
      },

from electron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.