Build failure from `HOTP` and `TOTP` checking `Sendable`

I just now started seeing these build failure errors related to a Sendable requirement:

error: stored property 'key' of 'Sendable'-conforming struct 'HOTP' has non-sendable type 'SymmetricKey'
2025-11-04T19:55:45.9929020Z 128 | /// See `TOTP` for time-based one-time passwords.
2025-11-04T19:55:46.0030070Z 129 | public struct HOTP: OTP, Sendable {
2025-11-04T19:55:46.0131070Z 130 |     let key: SymmetricKey
2025-11-04T19:55:46.0232220Z     |         `- error: stored property 'key' of 'Sendable'-conforming struct 'HOTP' has non-sendable type 'SymmetricKey'
2025-11-04T19:55:46.0333350Z 131 |     let digits: OTPDigits
2025-11-04T19:55:46.0434330Z 132 |     let digest: OTPDigest
2025-11-04T19:55:46.0513530Z 
2025-11-04T19:55:46.0632390Z CryptoKit.SymmetricKey:2:15: note: struct 'SymmetricKey' does not conform to the 'Sendable' protocol
2025-11-04T19:55:46.0748450Z 1 | @available(iOS 13.0, macOS 10.15, watchOS 6.0, tvOS 13.0, *)
2025-11-04T19:55:46.0873420Z 2 | public struct SymmetricKey : ContiguousBytes {
2025-11-04T19:55:46.0995870Z   |               `- note: struct 'SymmetricKey' does not conform to the 'Sendable' protocol
2025-11-04T19:55:46.1118280Z 3 |     public func withUnsafeBytes<R>(_ body: (UnsafeRawBufferPointer) throws -> R) rethrows -> R
2025-11-04T19:55:46.1219720Z 4 |     public init<D>(data: D) where D : ContiguousBytes

FWIW I see these failures when building from:

  • Xcode 16.0
  • Xcode 16.1
  • Xcode 16.2

I am currently not seeing these failures when building from:

  • Xcode 16.3
  • Xcode 16.4
  • Xcode 26.0
  • Xcode 26.1

This was building from macOS 15.7.1 and Vapor 4.118.0.

I didn't see any issues on the repo that looked related… have we tracked something similar before?

FWIW my build jobs from macOS 15.6 and Vapor 4.117.0 were not failing.

Yeah this is an issue with Swift 6.0 on macOS with differing Sendable annotations in CryptoKit. See Fix a couple of import issues by 0xTim · Pull Request #3390 · vapor/vapor · GitHub which should fix it

1 Like