WeatherKit Error Code 2 – JWT auth fails on device despite correct entitlements

Hey,

I've been banging my head against this for a few days now and genuinely can't figure out if it's something on my end or an Apple backend issue.

My app has WeatherKit integrated and it works fine in the simulator, but on my physical device I consistently get this in the console:

Failed to generate jwt token for: com.apple.weatherkit.authservice Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"

Things I've already tried and ruled out:

  • WeatherKit capability is enabled in the App ID on developer.apple.com ✓
  • com.apple.developer.weatherkit = true is in the entitlements file ✓
  • Removed and re-added the capability in Xcode Signing & Capabilities ✓
  • Clean Build Folder, fresh install on device ✓
  • The location coordinates are valid (hardcoded lat/lon in Bavaria) ✓

The weird part is that it's not a location issue — Error Code 2 from WDSJWTAuthenticatorServiceListener suggests the JWT generation itself is failing before any location lookup even happens. I've had this App ID since early this year, WeatherKit was working at some point, and I'm not sure what changed.

My fallback to Open-Meteo works fine so the app isn't broken, but I'd like to actually use the API I'm paying for.

I also opened a support ticket but got redirected to the forums, so here I am.

Anyone else seen this recently or know if there's something on the provisioning side I'm missing?

Answered by DTS Engineer in 894626022

I’ve been seeing a lot of folks with problems like this and they all seem to be caused by a common issue: Enabling the WeatherKit capability on the App ID but not the WeatherKit app service. For WeatherKit to work, you have to do both.

To check the WeatherKit capability, view your App ID and, at the top, select the Capabilities tab.

Then scroll down and confirm that the WeatherKit capability is enabled:

To check the WeatherKit app service, go back to the top of the App ID page, switch to the App Services tab and check that WeatherKit is enabled:

You have to do both.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

I’ve been seeing a lot of folks with problems like this and they all seem to be caused by a common issue: Enabling the WeatherKit capability on the App ID but not the WeatherKit app service. For WeatherKit to work, you have to do both.

To check the WeatherKit capability, view your App ID and, at the top, select the Capabilities tab.

Then scroll down and confirm that the WeatherKit capability is enabled:

To check the WeatherKit app service, go back to the top of the App ID page, switch to the App Services tab and check that WeatherKit is enabled:

You have to do both.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Wow, thanks—that worked right away! Thank you so much for the great help! Next time, I'll post here first before opening a ticket.

WeatherKit Error Code 2 – JWT auth fails on device despite correct entitlements
 
 
Q