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

ERROR when packaging a binary for arch=universal #2975

Closed
3 tasks done
qiqetes opened this issue Oct 19, 2022 · 3 comments
Closed
3 tasks done

ERROR when packaging a binary for arch=universal #2975

qiqetes opened this issue Oct 19, 2022 · 3 comments

Comments

@qiqetes
Copy link

qiqetes commented Oct 19, 2022

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

^6.0.0-beta.66

Electron version

19.0.0

Operating system

macOs 12.0.3

Last known working Electron Forge version

No response

Expected behavior

I expect the binaries that I add in extra resources to be considered as valid for both architectures. Or at least I want to know why the error is thrown.

{
  packagerConfig:{
    ...
    extraResource: "bin/",
    }
}

Actual behavior

I get this ERROR that I see no way of handling.

Error: Detected file "Contents/Resources/bin/mac/ffmpeg" that's the same in both x64 and arm64 builds and not covered by the x64ArchFiles rule: "undefined"

Steps to reproduce

Try to add extraResource for universal arch and make the app for universal arch.

Additional information

Full packagerConfig:

  packagerConfig: {
    icon: "./assets/app-icon.ico",
    appBundleId: "com.X.X",
    osxSign: {
      identity: "Developer ID Application: X",
      entitlements: "./process/entitlements.plist",
      "entitlements-inherit": "./process/entitlements.plist",
      hardenedRuntime: true,
    },
    extraResource: "bin/",


     osxNotarize: {
       X
     },
  }
@qiqetes
Copy link
Author

qiqetes commented Oct 19, 2022

Solved, just had to add the osxUniversal object and specify the path for x64ArchFiles

@qiqetes qiqetes closed this as completed Oct 19, 2022
@peter-slattery
Copy link

@qiqetes Can you be more specific? I just hit this error too, and this is the first thing google turns up. At least, could you link to where you found the solution? -Thanks

@erickzhao
Copy link
Member

@peter-slattery

This error happens when the same x64 binaries are present in both the x64 and arm64 versions of your app.

I think you would need to set up the x64ArchFiles configuration option for @electron/universal like this:

// forge.config.js
{
  packagerConfig: {
    osxUniversal: { // config options for `@electron/universal`
      x64ArchFiles: '**/_ARC4.abi3.so' // replace with any relevant glob pattern
    }
  }
}

Ref electron/universal#47

#3125 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants