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

Not able to install or build app, yackage throws error #1

Open
CurtisTD opened this issue Jun 7, 2022 · 5 comments
Open

Not able to install or build app, yackage throws error #1

CurtisTD opened this issue Jun 7, 2022 · 5 comments

Comments

@CurtisTD
Copy link

CurtisTD commented Jun 7, 2022

Either running npm run build or using the install command in the wiki lets me build the app. Instead, I am given this error:

> [email protected] build
> yackage build out/

out/dock-window-preview: internal error in Code Signing subsystem
Error: child exited with code 1
    at ChildProcess.<anonymous> (/Users/me/Documents/git_clones/dock-window-preview/node_modules/await-spawn/index.js:28:21)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
  code: 1,
  stderr: '',
  stdout: ''
}
@PepsRyuu
Copy link
Owner

PepsRyuu commented Jun 7, 2022

Hi Curtis,

Thanks for the report! I'm fairly new to Mac development so I'm honestly not sure what's causing the issue, and I can't reproduce it on my device. Just a few questions for context to try and narrow this down:

  • What version of Mac OS are you running?
  • Have you ever installed XCode?
  • Are you compiling on a personal device, or a group policy managed device?
  • If you generate a code signing certificate using these steps, does it help?

I appreciate your support on this! :)

@CurtisTD
Copy link
Author

CurtisTD commented Jun 7, 2022

Sure thing!

  • I am on Monterey, 12.4
  • I have XCode installed
  • This is on my work machine
  • Creating the cert didn't help 😕

@PepsRyuu
Copy link
Owner

PepsRyuu commented Jun 7, 2022

From another report I got of this same issue, they were also on 12.4, but I'm on an older version (12.3.1). The linked article in the comments suggests using sudo if on 12.4. Another question for you, are you using an M1 Mac?

Something else to try (assuming you've cloned the repo):

  • Open node_modules/yackage/lib/mac.js
  • Modify the spawn call on line 70 to use sudo.
  • Run the build.

@CurtisTD
Copy link
Author

CurtisTD commented Jun 7, 2022

Hey there, did try running after adding sudo to the spawn call. Didn't seem to do anything when running it after that- seems to be stuck building for a long while. Don't know if it was actually able to create the call correctly, but no errors have been thrown.

Also, yes I am on M1

@PepsRyuu
Copy link
Owner

PepsRyuu commented Jun 8, 2022

As far as I understand, M1 has strict code signing requirements compared to Intel Macs (which I'm using), probably why I can't reproduce this issue.

One last idea to try:

  • Open node_modules/yackage/lib/mac.js
  • Comment out line 70.
  • Run the build
  • Presumably the app is compiled and exists in out at this point.
  • Try run the app, see what error if any it gives.
  • Try run codesign -d -v out/Dock\ Window\ Preview.app, should say it's not signed.
  • Try run codesign --force --deep --sign - out/Dock\ Window\ Preview.app (without sudo first, then with sudo).
  • Try run the previous command again and see what it signed if anything.

Thanks again for your help on this!

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

2 participants