Xcode 14 Beta 3 is constantly getting an error with WeatherKit

In the simulator with Xcode 14 beta 3, any request to WeatherKit results in the following error:

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

I haven't had a single request succeed. Has anyone else encounter this?

Post not yet marked as solved Up vote post of tomcomer Down vote post of tomcomer
4.7k views
  • This is still happening with beta 4.

  • I'm seeing similar issue, now with Xcode 15 beta.4. Has anyone else found a way to make WeatherKit work with 15.4?

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

Add a Comment

Replies

I was getting 401 errors yesterday with beta 2. Today, with beta 3 I am getting the following error:

Error Domain=AMSErrorDomain Code=12 "Mescal Failed" UserInfo={NSLocalizedDescription=Mescal Failed, NSLocalizedFailureReason=SAPInit failed: -42049}

The WeatherKit Capability and App Service have been added to the Identifier, as well as adding the Capability in Xcode, so I believe it should be all set as far as that goes.

  • I started getting the Code=12 "Mescal Failed" error a couple of minutes ago. It was working fine a few hours ago. I searched Google and there is not a whole lot about this error other than this post. I'm using Xcode 14 b3 building on simulators.

    Update: I started running my app on an iPhone 8 Plus running iOS 16 b1 and I am not getting the error. In the simulator, I can toggle between simulated locations and I get the error. Try using a physical device running iOS 16 b1+. Good luck!

Add a Comment

I seem to be getting the error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors with Xcode 14 beta 3, but it only seems to happen in SwiftUI live previews.

Simulators and devices work fine for me.

  • Follow up: I'm seeing the WDSJWTAuthenticatorServiceListener error on any new device I run the app on. If I had run my app on a device with beta 2, it works, but on any new device that I didn't previously run the app on, it doesn't work.

    It feels like it's only working with tokens generated with beta 2 right now?

  • Yep, that is what it seems like to me too. Maybe the server changes are trailing the betas.

  • Were you able to get passed this issue? It is still happening for me.

I'm getting this:https://developer.apple.com/forums/thread/709578

@dbireta same error for me with beta 3 on simulator

I, too, am getting a Mescal Failed error in Xcode 14.0 beta 3, on an iPhone 13 Pro Simulator running iOS 16.0.

Running on iPhone hardware isn't an option at the moment since iOS 16 dropped iPod Touch support :-(

2022-07-23 16:57:21.378850-0400 WeatherWhereWhen[6919:297098] [WeatherService] Encountered an error when fetching weather data subset; location=<+42.27033310,-71.65005180> +/- 0.00m (speed -1.00 mps / course -1.00) @ 7/23/22, 4:57:21 PM Eastern Daylight Time,  error=Error Domain=AMSErrorDomain Code=12 "Mescal Failed" UserInfo={NSLocalizedDescription=Mescal Failed, NSLocalizedFailureReason=SAPInit failed: -42049}

I'm seeing the same issue in the simulator with Xcode 14 Beta 3. This code worked just fine in Beta 2, and I seem to recall it working just fine right after Beta 3 was release. The last week however it seems to have just stopped working.

I'm having the same problem currently when running on the simulator ! The problem is showing on a project created from scratch and configured but also on the sample project after following the configuration steps. Is this something temporary ? does anybody know if it's more related to Beta 3 maybe ?

  • I just tried with the Beta 2 and everything worked fine, switching back to Beta 3 after that things started working normally so not sure what's going on but that'll do it

Add a Comment

Beta 4 doesn't seem to fix this for me.

Encountering the same Mescal Failed error. Running with Xcode 14.0 Beta 3 and iPhone 13 Pro (iOS 16.0) simulator

error=Error Domain=AMSErrorDomain Code=12 "Mescal Failed" UserInfo={NSLocalizedDescription=Mescal Failed, NSLocalizedFailureReason=SAPInit failed: -42049}

This issues persists in beta 4. It worked briefly this morning, but this afternoon I get the error below. Interestingly it happens for a new build. The build I installed this morning on my test device still works.

[AuthService] Failed to generate jwt token for: com.apple.weatherkit.authservice with error: Error Domain=AMSErrorDomain Code=12 "Mescal Failed" UserInfo={NSLocalizedDescription=Mescal Failed, NSLocalizedFailureReason=SAPInit failed: -42049}

Same issue on beta 4. Not sure what I'm missing but can't seem to get this to work, pretty frustrating. I saw someone on Twitter say upgrading to macOS 13 beta fixed it for them, but that's not something I want to do on my personal machine right now.

  • Here's the tweet! https://twitter.com/AtarayoSD/status/1553208286115430403

  • Yep - trying to avoid that for now. Was hoping to be able to just mess around with WeatherKit on Monterey. ☹️

Add a Comment

Only seems to be working for me on a physical device being built from a mac running the OS beta.

Same issue is still present in b5. No way to get a valid result. Everything is correctly configured and with b2 we was able to get results on sim, running Xcode14b2. Now we receive always the following

2022-08-10 23:25:32.849941+0200 Where To[42790:8192039] [WeatherService] Encountered an error when fetching weather data subset; location=<+41.91643209,+12.52443409> +/- 0.00m (speed -1.00 mps / course -1.00) @ 10/08/22, 23:25:29 Ora legale dell’Europa centrale,  error=xpcConnectionFailed(Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.weatherkit.authservice" UserInfo={NSDebugDescription=connection to service named com.apple.weatherkit.authservice})

Same problem in beta 6. No WeatherKit on the Simulator. :(

Ugh, the Xcode RC build didn't fix this for me :( I'm still getting WDSJWTAuthenticatorServiceListener errors. It works on iOS devices and in a macOS app, it just doesn't work in the simulator.