WeatherKit error on iOS 17 - macOS 14

Hi I upgraded my Mac to test the new os and iOS 17. But I have problems with the weather kit on the app.

WeatherKit enabled as app service and capability there was no issue with the iOS 16.

What could be the problem?

import Foundation
import WeatherKit

class WeatherKitManager: ObservableObject {
    @Published var weather: Weather?
    @Published var isFetchingWeather = false
    
    func getWeather(latitude: Double, longitude: Double) async {
        do {
            let receivedWeather = try await WeatherService.shared.weather(for: .init(latitude: latitude, longitude: longitude))
            DispatchQueue.main.async {
                self.weather = receivedWeather
            }
        } catch {
            fatalError("\(error)")
        }
    }
    
    var symbol: String {
        weather?.currentWeather.symbolName ?? "xmark.app"
    }
    
    var temp: String {
        if let temp = weather?.currentWeather.temperature.converted(to: .celsius) {
            let formattedTemp = String(format: "%.1f", temp.value)
            return "\(formattedTemp)°C"
        } else {
            return "Yükleniyor..."
        }
    }
}

Errors here

Ceyehat/WeatherKitManager.swift:22: Fatal error: Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"
Failed to generate jwt token for: com.apple.weatherkit.authservice with error: Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"
Encountered an error when fetching weather data subset; location=<+37.78583400,-122.40641700> +/- 0.00m (speed -1.00 mps / course -1.00) @ 06/06/2023, 5:32:55 PM GMT+03:00,  error=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors 2 Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"

I've been seeing this too and also starting to get support email as as more people move on to the beta. Really hope this can be resolved before volumes start to increase with the public beta. Also filed a radar 12561778 and am happy to provide more details if helpful, but the error messages I'm seeing are exactly as reported above and trivial to reproduce.

Same issue. Hoping Apple will fix soon as I now also start getting user feedback.

I'm seeing the same issue. I created a minimal WeatherKit app and it runs fine on Xcode 15 beta 4 using a iOS 16.4 simulator. On an iOS 17 beta 3 simulator it fails with the following error message:

Aborting silent interpolation: missing cached hourlyForecast; location=CLLocationCoordinate2D(latitude: 35.157019886059835, longitude: -85.34119394760656)
Failed to generate jwt token for: com.apple.weatherkit.authservice with error: Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"
Encountered an error when fetching weather data subset; location=<+35.15701989,-85.34119395> +/- 0.00m (speed -1.00 mps / course -1.00) @ 7/13/23, 8:29:48 PM Eastern Daylight Time,  error=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors 2 Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"

I've filed this as feedback FB12602396

This continues to fail for me on Xcode 15 beta 4 on the iOS 17 simulator.

Same authentication error to the WeatherService.

As of iOS 17 beta 4, WeatherKit appears to be returning data for the daily WeatherQuery again on device. In previous betas this always returned an empty array for me, but did not produce an error.

I'm also no longer seeing the com.apple.weatherkit.authservice error when building in the simulator with Xcode 15 beta 5.

THANK YOU, WEATHERKIT TEAM!

This appears to now work on Xcode 15/iOS 17 beta 5.

I'm running into this issue on Xcode 15 beta 7. It's the first time I've used WeatherKit. I've wasted a couple of hours banging my head, asking where I went wrong in the setup. I guess this will go into the backlog. 😥

Actually, I'm not 100% sure it's related to this but seems like it:

Aborting silent interpolation: additional missing products that need to be fetched from the server anyway; location=CLLocationCoordinate2D(latitude: 34.177833894365044, longitude: -84.1331046257825), missing products=[WeatherDaemon.WeatherProduct.currentWeather, WeatherDaemon.WeatherProduct.forecastNextHour, WeatherDaemon.WeatherProduct.forecastHourly, WeatherDaemon.WeatherProduct.forecastDaily, WeatherDaemon.WeatherProduct.weatherAlerts, WeatherDaemon.WeatherProduct.airQuality]
Failed to generate jwt token for: com.apple.weatherkit.authservice with error: Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"
Encountered an error when fetching weather data subset; location=<+34.17783389,-84.13310463> +/- 3210.23m (speed 0.00 mps / course 0.00) @ 8/27/23, 11:23:51 AM Eastern Daylight Time,  error=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors 2 Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"

I am very first time to use WeatherKit eventhough 8 years experience as of 73 year old programmer. I faced same error, but I was missing to check two tags on the following instructions; the mistakeI took was the last instruction on NOTE, which is App Capability tag. Please check again two tags, App Services tag and App Capability tag.

Configure app services WeatherKit WeatherKit allows you to access the Apple Weather service.

Enable WeatherKit for an App ID In Certificates, Identifiers & Profiles, click Identifiers in the sidebar.

On the top left, click the add button (+), select App IDs, then click Continue.

Register an App ID.

Click the App Services tab.

Select the WeatherKit checkbox.

Click Continue, review the registration information, and click Register.

Note : Remember to also enable WeatherKit in the App Capabilities tab when editing your App ID.

WeatherKit error on iOS 17 - macOS 14
 
 
Q