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: A parameter cannot be found that matches parameter name 'CodeSigningCert'. #8055

Closed
stoefln opened this issue Feb 16, 2024 · 5 comments

Comments

@stoefln
Copy link

stoefln commented Feb 16, 2024

  • Electron-Builder Version: v24.9.1 and also v24.13.0
  • Node Version: v16.13
  • Electron Version: v12.2.3
  • Electron Type (current, beta, nightly): ?
  • Target: Windows

This is the error message I get. My github workflow worked until 3 or 4 weeks ago, then yesterday I ran into this problem:

2024-02-16T10:34:14.3511549Z ##[group]Run npm run package:win 
2024-02-16T10:34:14.3512107Z �[36;1mnpm run package:win �[0m
2024-02-16T10:34:14.3551589Z shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
2024-02-16T10:34:14.3552190Z env:
2024-02-16T10:34:14.3552773Z   SIGNTOOL_PATH: C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x86/signtool.exe
2024-02-16T10:34:14.3553643Z   ED_SIGNTOOL_THUMBPRINT: 4128C616E64B525A6B53FA87A67EEBD74FFFDD17
2024-02-16T10:34:14.3554298Z   ED_SIGNTOOL_SUBJECT_NAME: my name
2024-02-16T10:34:14.3554744Z ##[endgroup]
2024-02-16T10:34:15.8590327Z 
2024-02-16T10:34:15.8590704Z > MyApp@1.4.99 package:win
2024-02-16T10:34:15.8592047Z > cross-env DEBUG=electron-builder electron-builder build --win --x64  --publish never --config electron-builder.json
2024-02-16T10:34:15.8592813Z 
2024-02-16T10:34:16.5846876Z   • electron-builder  version=24.9.1 os=10.0.20348
2024-02-16T10:34:16.6074159Z   • loaded configuration  file=D:\a\MyApp-studio\MyApp-studio\electron-builder.json
2024-02-16T10:34:16.6135068Z   • effective config  config=directories:
2024-02-16T10:34:16.6136715Z   output: dist
2024-02-16T10:34:16.6137205Z   buildResources: build
2024-02-16T10:34:16.6137740Z appId: app.MyApp
2024-02-16T10:34:16.6138221Z productName: MyApp
2024-02-16T10:34:16.6139116Z asar: false
2024-02-16T10:34:16.6139619Z protocols:
2024-02-16T10:34:16.6140030Z   name: MyApp
2024-02-16T10:34:16.6140444Z   schemes:
2024-02-16T10:34:16.6141190Z     - MyApp
2024-02-16T10:34:16.6141604Z extraMetadata:
2024-02-16T10:34:16.6142013Z   name: MyApp
2024-02-16T10:34:16.6142418Z   productName: MyApp
2024-02-16T10:34:16.6142942Z   description: Simplified
2024-02-16T10:34:16.6143476Z dmg:
2024-02-16T10:34:16.6144001Z   artifactName: MyApp_for_mac_${version}_${arch}.dmg
2024-02-16T10:34:16.6144609Z   contents:
2024-02-16T10:34:16.6145034Z     - x: 110
2024-02-16T10:34:16.6145454Z       'y': 210
2024-02-16T10:34:16.6146097Z     - x: 440
2024-02-16T10:34:16.6146939Z       'y': 210
2024-02-16T10:34:16.6147533Z       type: link
2024-02-16T10:34:16.6148210Z       path: /Applications
2024-02-16T10:34:16.6148716Z nsis:
2024-02-16T10:34:16.6149242Z   artifactName: MyApp_for_win_${version}.exe
2024-02-16T10:34:16.6149820Z   oneClick: 'false'
2024-02-16T10:34:16.6150485Z   allowToChangeInstallationDirectory: 'true'
2024-02-16T10:34:16.6151089Z msi:
2024-02-16T10:34:16.6151569Z   artifactName: MyApp_for_win_${version}.msi
2024-02-16T10:34:16.6152191Z   oneClick: 'false'
2024-02-16T10:34:16.6152602Z files:
2024-02-16T10:34:16.6153021Z   - filter:
2024-02-16T10:34:16.6153527Z       - app/batchViewer/compiled
2024-02-16T10:34:16.6154082Z       - static/**
2024-02-16T10:34:16.6154558Z       - '!static/*js.map'
2024-02-16T10:34:16.6155059Z       - apk/**
2024-02-16T10:34:16.6155634Z       - minicap/jni/minicap-shared/aosp/libs/**
2024-02-16T10:34:16.6156287Z       - minicap/libs/**
2024-02-16T10:34:16.6156793Z       - minitouch/libs/**
2024-02-16T10:34:16.6157430Z       - '!node_modules/node-native-ocr/cc/**'
2024-02-16T10:34:16.6158193Z       - '!node_modules/node-native-ocr/leptonica/**'
2024-02-16T10:34:16.6158973Z       - '!node_modules/node-native-ocr/libjpeg/**'
2024-02-16T10:34:16.6159734Z       - '!node_modules/node-native-ocr/scripts/**'
2024-02-16T10:34:16.6160496Z       - '!node_modules/node-native-ocr/tesseract/**'
2024-02-16T10:34:16.6161259Z       - '!node_modules/node-native-ocr/tessdata/**'
2024-02-16T10:34:16.6162018Z       - '!node_modules/opencv4nodejs-m1/cc/**'
2024-02-16T10:34:16.6162596Z mac:
2024-02-16T10:34:16.6162993Z   target: default
2024-02-16T10:34:16.6163641Z   category: public.app-category.developer-tools
2024-02-16T10:34:16.6164383Z   icon: static/app-icon-mac.icns
2024-02-16T10:34:16.6164921Z   hardenedRuntime: true
2024-02-16T10:34:16.6165444Z   gatekeeperAssess: false
2024-02-16T10:34:16.6166020Z   entitlements: build/entitlements.mac.plist
2024-02-16T10:34:16.6166723Z   entitlementsInherit: build/entitlements.mac.plist
2024-02-16T10:34:16.6169957Z   extendInfo:
2024-02-16T10:34:16.6170930Z     NSMicrophoneUsageDescription: In order to test audio via MyApp, you need to grant access to your microphone.
2024-02-16T10:34:16.6171936Z   files:
2024-02-16T10:34:16.6172509Z     - resources/platform-tools-osx/**
2024-02-16T10:34:16.6173050Z win:
2024-02-16T10:34:16.6173535Z   icon: static/app-icon-win.ico
2024-02-16T10:34:16.6174034Z   target:
2024-02-16T10:34:16.6174452Z     - nsis
2024-02-16T10:34:16.6174857Z   signingHashAlgorithms:
2024-02-16T10:34:16.6175345Z     - sha256
2024-02-16T10:34:16.6175806Z   publisherName: my name
2024-02-16T10:34:16.6176337Z   signAndEditExecutable: true
2024-02-16T10:34:16.6176839Z   extraResources:
2024-02-16T10:34:16.6177406Z     - from: /Windows/system32/CONCRT140.dll
2024-02-16T10:34:16.6177984Z       to: ../
2024-02-16T10:34:16.6178519Z     - from: /Windows/system32/MSVCP140.dll
2024-02-16T10:34:16.6179066Z       to: ../
2024-02-16T10:34:16.6179615Z     - from: /Windows/system32/VCRUNTIME140.dll
2024-02-16T10:34:16.6180179Z       to: ../
2024-02-16T10:34:16.6180563Z   files:
2024-02-16T10:34:16.6181065Z     - resources/platform-tools-win/**
2024-02-16T10:34:16.6181676Z   certificateSubjectName: my name
2024-02-16T10:34:16.6182400Z   certificateSha1: 4128C616E64B525A6B53FA87A67EEBD74FFFDD17
2024-02-16T10:34:16.6183071Z npmRebuild: false
2024-02-16T10:34:16.6183492Z publish:
2024-02-16T10:34:16.6183899Z   provider: github
2024-02-16T10:34:16.6184551Z   releaseType: draft
2024-02-16T10:34:16.6185284Z   owner: ***
2024-02-16T10:34:16.6185774Z   repo: MyApp-releases
2024-02-16T10:34:16.6186242Z deb:
2024-02-16T10:34:16.6186594Z   fpm: []
2024-02-16T10:34:16.6186856Z 
2024-02-16T10:34:16.8584398Z   • skipped dependencies rebuild  reason=npmRebuild is set to false
2024-02-16T10:34:16.8586594Z   • packaging       platform=win32 arch=x64 electron=12.2.3 appOutDir=dist\win-unpacked
2024-02-16T10:34:16.8612447Z   • spawning        command=D:\a\MyApp-studio\MyApp-studio\node_modules\app-builder-bin\win\x64\app-builder.exe unpack-electron --configuration [{"platform":"win32","arch":"x64","version":"12.2.3"}] --output D:\a\MyApp-studio\MyApp-studio\dist\win-unpacked --distMacOsAppName Electron.app
2024-02-16T10:34:17.4496272Z   • map async       taskCount=2
2024-02-16T10:34:17.4497215Z   • map async       taskCount=1
2024-02-16T10:34:17.6791802Z   • computing effective URL  initialUrl=https://github.com/electron/electron/releases/download/v12.2.3/electron-v12.2.3-win32-x64.zip
2024-02-16T10:34:17.6797005Z                              currentUrl=https://objects.githubusercontent.com/github-production-release-asset-2e65be/9384267/62f7b3f7-5fd8-41ed-af24-ef7f528e0045?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240216%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240216T103417Z&X-Amz-Expires=300&X-Amz-Signature=473f740da1903c3f274f7ce1e116d02cfac87d848239d6ef41fc322c2f848272&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=9384267&response-content-disposition=attachment%3B%20filename%3Delectron-v12.2.3-win32-x64.zip&response-content-type=application%2Foctet-stream
2024-02-16T10:34:17.8576793Z   • downloading     url=https://github.com/electron/electron/releases/download/v12.2.3/electron-v12.2.3-win32-x64.zip length=82748864 contentType=application/octet-stream
2024-02-16T10:34:17.8581444Z   • downloading     url=https://github.com/electron/electron/releases/download/v12.2.3/electron-v12.2.3-win32-x64.zip size=83 MB parts=4
2024-02-16T10:34:17.8582718Z   • map async       taskCount=4
2024-02-16T10:34:17.8586800Z   • download part   range=bytes=62061648-82748863 index=3
2024-02-16T10:34:17.8587887Z   • download part   range=bytes=0-20687215 index=0
2024-02-16T10:34:17.8588945Z   • download part   range=bytes=20687216-41374431 index=1
2024-02-16T10:34:17.8589933Z   • download part   range=bytes=41374432-62061647 index=2
2024-02-16T10:34:18.3841764Z   • downloaded      url=https://github.com/electron/electron/releases/download/v12.2.3/electron-v12.2.3-win32-x64.zip duration=935ms
2024-02-16T10:34:18.3849749Z   • map async       taskCount=73
2024-02-16T10:34:20.1499939Z   • exited          command=app-builder.exe code=0 pid=1680
2024-02-16T10:34:20.1541282Z   • asar usage is disabled — this is strongly not recommended  solution=enable asar and use asarUnpack to unpack files that must be externally available
2024-02-16T10:34:20.2316623Z   • spawning        command=D:\a\MyApp-studio\MyApp-studio\node_modules\app-builder-bin\win\x64\app-builder.exe node-dep-tree --dir D:\a\MyApp-studio\MyApp-studio
2024-02-16T10:34:20.2484113Z   • unresolved deps  unresolved=http nodeModuleDir=D:\a\MyApp-studio\MyApp-studio\node_modules round=0
2024-02-16T10:34:20.2485972Z   • unresolved deps  unresolved=follow-redirects nodeModuleDir=D:\a\MyApp-studio\MyApp-studio\node_modules round=0
2024-02-16T10:34:20.2503454Z   • unresolved deps  unresolved=@sentry/browser@sentry/core@sentry/node@sentry/types@sentry/utilsdeepmergelru_map nodeModuleDir=D:\a\MyApp-studio\MyApp-studio\node_modules round=0
2024-02-16T10:34:20.2518526Z   • unresolved deps  unresolved=agent-base nodeModuleDir=D:\a\MyApp-studio\MyApp-studio\node_modules round=0
2024-02-16T10:34:20.2541684Z   • unresolved deps  unresolved=native-node-utilsrun-script-osbindings nodeModuleDir=D:\a\MyApp-studio\MyApp-studio\node_modules round=0
2024-02-16T10:34:20.2546595Z   • unresolved deps  unresolved=console-control-stringsset-blocking nodeModuleDir=D:\a\MyApp-studio\MyApp-studio\node_modules round=0
2024-02-16T10:34:20.2549837Z   • unresolved deps  unresolved=delegates nodeModuleDir=D:\a\MyApp-studio\MyApp-studio\node_modules round=0
2024-02-16T10:34:20.2552673Z   • unresolved deps  unresolved=inheritsstring_decoderutil-deprecate nodeModuleDir=D:\a\MyApp-studio\MyApp-studio\node_modules round=0
2024-02-16T10:34:20.2563615Z   • unresolved deps  unresolved=has-unicodewide-alignaprobacolor-supportconsole-control-stringsobject-assignsignal-exit nodeModuleDir=D:\a\MyApp-studio\MyApp-studio\node_modules round=0
2024-02-16T10:34:20.2570097Z   • unresolved deps  unresolved=strip-ansi nodeModuleDir=D:\a\MyApp-studio\MyApp-studio\node_modules round=0
2024-02-16T10:34:20.2581773Z   • unresolved deps  unresolved=mdurluc.microlinkify-it nodeModuleDir=D:\a\MyApp-studio\MyApp-studio\node_modules round=0
2024-02-16T10:34:20.2588998Z   • unresolved deps  unresolved=babel-runtime nodeModuleDir=D:\a\MyApp-studio\MyApp-studio\node_modules round=0
2024-02-16T10:34:20.2593140Z   • unresolved deps  unresolved=core-js nodeModuleDir=D:\a\MyApp-studio\MyApp-studio\node_modules round=0
2024-02-16T10:34:20.2651652Z   • exited          command=app-builder.exe code=0 pid=6492 out=[{"dir":"D:\\a\\MyApp-studio\\MyApp-studio\\node_modules","deps":[{"name":"@sentry-internal/tracing","version":"7.68.0"},{"name":"@sentry/browser","version":"7.68.0"},{"name":"@sentry/core","version":"7.68.0"},{"name":"@sentry/electron","version":"4.11.0"},{"name":"@sentry/node","version":"7.68.0"},{"name":"@sentry/replay","version":"7.68.0"},{"name":"@sentry/types","version":"7.68.0"},{"name":"@sentry/utils","version":"7.68.0"},{"name":"agent-base","version":"6.0.2"},{"name":"ansi-regex","version":"2.1.1"},{"name":"anymatch","version":"3.1.2"},{"name":"aproba","version":"1.2.0"},{"name":"babel-runtime","version":"6.26.0"},{"name":"bcryptjs","version":"2.4.3"},{"name":"binary-extensions","version":"2.2.0"},{"name":"bindings","version":"1.5.0"},{"name":"braces","version":"3.0.2"},{"name":"call-bind","version":"1.0.2"},{"name":"chokidar","version":"3.5.1"},{"name":"code-point-at","version":"1.1.0"},{"name":"color-support","version":"1.1.3"},{"name":"console-control-strings","version":"1.1.0"},{"name":"cookie","version":"0.4.2"},{"name":"core-js","version":"2.6.12"},{"name":"cron-parser","version":"3.5.0"},{"name":"deepmerge","version":"4.3.0"},{"name":"define-properties","version":"1.1.3"},{"name":"delegates","version":"1.0.0"},{"name":"file-uri-to-path","version":"1.0.0"},{"name":"fill-range","version":"7.0.1"},{"name":"follow-redirects","version":"1.14.9"},{"name":"function-bind","version":"1.1.1"},{"name":"ga4-mp","version":"1.0.3"},{"name":"get-intrinsic","version":"1.1.1"},{"name":"glob-parent","version":"5.1.2"},{"name":"has","version":"1.0.3"},{"name":"has-symbols","version":"1.0.2"},{"name":"has-unicode","version":"2.0.1"},{"name":"http","version":"0.0.1-security"},{"name":"https-proxy-agent","version":"5.0.1"},{"name":"inherits","version":"2.0.4"},{"name":"is-binary-path","version":"2.1.0"},{"name":"is-extglob","version":"2.1.1"},{"name":"is-fullwidth-code-point","version":"1.0.0"},{"name":"is-glob","version":"4.0.1"},{"name":"is-nan","version":"1.3.2"},{"name":"is-number","version":"7.0.0"},{"name":"linkify-it","version":"4.0.1"},{"name":"long-timeout","version":"0.1.1"},{"name":"lru_map","version":"0.3.3"},{"name":"luxon","version":"1.28.1"},{"name":"markdown-it","version":"13.0.1"},{"name":"mdurl","version":"1.0.1"},{"name":"monaco-editor","version":"0.33.0"},{"name":"nan","version":"2.14.2"},{"name":"native-node-utils","version":"0.2.7"},{"name":"node-native-ocr","version":"0.2.0"},{"name":"node-schedule","version":"2.1.0"},{"name":"normalize-path","version":"3.0.0"},{"name":"number-is-nan","version":"1.0.1"},{"name":"object-assign","version":"4.1.1"},{"name":"object-keys","version":"1.1.1"},{"name":"opencv4nodejs-m1","version":"1.0.0"},{"name":"picomatch","version":"2.3.0"},{"name":"readdirp","version":"3.5.0"},{"name":"run-script-os","version":"1.1.6"},{"name":"safe-buffer","version":"5.1.2"},{"name":"set-blocking","version":"2.0.0"},{"name":"signal-exit","version":"3.0.7"},{"name":"sorted-array-functions","version":"1.3.0"},{"name":"string-width","version":"1.0.2"},{"name":"string_decoder","version":"1.1.1"},{"name":"strip-ansi","version":"3.0.1"},{"name":"to-regex-range","version":"5.0.1"},{"name":"tslib","version":"1.14.1"},{"name":"uc.micro","version":"1.0.6"},{"name":"util-deprecate","version":"1.0.2"},{"name":"wide-align","version":"1.1.3"},{"name":"ws","version":"8.5.0"}]},{"dir":"D:\\a\\MyApp-studio\\MyApp-studio\\node_modules\\agent-base\\node_modules","deps":[{"name":"debug","version":"4.3.2"},{"name":"ms","version":"2.1.2"}]},{"dir":"D:\\a\\MyApp-studio\\MyApp-studio\\node_modules\\babel-runtime\\node_modules","deps":[{"name":"regenerator-runtime","version":"0.11.1"}]},{"dir":"D:\\a\\MyApp-studio\\MyApp-studio\\node_modules\\ga4-mp\\node_modules","deps":[{"name":"axios","version":"0.21.4"}]},{"dir":"D:\\a\\MyApp-studio\\MyApp-studio\\node_modules\\https-proxy-agent\\node_modules","deps":[{"name":"debug","version":"4.3.2"},{"name":"ms","version":"2.1.2"}]},{"dir":"D:\\a\\MyApp-studio\\MyApp-studio\\node_modules\\markdown-it\\node_modules","deps":[{"name":"argparse","version":"2.0.1"},{"name":"entities","version":"3.0.1"}]},{"dir":"D:\\a\\MyApp-studio\\MyApp-studio\\node_modules\\node-native-ocr\\node_modules","deps":[{"name":"node-addon-api","version":"3.1.0"}]},{"dir":"D:\\a\\MyApp-studio\\MyApp-studio\\node_modules\\opencv4nodejs-m1\\node_modules","deps":[{"name":"ansi-regex","version":"5.0.1"},{"name":"are-we-there-yet","version":"2.0.0"},{"name":"emoji-regex","version":"8.0.0"},{"name":"gauge","version":"3.0.2"},{"name":"is-fullwidth-code-point","version":"3.0.0"},{"name":"nan","version":"2.15.0"},{"name":"npmlog","version":"5.0.1"},{"name":"readable-stream","version":"3.6.0"},{"name":"string-width","version":"4.2.3"},{"name":"strip-ansi","version":"6.0.1"}]},{"dir":"D:\\a\\MyApp-studio\\MyApp-studio\\node_modules\\@sentry\\electron\\node_modules","deps":[{"name":"tslib","version":"2.5.3"}]}]
2024-02-16T10:34:20.9057686Z   • executing       file=powershell.exe args=-NoProfile -NonInteractive -Command Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Property Subject,PSParentPath,Thumbprint | ConvertTo-Json -Compress
2024-02-16T10:34:21.4214706Z   • async task error  error=Exit code: 1. Command failed: powershell.exe -NoProfile -NonInteractive -Command Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Property Subject,PSParentPath,Thumbprint | ConvertTo-Json -Compress
2024-02-16T10:34:21.4218407Z Get-ChildItem : A parameter cannot be found that matches parameter name 'CodeSigningCert'.
2024-02-16T10:34:21.4220309Z At line:1 char:30
2024-02-16T10:34:21.4221557Z + Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Proper ...
2024-02-16T10:34:21.4222318Z +                              ~~~~~~~~~~~~~~~~
2024-02-16T10:34:21.4223437Z     + CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
2024-02-16T10:34:21.4224666Z     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
2024-02-16T10:34:21.4226298Z                         Get-ChildItem : A parameter cannot be found that matches parameter name 'CodeSigningCert'.
2024-02-16T10:34:21.4227086Z At line:1 char:30
2024-02-16T10:34:21.4228060Z + Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Proper ...
2024-02-16T10:34:21.4228979Z +                              ~~~~~~~~~~~~~~~~
2024-02-16T10:34:21.4229848Z     + CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
2024-02-16T10:34:21.4231040Z     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
2024-02-16T10:34:21.4231872Z                         
2024-02-16T10:34:21.4233696Z   • async task error  error=Exit code: 1. Command failed: powershell.exe -NoProfile -NonInteractive -Command Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Property Subject,PSParentPath,Thumbprint | ConvertTo-Json -Compress
2024-02-16T10:34:21.4236015Z Get-ChildItem : A parameter cannot be found that matches parameter name 'CodeSigningCert'.
2024-02-16T10:34:21.4236778Z At line:1 char:30
2024-02-16T10:34:21.4237480Z + Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Proper ...
2024-02-16T10:34:21.4238200Z +                              ~~~~~~~~~~~~~~~~
2024-02-16T10:34:21.4239038Z     + CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
2024-02-16T10:34:21.4240223Z     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
2024-02-16T10:34:21.4241566Z                         Get-ChildItem : A parameter cannot be found that matches parameter name 'CodeSigningCert'.
2024-02-16T10:34:21.4242328Z At line:1 char:30
2024-02-16T10:34:21.4243025Z + Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Proper ...
2024-02-16T10:34:21.4243747Z +                              ~~~~~~~~~~~~~~~~
2024-02-16T10:34:21.4244578Z     + CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
2024-02-16T10:34:21.4245755Z     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
2024-02-16T10:34:21.4246609Z                         
2024-02-16T10:34:21.4248363Z   • async task error  error=Exit code: 1. Command failed: powershell.exe -NoProfile -NonInteractive -Command Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Property Subject,PSParentPath,Thumbprint | ConvertTo-Json -Compress
2024-02-16T10:34:21.4250415Z Get-ChildItem : A parameter cannot be found that matches parameter name 'CodeSigningCert'.
2024-02-16T10:34:21.4251164Z At line:1 char:30
2024-02-16T10:34:21.4251851Z + Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Proper ...
2024-02-16T10:34:21.4252570Z +                              ~~~~~~~~~~~~~~~~
2024-02-16T10:34:21.4253400Z     + CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
2024-02-16T10:34:21.4254577Z     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
2024-02-16T10:34:21.4255928Z                         Get-ChildItem : A parameter cannot be found that matches parameter name 'CodeSigningCert'.
2024-02-16T10:34:21.4256695Z At line:1 char:30
2024-02-16T10:34:21.4257385Z + Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Proper ...
2024-02-16T10:34:21.4259163Z +                              ~~~~~~~~~~~~~~~~
2024-02-16T10:34:21.4260018Z     + CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
2024-02-16T10:34:21.4261227Z     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
2024-02-16T10:34:21.4262095Z                         
2024-02-16T10:34:21.4263868Z   • async task error  error=Exit code: 1. Command failed: powershell.exe -NoProfile -NonInteractive -Command Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Property Subject,PSParentPath,Thumbprint | ConvertTo-Json -Compress
2024-02-16T10:34:21.4265938Z Get-ChildItem : A parameter cannot be found that matches parameter name 'CodeSigningCert'.
2024-02-16T10:34:21.4266696Z At line:1 char:30
2024-02-16T10:34:21.4267399Z + Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Proper ...
2024-02-16T10:34:21.4268129Z +                              ~~~~~~~~~~~~~~~~
2024-02-16T10:34:21.4268973Z     + CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
2024-02-16T10:34:21.4270148Z     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
2024-02-16T10:34:21.4271505Z                         Get-ChildItem : A parameter cannot be found that matches parameter name 'CodeSigningCert'.
2024-02-16T10:34:21.4272262Z At line:1 char:30
2024-02-16T10:34:21.4273148Z + Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Proper ...
2024-02-16T10:34:21.4273878Z +                              ~~~~~~~~~~~~~~~~
2024-02-16T10:34:21.4274738Z     + CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
2024-02-16T10:34:21.4275962Z     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
2024-02-16T10:34:21.4276833Z                         
2024-02-16T10:34:21.4278671Z   • async task error  error=Exit code: 1. Command failed: powershell.exe -NoProfile -NonInteractive -Command Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Property Subject,PSParentPath,Thumbprint | ConvertTo-Json -Compress
2024-02-16T10:34:21.4290916Z Get-ChildItem : A parameter cannot be found that matches parameter name 'CodeSigningCert'.
2024-02-16T10:34:21.4291720Z At line:1 char:30
2024-02-16T10:34:21.4292441Z + Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Proper ...
2024-02-16T10:34:21.4293197Z +                              ~~~~~~~~~~~~~~~~
2024-02-16T10:34:21.4294042Z     + CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
2024-02-16T10:34:21.4295227Z     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
2024-02-16T10:34:21.4296577Z                         Get-ChildItem : A parameter cannot be found that matches parameter name 'CodeSigningCert'.
2024-02-16T10:34:21.4297336Z At line:1 char:30
2024-02-16T10:34:21.4298033Z + Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Proper ...
2024-02-16T10:34:21.4298782Z +                              ~~~~~~~~~~~~~~~~
2024-02-16T10:34:21.4299624Z     + CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
2024-02-16T10:34:21.4300801Z     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
2024-02-16T10:34:21.4301639Z                         
2024-02-16T10:34:21.4504628Z   • async task error  error=Cannot cleanup: 
2024-02-16T10:34:21.4505831Z                         Error #1 --------------------------------------------------------------------------------
2024-02-16T10:34:21.4508203Z Error: Exit code: 1. Command failed: powershell.exe -NoProfile -NonInteractive -Command Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Property Subject,PSParentPath,Thumbprint | ConvertTo-Json -Compress
2024-02-16T10:34:21.4510338Z Get-ChildItem : A parameter cannot be found that matches parameter name 'CodeSigningCert'.
2024-02-16T10:34:21.4511581Z At line:1 char:30
2024-02-16T10:34:21.4512945Z + Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Proper ...
2024-02-16T10:34:21.4513829Z +                              ~~~~~~~~~~~~~~~~
2024-02-16T10:34:21.4514807Z     + CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
2024-02-16T10:34:21.4516842Z     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
2024-02-16T10:34:21.4518626Z                         Get-ChildItem : A parameter cannot be found that matches parameter name 'CodeSigningCert'.
2024-02-16T10:34:21.4519828Z At line:1 char:30
2024-02-16T10:34:21.4520855Z + Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Proper ...
2024-02-16T10:34:21.4521897Z +                              ~~~~~~~~~~~~~~~~
2024-02-16T10:34:21.4522885Z     + CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
2024-02-16T10:34:21.4524209Z     + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
2024-02-16T10:34:21.4525885Z                             at D:\a\MyApp-studio\MyApp-studio\node_modules\electron-builder\node_modules\builder-util\src\util.ts:134:18
2024-02-16T10:34:21.4527073Z     at ChildProcess.exithandler (node:child_process:404:5)
2024-02-16T10:34:21.4527811Z     at ChildProcess.emit (node:events:390:28)
2024-02-16T10:34:21.4528749Z     at maybeClose (node:internal/child_process:1064:16)
2024-02-16T10:34:21.4529657Z     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
2024-02-16T10:34:21.4530782Z                         Error #2 --------------------------------------------------------------------------....

@stoefln
Copy link
Author

stoefln commented Feb 16, 2024

Might be related: #7729

@mmaietta
Copy link
Collaborator

Not sure what changed, as it sounds related to your build/CI environment changing, not electron-builder internally.

Also looking at #7729 (comment) and your error log

shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"

You should be using powershell.exe from what the linked comment states

@stoefln
Copy link
Author

stoefln commented Feb 17, 2024

@mmaietta interesting, thanks for your comment! Somehow I missed that obvious part! Even more interesting: I am not calling pwsh.EXE myself, it seems to be called automatically when this command is executed: npm run package:win
The npm script contains this: electron-builder build --win --x64 --publish never --config electron-builder.json

Now I tried to eliminate the npm script call and directly pasted the line into the action. Like this:

      - name: Build App
        run: |
          ./node_modules/.bin/electron-builder --publish never --config electron-builder.json -w ${{ steps.config.outputs.build-args }}

However, the error stays the same. It seems github just defaults to pwsh.EXE.

@stoefln
Copy link
Author

stoefln commented Feb 17, 2024

Solved!
I don't know if you consider this an electron-builder bug. But it took me many frustrating hours to find a solution.

This works:

- name: Build App
        shell: powershell
        run: |
          ./node_modules/.bin/electron-builder --publish never --config electron-builder.json -w ${{ steps.config.outputs.build-args }}

@mmaietta
Copy link
Collaborator

Glad to hear you got it resolved!

BlackHole1 added a commit to BlackHole1/electron-builder that referenced this issue Jul 29, 2024
BlackHole1 added a commit to BlackHole1/electron-builder that referenced this issue Jul 29, 2024
BlackHole1 added a commit to BlackHole1/electron-builder that referenced this issue Jul 29, 2024
BlackHole1 added a commit to BlackHole1/electron-builder that referenced this issue Jul 30, 2024
BlackHole1 added a commit to BlackHole1/electron-builder that referenced this issue Jul 31, 2024
mmaietta pushed a commit that referenced this issue Jul 31, 2024
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