WildCat's Blog

Electron Builder Error Spawn UNKNOWN on Windows running with gitlab-runner

On GitLab Runner for Windows, when we bundle Electron apps using electron-builder, it sometimes show this error:

• packaging       platform=win32 arch=x64 electron=27.1.3 appOutDir=dist\win-unpacked
  • signing
  ⨯ spawn UNKNOWN   failedTask=build stackTrace=Error: spawn UNKNOWN

This means the current user does not have the permission to run codesign.

To work around this problem, we can change the user of the gitlab-runner service from the default account to your account account.