setup-swift: Unexpected error, unable to continue. Please report (gpg: no valid OpenPGP data found.)
Describe the bug Please see this report
Workflow configuration (please complete the following information):
- Action version (
uses): swift-actions/setup-swift@v1 - Platform (
runs-on): ubuntu-latest - Swift version (
swift-version): 5.8
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 2
- Comments: 21 (1 by maintainers)
Commits related to this issue
- Try to workaround https://github.com/swift-actions/setup-swift/issues/591 Try to suppress random gpg failures — committed to hylo-lang/hylo by dabrahams 10 months ago
- Run format check on MacOS; setup-swift seems unreliable on Linux. This analysis <https://github.com/swift-actions/setup-swift/issues/591#issuecomment-1684602660> explains why I think it will work. A... — committed to hylo-lang/hylo by dabrahams 10 months ago
- Use a different action to setup swift on Linux. (#908) An attempt to stomp out the spurious format-check failures we've been seeing, that [die in setup-swift](https://github.com/swift-actions/setup-s... — committed to hylo-lang/hylo by dabrahams 10 months ago
- Use the swift docker image to run format check. See https://github.com/swift-actions/setup-swift/issues/591#issuecomment-1685710678 — committed to hylo-lang/hylo by dabrahams 10 months ago
- Run CI in a Docker container for now To work around https://github.com/swift-actions/setup-swift/issues/591 — committed to fwcd/swift-utils by fwcd 6 months ago
- https://github.com/swift-actions/setup-swift/issues/591#issuecomment-1685710678 — committed to pointfreeco/swift-case-paths by stephencelis 5 months ago
- Upgrade to macOS 14 CI (#146) * Upgrade to macOS 14 CI * https://github.com/swift-actions/setup-swift/issues/591#issuecomment-1685710678 * wip * wip * wip * Update ci.yml — committed to pointfreeco/swift-case-paths by stephencelis 5 months ago
- Make: Workaround for Swift CI https://github.com/swift-actions/setup-swift/issues/591#issuecomment-1685710678 — committed to ashvardanian/StringZilla by ashvardanian 5 months ago
- Build: Released 1.0.0 [skip ci] # 1.0.0 (2024-02-06) ### Add * `_sz_find_3byte_serial` ([d542c4b](https://github.com/ashvardanian/stringzilla/commit/d542c4b3a7430efb0dc5745ee390921b385fec13)), clos... — committed to ashvardanian/StringZilla by semantic-release-bot 5 months ago
- Build: Released 1.0.0 [skip ci] # 1.0.0 (2024-02-06) ### Add * `_sz_find_3byte_serial` ([d542c4b](https://github.com/ashvardanian/stringzilla/commit/d542c4b3a7430efb0dc5745ee390921b385fec13)), clos... — committed to ashvardanian/StringZilla by semantic-release-bot 5 months ago
- Stop using the setup-swift action https://github.com/swift-actions/setup-swift/issues/591 — committed to swiftwasm/carton by kateinoigakukun 3 months ago
- Stop using the setup-swift action https://github.com/swift-actions/setup-swift/issues/591 — committed to swiftwasm/carton by kateinoigakukun 3 months ago
- Stop using the setup-swift action https://github.com/swift-actions/setup-swift/issues/591 — committed to swiftwasm/carton by kateinoigakukun 3 months ago
- Stop using the setup-swift action https://github.com/swift-actions/setup-swift/issues/591 — committed to swiftwasm/carton by kateinoigakukun 3 months ago
- Stop using the setup-swift action https://github.com/swift-actions/setup-swift/issues/591 — committed to swiftwasm/carton by kateinoigakukun 3 months ago
- Avoid a redirect to verification keys Fix #591 — committed to pfusik/setup-swift by pfusik 3 months ago
- [test] Try a fix for https://github.com/swift-actions/setup-swift/issues/591 — committed to fusionlanguage/fut by pfusik 3 months ago
@dabrahams in the mean time if you’re looking for another workaround that doesn’t involve skipping the signature verification, you could consider using the
swiftDocker image in your action workflow:This is as fast as using
swift-actions/setup-swift, taking around 30s to initialize the containerGentle bump: this is breaking CI for Hylo.
I did some debugging of a failing workflow run using action-tmate and it turns out the swift.org server compresses the response, so the file being downloaded is actually gzipped, which is why it cannot be imported in gpg. The same happens in my terminal:
I tried forcing the server to send an uncompressed response by setting
accept-encoding: identityand by settingaccept-encoding: gzip;q=0but both attempts still yielded a gzipped response.What I don’t get is why this happens intermittently. It’s as if some of the swift.org servers are misconfigured and therefore some send a compressed response while others don’t, which is why the action is able to succeed every now and then.
This also makes fixing the bug a little bit annoying: since there is no way of knowing whether the response is compressed or not, the action should first check the file information and then decompress if needed.
I suspect the same issue occurs when the action is able to download the signing keys but then fails to verify the signature file; probably the signature file response is gzipped as well.