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

Azure trusted signing error #8738

Open
Kitenite opened this issue Dec 11, 2024 · 1 comment
Open

Azure trusted signing error #8738

Kitenite opened this issue Dec 11, 2024 · 1 comment

Comments

@Kitenite
Copy link

  • Electron-Builder Version: 25.1.8
  • Node Version: 20
  • Electron Version: 33.2.1
  • Electron Type (current, beta, nightly): current
  • Electron updater Version: ^6.3.4
  • Target: Windows

I'm running into a very opaque error on github actions using version 25.1.8:
Invoke-TrustedSigning: Cannot process argument transformation on parameter 'FilesFolder'. Cannot convert value to type System.String.

I've added my env variables using this guide.

My env variables are confirmed created and seem valid.

echo "AZURE_TENANT_ID=${{ secrets.AZURE_TENANT_ID }}" >> $GITHUB_ENV
echo "AZURE_CLIENT_ID=${{ secrets.AZURE_CLIENT_ID }}" >> $GITHUB_ENV
echo "AZURE_CLIENT_SECRET=${{ secrets.AZURE_CLIENT_SECRET }}" >> $GITHUB_ENV

I've also set up my config as well

win: {
        target: [
            {
                target: 'nsis',
                arch: ['x64'],
            },
        ],
        signtoolOptions: {
            publisherName: 'On Off, Inc',
        },
        artifactName: '${productName}-setup.${ext}',
        azureSignOptions: {
            publisherName: 'On Off, Inc',
            codeSigningAccountName: 'trusted-onlook',
            certificateProfileName: 'public-trust-onlook',
            endpoint: 'https://eus.codesigning.azure.net',
        },
    },

The error:

 • signing with Azure Trusted Signing (beta)  path=release\0.1.4-beta\win-unpacked\Onlook.exe
  • installing required module (TrustedSigning) with scope CurrentUser
  • verifying env vars for authenticating to Microsoft Entra ID
  • Above command failed, retrying 3 more times
  ⨯ Exit code: 1. Command failed: pwsh.exe -NoProfile -NonInteractive -Command Invoke-TrustedSigning -FileDigest SHA256 -publisherName On Off, Inc -Endpoint https://eus.codesigning.azure.net/ -CertificateProfileName public-trust-onlook -CodeSigningAccountName trusted-onlook -Files D:\a\onlook\onlook\apps\studio\release\0.1.4-beta\win-unpacked\Onlook.exe
Invoke-TrustedSigning: Cannot process argument transformation on parameter 'FilesFolder'. Cannot convert value to type System.String.

Invoke-TrustedSigning: Cannot process argument transformation on parameter 'FilesFolder'. Cannot convert value to type System.String.
  failedTask=build stackTrace=Error: Exit code: 1. Command failed: pwsh.exe -NoProfile -NonInteractive -Command Invoke-TrustedSigning -FileDigest SHA256 -publisherName On Off, Inc -Endpoint https://eus.codesigning.azure.net/ -CertificateProfileName public-trust-onlook -CodeSigningAccountName trusted-onlook -Files D:\a\onlook\onlook\apps\studio\release\0.1.4-beta\win-unpacked\Onlook.exe
Invoke-TrustedSigning: Cannot process argument transformation on parameter 'FilesFolder'. Cannot convert value to type System.String.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Invoke-TrustedSigning: Cannot process argument transformation on parameter 'FilesFolder'. Cannot convert value to type System.String.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               at D:\a\onlook\onlook\node_modules\builder-util\src\util.ts:138:18
    at ChildProcess.exithandler (node:child_process:430:5)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1104:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

Full stack trace

@rotu
Copy link
Contributor

rotu commented Dec 18, 2024

Command failed: pwsh.exe -NoProfile -NonInteractive -Command Invoke-TrustedSigning -FileDigest SHA256 -publisherName On Off, Inc -Endpoint https://eus.codesigning.azure.net/ -CertificateProfileName public-trust-onlook -CodeSigningAccountName trusted-onlook -Files D:\a\onlook\onlook\apps\studio\release\0.1.4-beta\win-unpacked\Onlook.exe

I think it's choking on the comma and/or spaces in the publisher name "On Off, Inc"

const paramsString = Object.entries(params)
.filter(([_, value]) => value != null)
.reduce((res, [field, value]) => {
return [...res, `-${field}`, value]
}, [] as string[])
.join(" ")
await vm.exec(ps, ["-NoProfile", "-NonInteractive", "-Command", `Invoke-TrustedSigning ${paramsString}`])

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