Skip to content

Crash: NSInvalidUnarchiveOperationException when decoding MPUploadSettings #408

@aaronmusa-candyspace

Description

@aaronmusa-candyspace

Description

We’re seeing random crashes at runtime with the following exception:

*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (MPUploadSettings) for key (root) because no class named "MPUploadSettings" was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target). If the class was renamed, use setClassName:forClass: to add a class translation mapping to NSKeyedUnarchiver'

This occurs randomly during app launch. It simply happens sporadically. It appears that the SDK is persisting an MPUploadSettings object, but sometimes cannot deserialize it later.

Steps to Reproduce

We don’t have a consistent reproduction path, but the crash occurs intermittently.

Additional Context

  • We haven’t changed SDK versions between launches.
  • Clearing app data (deleting/reinstalling the app) temporarily resolves the issue, but it recurs later.
  • This suggests possible corruption or a race condition in the SDK’s persistence/unarchiving logic.
  • We're using SPM as dependency manager

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions