Skip to content

Error building on Linux: The process '/usr/bin/gpg' failed with exit code 2 #694

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

Open
EmilioOjeda opened this issue Apr 8, 2025 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@EmilioOjeda
Copy link

Describe the bug

Action randomly (sometimes it works, sometimes it fails) fails by producing this error (+log):

Run swift-actions/setup-swift@v2
  with:
    swift-version: 6.0
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
Error: Unexpected error, unable to continue. Please report at https://github.com/swift-actions/setup-swift/issues
The process '/usr/bin/gpg' failed with exit code 2
Stacktrace:
Error: The process '/usr/bin/gpg' failed with exit code 2
    at ExecState._setResult (/home/runner/work/_actions/swift-actions/setup-swift/v2/dist/index.js:3195:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/swift-actions/setup-swift/v2/dist/index.js:3178:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/swift-actions/setup-swift/v2/dist/index.js:3072:27)

Workflow configuration (please complete the following information):

  • Action version (uses): swift-actions/setup-swift@v2
  • Platform (runs-on): ubuntu-24.04
  • Swift version (swift-version): "6.0"
@EmilioOjeda EmilioOjeda added the bug Something isn't working label Apr 8, 2025
@sortingbubbles
Copy link

Experiencing the same issue, only in our case the action seems to always fail with that same error.

@gmazzo
Copy link

gmazzo commented Apr 9, 2025

Is there any workaround for this?

@aterreno
Copy link

aterreno commented Apr 9, 2025

same

@wei18
Copy link

wei18 commented Apr 12, 2025

FYI, I have attached the additional logs.

/usr/bin/gpg --import /home/runner/work/_temp/5b4a47c5-8671-4d85-82a9-1ae3422a1e00
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key D441C977412B37AD: public key "Swift Automatic Signing Key #1 <[email protected]>" imported
gpg: key 9F597F4D[21](https://github.com/Wei18/github-rest-api-swift-openapi/actions/runs/14321049882/job/40137871004?pr=110#step:3:24)A56D5F: public key "Swift 2.2 Release Signing Key <[email protected]>" imported
gpg: key 63BC1CFE91D306C6: public key "Swift 3.x Release Signing Key <[email protected]>" imported
gpg: key EF5430F071E1B[23](https://github.com/Wei18/github-rest-api-swift-openapi/actions/runs/14321049882/job/40137871004?pr=110#step:3:26)5: public key "Swift 4.x Release Signing Key <[email protected]>" imported
gpg: key 7638F1FB2B2B08C4: public key "Swift Automatic Signing Key #2 <[email protected]>" imported
gpg: key 925CC1CCED3D1561: public key "Swift 5.x Release Signing Key <[email protected]>" imported
gpg: key FAF6989E1BC16FEA: public key "Swift Automatic Signing Key #3 <[email protected]>" imported
gpg: key 9[25](https://github.com/Wei18/github-rest-api-swift-openapi/actions/runs/14321049882/job/40137871004?pr=110#step:3:28)CC1CCED3D1561: "Swift 5.x Release Signing Key <[email protected]>" 1 new signature
gpg: key F167DF1ACF9CE069: public key "Swift Automatic Signing Key #4 <[email protected]>" imported
gpg: key 925CC1CCED3D1561: "Swift 5.x Release Signing Key <[email protected]>" 1 new signature
gpg: key F167DF1ACF9CE069: "Swift Automatic Signing Key #4 <[email protected]>" 1 new signature
gpg: key EF80A866B47A981F: public key "Swift 6.x Release Signing Key <[email protected]>" imported
gpg: Total number processed: 12
gpg:               imported: 9
gpg:         new signatures: 3
/usr/bin/gpg --keyserver hkp://keyserver.ubuntu.com --refresh-keys Swift
gpg: refreshing 9 keys from hkp://keyserver.ubuntu.com
gpg: key EF80A866B47A981F: "Swift 6.x Release Signing Key <[email protected]>" not changed
gpg: key F167DF1ACF9CE069: "Swift Automatic Signing Key #4 <[email protected]>" not changed
gpg: key FAF6989E1BC16FEA: "Swift Automatic Signing Key #3 <[email protected]>" not changed
gpg: key 925CC1CCED3D1561: "Swift 5.x Release Signing Key <[email protected]>" not changed
gpg: key 7638F1FB2B2B08C4: "Swift Automatic Signing Key #2 <[email protected]>" not changed
gpg: key EF54[30](https://github.com/Wei18/github-rest-api-swift-openapi/actions/runs/14321049882/job/40137871004?pr=110#step:3:33)F071E1B235: "Swift 4.x Release Signing Key <[email protected]>" not changed
gpg: key 63BC1CFE91D306C6: "Swift 3.x Release Signing Key <[email protected]>" not changed
gpg: key 9F597F4D21A56D5F: "Swift 2.2 Release Signing Key <[email protected]>" not changed
gpg: key D441C977412B37AD: "Swift Automatic Signing Key #1 <[email protected]>" not changed
gpg: Total number processed: 9
gpg:              unchanged: 9
Error: Unexpected error, unable to continue. Please report at https://github.com/swift-actions/setup-swift/issues
Unexpected HTTP response: 404
Stacktrace:
Error: Unexpected HTTP response: 404
    at /home/runner/work/_actions/swift-actions/setup-swift/v2/dist/index.js:48[31](https://github.com/Wei18/github-rest-api-swift-openapi/actions/runs/14321049882/job/40137871004?pr=110#step:3:34):25
    at Generator.next (<anonymous>)
    at fulfilled (/home/runner/work/_actions/swift-actions/setup-swift/v2/dist/index.js:4741:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

beeauvin added a commit to beeauvin/Sable that referenced this issue Apr 18, 2025
I'll check back on this later and see if we can get other versions working. A bit out of scope rn. Anyway see: [setup-swift](swift-actions/setup-swift#694)
beeauvin added a commit to beeauvin/Sable that referenced this issue Apr 18, 2025
* ci(github): first pass at github actions to test
I was planning on getting CI setup before merging into main anyway but wasn't hella worried about it. Then I did the thing with the package being broken on release and decided to make this priority. I've not used actions with swifft before though so this is an attempt based on past experience and the GitHub swift actions guide: https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-swift

* fix(ci): gotta use the correct tag syntax babe

* deps(ci:setup-swift): current version is broken for linux
I'll check back on this later and see if we can get other versions working. A bit out of scope rn. Anyway see: [setup-swift](swift-actions/setup-swift#694)
@fwal
Copy link
Collaborator

fwal commented Apr 24, 2025

Is this issue still there for 2.3.0?

@BasinPhoto
Copy link

Yes, it is still there

@tomsci
Copy link

tomsci commented Apr 27, 2025

Assuming swift-actions/setup-swift@v2 will pick up 2.3, yes it seems to be - eg this run from just now: https://github.com/tomsci/LuaSwift/actions/runs/14690274685/job/41224555124?pr=11

@BasinPhoto
Copy link

But if you retry to run it several times — it works!

@fwal
Copy link
Collaborator

fwal commented Apr 27, 2025

I'm adding a setting for skipping gpg in the 3.0 rewrite, I'll se if I can patch 2.x until then...

haxtibal added a commit to haxtibal/tree-sitter-robot that referenced this issue Apr 29, 2025
The tests try to instantiate a parser with language = robot in each of
the supported programming languages.

The workflow reuses jobs from tree-sitter/parser-test-action [1].

Following tests work
- bindings/python/tests
- bindings/go/binding_test.go
- bindings/node/binding_test.js

Following tests don't work yet and are skipped for now.
- bindings/rust/lib.rs
- bindings/swift/TreeSitterRobotTests, failing due to known bug in
  swift-actions/setup-swift#694

[1] https://github.com/tree-sitter/parser-test-action.git
[2] swift-actions/setup-swift#694
haxtibal added a commit to haxtibal/tree-sitter-robot that referenced this issue Apr 29, 2025
The tests try to instantiate a parser with language = robot in each of
the supported programming languages.

The workflow reuses jobs from tree-sitter/parser-test-action [1].

Following tests work
- bindings/python/tests
- bindings/go/binding_test.go
- bindings/node/binding_test.js

Following tests don't work yet and are skipped for now.
- bindings/rust/lib.rs
- bindings/swift/TreeSitterRobotTests, failing due to known bug in
  swift-actions/setup-swift#694

[1] https://github.com/tree-sitter/parser-test-action.git
[2] swift-actions/setup-swift#694
haxtibal added a commit to haxtibal/tree-sitter-robot that referenced this issue Apr 29, 2025
The tests try to instantiate a parser with language = robot in each of
the supported programming languages.

The workflow reuses jobs from tree-sitter/parser-test-action [1].

Following tests work
- bindings/python/tests
- bindings/go/binding_test.go
- bindings/node/binding_test.js

Following tests don't work yet and are skipped for now.
- bindings/rust/lib.rs
- bindings/swift/TreeSitterRobotTests, failing due to known bug in
  swift-actions/setup-swift#694

[1] https://github.com/tree-sitter/parser-test-action.git
[2] swift-actions/setup-swift#694
haxtibal added a commit to haxtibal/tree-sitter-robot that referenced this issue Apr 29, 2025
The tests try to instantiate a parser with language = robot in each of
the supported programming languages.

The workflow reuses jobs from tree-sitter/parser-test-action [1].

Following tests work
- bindings/python/tests
- bindings/go/binding_test.go
- bindings/node/binding_test.js

Following tests don't work yet and are skipped for now.
- bindings/rust/lib.rs
- bindings/swift/TreeSitterRobotTests, failing due to known bug in
  swift-actions/setup-swift#694

[1] https://github.com/tree-sitter/parser-test-action.git
[2] swift-actions/setup-swift#694
haxtibal added a commit to haxtibal/tree-sitter-robot that referenced this issue Apr 29, 2025
The tests try to instantiate a parser with language = robot in each of
the supported programming languages.

The workflow reuses jobs from tree-sitter/parser-test-action [1].

Following tests work
- bindings/python/tests
- bindings/go/binding_test.go
- bindings/node/binding_test.js

Following tests don't work yet and are skipped for now.
- bindings/rust/lib.rs
- bindings/swift/TreeSitterRobotTests, failing due to known bug in
  swift-actions/setup-swift#694

[1] https://github.com/tree-sitter/parser-test-action.git
[2] swift-actions/setup-swift#694
haxtibal added a commit to haxtibal/tree-sitter-robot that referenced this issue Apr 29, 2025
This workflow reuses jobs from tree-sitter/parser-test-action [1].

The tests try to instantiate a parser with language = robot in each of
the supported programming languages.

Executed tests:
- bindings/go/binding_test.go
- bindings/node/binding_test.js
- bindings/rust/lib.rs
- bindings/python/tests

Skipped:
- bindings/swift/TreeSitterRobotTests, failing due to known bug in
  swift-actions/setup-swift#694

[1] https://github.com/tree-sitter/parser-test-action.git
[2] swift-actions/setup-swift#694
haxtibal added a commit to haxtibal/tree-sitter-robot that referenced this issue Apr 29, 2025
This workflow reuses jobs from tree-sitter/parser-test-action [1].

The tests try to instantiate a parser with language = robot in each of
the supported programming languages.

Executed tests:
- bindings/go/binding_test.go
- bindings/node/binding_test.js
- bindings/rust/lib.rs
- bindings/python/tests

Skipped:
- bindings/swift/TreeSitterRobotTests, failing due to known bug in
  swift-actions/setup-swift#694

[1] https://github.com/tree-sitter/parser-test-action.git
[2] swift-actions/setup-swift#694
haxtibal added a commit to haxtibal/tree-sitter-robot that referenced this issue Apr 29, 2025
This workflow reuses jobs from tree-sitter/parser-test-action [1], as
it's done by other tree-sitter hosted bindings. See tree-sitter-rust for
example [2].

The tests try to instantiate a parser with language = robot in each of
the supported programming languages.

Executed tests:
- tree-sitter generate
- tree-sitter test
- bindings/go/binding_test.go
- bindings/node/binding_test.js
- bindings/rust/lib.rs
- bindings/python/tests

Skipped:
- bindings/swift/TreeSitterRobotTests, failing due to known bug in
  swift-actions/setup-swift#694 [3]

[1] https://github.com/tree-sitter/parser-test-action.git
[2] https://github.com/tree-sitter/tree-sitter-rust/blob/v0.24.0/.github/workflows/ci.yml
[3] swift-actions/setup-swift#694
tomsci added a commit to tomsci/LuaSwift that referenced this issue May 3, 2025
@kkostov
Copy link

kkostov commented May 5, 2025

I also encountered this issue in one of the https://github.com/TootSDK/TootSDK pipelines. However, I noticed that Swift 6.1 is currently included in the ubuntu-latest / ubuntu-24.04 runner images.

So if the default version is suitable for a use case, the work-around would be to remove the setup-swift action and fallback to the tool chain supplied with the image.

cf. https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants