Skip to content

Conversation

@bahricanyesil
Copy link
Contributor

@bahricanyesil bahricanyesil commented Mar 5, 2025

Problem

I identified a specific crash pattern affecting users who installed the previous version of the app (with the older adjust_sdk) and then updated to the latest version. These users experienced crashes due to attempts to serialize nil JSON responses in the Adjust SDK. They can not open the app and immediately receive a blank screen and a crash. Users who directly installed the newest app version did not report this issue.

Solution

This PR implements nil-checking mechanisms to prevent crashes during JSON serialization:

Added nil checks before JSON serialization:

  • In AdjustSdk.m: Added conditional checks before serializing attribution.jsonResponse
  • In AdjustSdkDelegate.m: Added similar protection for JSON serialization operations
  • Ensured empty strings are used as fallbacks when nil values are encountered

Since this is a quite important bug for now, you might consider prioritizing it @uerceg

For more implementation details, see the commit.

@uerceg
Copy link
Contributor

uerceg commented Mar 5, 2025

Hey @bahricanyesil,

Thank you for reaching out and raising this PR. I'm preparing v5.1.1 patch with these changes as I type this.

Will keep you posted.

@uerceg uerceg mentioned this pull request Mar 5, 2025
@uerceg
Copy link
Contributor

uerceg commented Mar 5, 2025

Replaced with #161.

@uerceg uerceg closed this Mar 5, 2025
@uerceg
Copy link
Contributor

uerceg commented Mar 5, 2025

@bahricanyesil Thank you one more time for reporting this and for your contribution! v5.1.1 is now shipped and as soon as it becomes available pub.dev, it would be great to hear back from you if it has addressed this issue that you've faced.

Sorry for the inconvenience this has caused to you and looking forward to hearing back from you.

@bahricanyesil
Copy link
Contributor Author

Thank you for your quick response and update @uerceg

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants