Crash on sideloaded Android build when no internet connection available
See original GitHub issueThis happens with 100% reproducibility under the following conditions:
- Using Unity 2017.2.1 (haven’t tested other versions)
- Performance Reporting is enabled in the Services tab
- Mono scripting backend is used (does not occur with IL2CPP builds)
- Failure delegates are set in the
AdjustConfig(I believe it only needs to be the session failure delegate)
Steps:
- Set up an Android project with Adjust in Unity
- Sign into your Unity account in the project and enable Performance Reporting in the Services window
- Ensure that Scripting Backend is set to Mono in Player Settings -> Android -> Other Settings
- Ensure that failure delegates are set in
AdjustConfig(no-op callbacks are fine; I just logged const strings) - Ensure that
Adjust.startis called somewhere with said AdjustConfig instance - Ensure that
Adjust.trackEventis called after Adjust initializes - Make a build (internal build system, not development build; not sure if it matters)
- Sideload .apk using
adb install - Enable airplane mode on device such that there is no internet connection
- Observe crash or hang after Adjust initializes
It seems that the problem is in this block of code in onFinishedSessionTrackingFailed:
https://github.com/adjust/unity_sdk/blob/c11432cfb6a161efbeadc3d4dfbe5881ce87d817/Assets/Adjust/Android/AdjustAndroid.cs#L594-L603
I think the ajoJsonResponse is null (since there’s no response). It’s crashing despite the try/catch block.
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
App crashes when no internet connection is available
Try checking if there is internet before you execute your DownloadJson method in OnCreate. Read here on how to check if you have...
Read more >[List] Working Sideloaded Android Wear Apps (Not Maintained ...
The list of all sideloaded apps working on Android Wear can be found on Google Docs (to make things more simple for me...
Read more >Universal app crashing at site only when connected to ...
Hello, I have a Windows Universal app that runs well at a few locations. At one location, I can start the app if...
Read more >App Keeps Stopping on Android? 11 Fixes to Try
Several factors cause an application to keep stopping or crashing in Android. The problem could be corrupt cache files, ...
Read more >About Android App Bundles
Build apps that give your users seamless experiences from phones to tablets, watches, and more. ... Learn to build for your use case...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hm, I can no longer reproduce after disabling and re-enabling Performance Reporting–I can let you know when I have more info.
@zvinless
We have released an update of Adjust Unity SDK v4.12.4 which should address this issue: https://github.com/adjust/unity_sdk/releases/tag/v4.12.4
Feel free to reopen the issue in case you still encounter this issue with v4.12.4++.
Thank you one more time for reporting the issue.
Cheers!