Skip to content

Signing in GitHub Action fails with obscure error code #1043

Description

@Grannath

Describe the bug
I need to sign an application built with the Rust framework Tauri. It has a GitHub Action that supports arbitrary commands for signing Windows executables. I've set it up to call this tool through a Powershell script.

I have tested the script locally and by calling it directly in a GitHub action. Both cases work fine. When I call the Azure CLI inside the Powershell script, it can log in fine as well. But the sign tool fails with an error -2147012894. This only happens when called by Tauri, not when I call the script directly.

For technical reasons, I have to use client id and client secret as environment variables for login. I cannot say if other methods work. I have confirmed that the variables are present and the values are valid.

Repro steps
I cannot point you to our internal repo, unfortunately. And I don't have a personal Azure account to set up a working example.

To set this up, build a Tauri application on GitHub using this action. Configure the app to use this sign tool as a custom sign command.

Expected behavior
Signing works also for Tauri applications.

Actual behavior
Signing fails with error -2147012894

Additional context
Logs from a run:

info: Sign.Core.ISigner[0]
      Submitting D:\a\my-app\my-app\target\x86_64-pc-windows-msvc\release\wix\x64\wix\WixUIExtension.dll for signing.
info: Sign.Core.ISigner[0]
      SignAsync called for D:\a\my-app\my-app\target\x86_64-pc-windows-msvc\release\wix\x64\wix\WixUIExtension.dll. Using C:\Users\runneradmin\AppData\Local\Temp\lu4c4tah.z2w\xqvyglkm.dll locally.
info: Sign.Core.IDataFormatSigner[0]
      Signing SignTool job with 1 files.
info: Sign.Core.IDataFormatSigner[0]
      Signing C:\Users\runneradmin\AppData\Local\Temp\lu4c4tah.z2w\xqvyglkm.dll.
fail: Sign.Core.IDataFormatSigner[0]
      Signing failed with error -2147012894.
info: Sign.Core.IDataFormatSigner[0]
      Performing attempt #2 of 3 attempts after 5 s.
info: Sign.Core.IDataFormatSigner[0]
      Signing C:\Users\runneradmin\AppData\Local\Temp\lu4c4tah.z2w\xqvyglkm.dll.
fail: Sign.Core.IDataFormatSigner[0]
      Signing failed with error -2147012894.
info: Sign.Core.IDataFormatSigner[0]
      Performing attempt #3 of 3 attempts after 11.1803398 s.
info: Sign.Core.IDataFormatSigner[0]
      Signing C:\Users\runneradmin\AppData\Local\Temp\lu4c4tah.z2w\xqvyglkm.dll.
fail: Sign.Core.IDataFormatSigner[0]
      Signing failed with error -2147012894.
fail: Sign.Core.IDataFormatSigner[0]
      Failed to sign. Attempts exceeded.
fail: Sign.Core.ISigner[0]
      Failed to sign. Attempts exceeded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions