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?

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 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.

@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 ?

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

This is still happening with beta 4.

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.

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.

This is also happening for me. I noticed that in the Console, the following error appeared from com.apple.weatherkit.authservice:

Failed to retrieve application-identifier from SecTask. This typically indicates that the process is missing the application-identifier entitlement. It must match the process' bundle identifier. This is a client-issue. Check the crash report for the Coalition process. PID: 34670

I've double-checked that my provisioning profile does include the application-identifier entitlement (which is the only place this particular entitlement appears, as far as I can tell).

Interestingly if I download the FlightPlanner sample app from the developer documentation, I get an entirely different error:

2022-09-13 19:06:54.349898-0400 FlightPlanner[34598:380317] [WeatherService] Encountered an error when fetching weather data subset; location=<+42.56030000,+18.26220000> +/- 0.00m (speed -1.00 mps / course -1.00) @ 9/13/22, 7:06:54 PM Eastern Daylight Time,  error=Error Domain=AMSErrorDomain Code=12 "Mescal Failed" UserInfo={NSLocalizedDescription=Mescal Failed, NSLocalizedFailureReason=SAPInit failed: -42049}

I made sure to carefully follow the directions listed in the developer documentation, and waited well more than 30 minutes between creating the App ID and running the app.

The Console has a bunch of different messages & errors:

Retrieved application-identifier from SecTask: applicationID=XXX...XXXXXX.FlightPlanner
Processed teamID from application-identifier: teamIDIsValid=YES bundleID=XXXXXX.FlightPlanner
AMSMescalFairPlay: [AA41C52C] Init failed: { Error domain=AMSErrorDomain, code=12
Error while creating local signature. requestIdentifier=3E73E504-550D-44F5-8940-BD272B02B10E, error=Error Domain=AMSErrorDomain Code=12 "Mescal Failed" UserInfo={NSLocalizedDescription=Mescal Failed, NSLocalizedFailureReason=SAPInit failed: -42049}

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)"

Xcode 14 Beta 3 is constantly getting an error with WeatherKit
 
 
Q