dock-window-preview icon indicating copy to clipboard operation
dock-window-preview copied to clipboard

Not able to install or build app, yackage throws error

Open CurtisTD opened this issue 3 years ago • 5 comments

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: ''
}

CurtisTD avatar Jun 07 '22 18:06 CurtisTD

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! :)

PepsRyuu avatar Jun 07 '22 18:06 PepsRyuu

Sure thing!

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

CurtisTD avatar Jun 07 '22 19:06 CurtisTD

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.

PepsRyuu avatar Jun 07 '22 19:06 PepsRyuu

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

CurtisTD avatar Jun 07 '22 22:06 CurtisTD

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!

PepsRyuu avatar Jun 08 '22 07:06 PepsRyuu