Getting WeatherKit error WeatherDaemon.WDSJWTAuthenticatorService.Errors

I am looking into the possibility of adding WeatherKit support to one of my apps. I have added the WeatherKit capability to my app and can see it up in the App ID configuration, the bundle ID is marked as explicit.

I waited overnight just in case, but I keep just getting the following error when I run on a real device:

Error Domain=WeatherDaemon.WDSJWTAuthenticatorService.Errors Code=1 "(null)"

This app has been in the store for years, so I know the rest of the configuration should be fine. What am I missing?

Accepted Reply

Ok, multiple problems:

  1. AppID issues, resolved by Apple
  2. Needed to update add WeatherKit to Capability and App Services in Identifiers up on App Store website
  3. Needed to install updated provisioning profiles (debug and release)

Now I am able to get responses from the API!!!!

  • I also had to wait about 20 minutes after perfoming the same steps as you before the API started working.

  • I want to profusely thank you for sharing these tips AND for putting that section in bold. It's what finally made me realize that I only had it enabled in one of the tabs.

  • Thank you, this seems to be the only place on the internet mentioning that there are two tabs I needed to look in!

Replies

I have the same issue.

[WeatherService] Encountered an error when fetching weather data subset; location=<+37.32299800,-122.03218100> +/- 0.00m (speed -1.00 mps / course -1.00) @ 27.07.22, 15:23:08 Central European Summer Time,  error=Error Domain=WeatherDaemon.WDSJWTAuthenticatorService.Errors Code=1 "(null)"

Error Domain=WeatherDaemon.WDSJWTAuthenticatorService.Errors Code=1 "(null)"

I'm getting the similar error on the iOS simulator, both with beta 3 and beta 4. Similar thread here: https://developer.apple.com/forums/thread/709807

In my case, the error code is 0:

[WeatherService] Encountered an error when fetching weather data subset; location=<+41.16107900,-104.80545000> +/- 5.00m (speed -1.00 mps / course -1.00) @ 7/27/22, 1:38:11 PM Mountain Daylight Time,  error=Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=0 "(null)"

Not sure if you're having any other targets that use the WeatherKit data, but did you make sure you've enabled WeatherKit in Capabilities in your project and the App Services tap in the developer portal for all targets?

Because I was fighting this issue for a while and then realized I didn't enable it for my widget Bundle ID in the developer portal, haha

I checked that and it's not the issue. There is a issue where I have different "App ID Prefix" values between my main app and extensions caused by the age of my developer account. Apparently in the olden days the App ID Prefix was not the Team ID. I have contacted Apple and they are looking into fixing the issues (as per an old Tech Note).

  • Apple unified my App ID prefix for all my apps/extension - but that did not seem to help the situation. The only difference is now the "Code" is 1 instead of 0.

  • I am getting another warning in addition to the same one as before. 2022-08-16 11:26:06.756397-0700 ItsAlmostTime[851:215502] [AuthService] Failed to generate jwt token for: com.apple.weatherkit.authservice with error: Error Domain=WeatherDaemon.WDSJWTAuthenticatorService.Errors Code=1 "(null)"

Add a Comment

Ok, multiple problems:

  1. AppID issues, resolved by Apple
  2. Needed to update add WeatherKit to Capability and App Services in Identifiers up on App Store website
  3. Needed to install updated provisioning profiles (debug and release)

Now I am able to get responses from the API!!!!

  • I also had to wait about 20 minutes after perfoming the same steps as you before the API started working.

  • I want to profusely thank you for sharing these tips AND for putting that section in bold. It's what finally made me realize that I only had it enabled in one of the tabs.

  • Thank you, this seems to be the only place on the internet mentioning that there are two tabs I needed to look in!

I hope it's not too late to jump on this thread. I'm having a similar issue (except RC=0). I'm macOS, not iOS.

In Xcode I have WeatherKit included in Signing and Capabilities:

In my developer account, https://developer.apple.com/account/resources/services/list, I have WeatherKit listed.

The one thing I notice, my account key is listed as 7**... whereas in Xcode my signing certificate is listed as 4V7...

The code runs fine in Xcode. However when I move to a Mac does is not registered as a developer machine, I get the error: The operation couldn’t be completed. (WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors error 0.)

I am building via a shell script using the 7** account: xcrun notarytool store-credentials --apple-id "..." --team-id "7**..." --password "..." notary-scriptingosx

Thanks.