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 3 years ago
- Reactions: 4
- Comments: 24 (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 3 years 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 3 years 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 3 years 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 3 years 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 3 years ago
- https://github.com/swift-actions/setup-swift/issues/591#issuecomment-1685710678 — committed to pointfreeco/swift-case-paths by stephencelis 3 years 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 3 years ago
- Make: Workaround for Swift CI https://github.com/swift-actions/setup-swift/issues/591#issuecomment-1685710678 — committed to ashvardanian/StringZilla by ashvardanian 3 years 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 3 years 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 3 years ago
- Stop using the setup-swift action https://github.com/swift-actions/setup-swift/issues/591 — committed to swiftwasm/carton by kateinoigakukun 3 years ago
- Stop using the setup-swift action https://github.com/swift-actions/setup-swift/issues/591 — committed to swiftwasm/carton by kateinoigakukun 3 years ago
- Stop using the setup-swift action https://github.com/swift-actions/setup-swift/issues/591 — committed to swiftwasm/carton by kateinoigakukun 3 years ago
- Stop using the setup-swift action https://github.com/swift-actions/setup-swift/issues/591 — committed to swiftwasm/carton by kateinoigakukun 3 years ago
- Stop using the setup-swift action https://github.com/swift-actions/setup-swift/issues/591 — committed to swiftwasm/carton by kateinoigakukun 3 years ago
- Avoid a redirect to verification keys Fix #591 — committed to pfusik/setup-swift by pfusik 3 years ago
- [test] Try a fix for https://github.com/swift-actions/setup-swift/issues/591 — committed to fusionlanguage/fut by pfusik 3 years ago
- Avoid a redirect to verification keys Fix #591 — committed to fwcd/setup-swift by pfusik 3 years ago
- Use patched setup-swift to fix CI installation of Swift For details, see - https://github.com/swift-actions/setup-swift/issues/591 - https://github.com/swift-actions/setup-swift/pull/680 — committed to fwcd/swiftplot by fwcd 2 years 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 containerWe were affected by this as well, and very frequently since yesterday. Following the excellent @sanderploegsma’s investigation I tried this, and I can confirm it worked in our case.
I don’t think it’s really PR worthy (it probably does not work on Windows, it doesn’t have any tests, and requires
gunzipbeing installed instead of relying on some npm library), but at least it confirms what was found out previously on this issue. Maybe someone else can pick this up to do a proper PR? Typescript’s not my strong suit, and I cannot devote too much time to it at the moment.You can try it out using
redsun82/setup-swift@b2b6f77ab14f6a9b136b520dc53ec8eca27d2b99, if it helps 🙂Gentle bump: this is breaking CI for Hylo.
@pfusik this is not a setup-swift bug, although perhaps setup-swift could work around it. The place to agitate for a fix is here.
This is open for two years now. What’s the status?
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.