question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash on sideloaded Android build when no internet connection available

See original GitHub issue

This 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:

  1. Set up an Android project with Adjust in Unity
  2. Sign into your Unity account in the project and enable Performance Reporting in the Services window
  3. Ensure that Scripting Backend is set to Mono in Player Settings -> Android -> Other Settings
  4. Ensure that failure delegates are set in AdjustConfig (no-op callbacks are fine; I just logged const strings)
  5. Ensure that Adjust.start is called somewhere with said AdjustConfig instance
  6. Ensure that Adjust.trackEvent is called after Adjust initializes
  7. Make a build (internal build system, not development build; not sure if it matters)
  8. Sideload .apk using adb install
  9. Enable airplane mode on device such that there is no internet connection
  10. 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:closed
  • Created 6 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
zvinlesscommented, Feb 28, 2018

Hm, I can no longer reproduce after disabling and re-enabling Performance Reporting–I can let you know when I have more info.

0reactions
uercegcommented, Mar 9, 2018

@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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found