WeatherKit JWT Auth error for SOME customer devices

We have a subscription WeatherKit app which has been on the App Store since December 2023.

I am getting intermittent JWT auth failures on customer devices. In the great majority of cases, the request succeeds, but sometimes it fails, and sometimes it fails and never recovers. I’m working with a customer right now who is unable to get any weather data at all, and the logs he sends me show

WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors error 2

The app uses the WeatherKit SDK (we are not using the REST API directly). We know we have the project setup as it has been working since launch, and I can verify weatherkit using

security cms -D -i embedded.mobileprovision

It it not a problem with the specific query, since I can get data for the dates and locations they are requesting. I can’t replicate the problem on my test devices.

In case there is a rate limit issue: this app is a bit unusual and downloads an unusual amount of data at once using multiple queries in parallel using a TaskGroup. When the user creates a location, the app downloads a 10 day block of weather (7 days in the past + 3 day forecast) using

WeatherService.shared.weather(
    for: location,
    including: WeatherQuery.daily(
        startDate: startDate,
        endDate: endDate
    ),
    WeatherQuery.hourly(
        startDate: startDate,
        endDate: endDate
    )
)

It also downloads about 2 months of daily precipitation data using multiple parallel calls to dailySummary in 10 day blocks:

WeatherService.shared.dailySummary(
    for: location,
    forDaysIn: DateInterval(start: startDate, end: endDate),
    including: .precipitation
)

In almost every case, including on my test devices, this works. But some users get WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors error 2 on every request.

The two users yesterday that had this problem were both on iOS 18.5 for what that's worth, though the app supports 17.2+

Is anyone else seeing this? And can anyone suggest anything else to explore? It's obviously a terrible experience for customers who pay for the service and are unable to get any data.

I did submit this info to Apple as FB18276275

Answered by in 845886022

Thank you for reporting this. The issue should now be resolved.

Hi,

We're experiencing the same issue, which is affecting many users on iOS 18.5. We've reached out to support but haven't heard anything back yet.

It seems Apple has silently made several changes related to security in the Weather API. Auto-signing appears to no longer be an option.

Good to know it isn't just me, system status shows an online reported status with no issues so hopefully it's recognised as an issue and resolve ASAP.

The fact the issue stays device bound once it occurs is very worrying, will this just slowly begin to affect my userbase with no recourse for me?

I really don't want to strip weather kit out of my codebase. its the backbone of the app but no idea what triggers or causes the issue to be device specific once the bug occurs in the first place.

We've also had some users reporting this on iOS 18.5. Filed this as FB18336829.

I've heard from two affected customers that the problem has gone away. I'll be reaching out to other affected customers but I'm cautiously hopeful.

I've been working furiously to set up a API proxy server to route calls from the app (thereby using the REST API on my server, and potentially getting rid of WeatherKit entirely). I still think I want to finish that work so I can have some insurance in case I need to suddenly switch weather providers. With a proxy server I can do that without a binary update on the App Store.

The WeatherKit SDK is very convenient in how it doesn't require a proxy server to secure the API key, but this failure from the last couple of days has me spooked (especially given no acknowledgment from Apple that there was even a problem, and nothing ever showed up on their status board as far as I saw).

Accepted Answer

Thank you for reporting this. The issue should now be resolved.

WeatherKit JWT Auth error for SOME customer devices
 
 
Q