Skip to content

[Resolved] Crash in Analytics after sdk-exp response: -[__NSDictionaryM setObject:forKeyedSubscript:]: key cannot be nil (since 2026-09-29 00:41 UTC) #16728

Description

@conquests

Description

Since 2026-09-29 00:41 UTC, our production iOS app has been crashing at a growing rate (56 crashes / 56 users in the first 18 minutes). We have not shipped an update. The crash started at the same time on 4 already-released builds.

Fatal Exception: NSInvalidArgumentException
*** -[__NSDictionaryM setObject:forKeyedSubscript:]: key cannot be nil

In every crash we checked (42/42), the crash happens right after the SDK receives the response to POST https://app-analytics-services.com/sdk-exp (HTTP 200). At the moment of the crash, APMExperimentWorkerQueue is still handling that response:

-[GULMutableDictionary dictionary]
-[APMEExperiment copyWithZone:]
-[APMESnapshot initWithSDKName:experiments:]
-[APMESnapshot initWithProtobuf:]
-[APMETaskManager experimentSnapshotsFromExperimentResponse:]
-[APMETaskManager handleFetchingExperimentsResponse:data:error:]
__35-[APMETaskManager fetchExperiments]_block_invoke

The crashing thread is only _dispatch_call_block_and_release -> -[__NSDictionaryM setObject:forKeyedSubscript:]. This matches GULMutableDictionary setObject:forKeyedSubscript:, which writes through dispatch_async and so drops the caller's frames.

It looks like the experiment payload being served since 00:41 UTC is parsed into a nil key. Please check the sdk-exp config and roll it back.

Reproducing the issue

Depends on the server response. Launch the app, the SDK fetches sdk-exp, and the app crashes less than 1 s later.

Firebase SDK Version

12.14.0

Xcode Version

26.5

Installation Method

Swift Package Manager

Firebase Product(s)

Analytics

Targeted Platforms

iOS

Pinned by ncooke3

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions