Closed zvinless closed 6 years ago
Hi @zvinless
Thanks for reporting this. We have tried to reproduce the error with our example app and your Unity IDE version, but rather didn't manage to, regardless of whether we have picked Mono
or IL2CPP
build.
Can you maybe share with us the body of your event failure callback?
Sure thing. In fact, here's a small script you can put onto an object in a startup scene (may not be absolutely minimal):
using UnityEngine;
using com.adjust.sdk;
public class AdjustInitializer : MonoBehaviour
{
void Start()
{
Invoke("InitializeAdjust", 2);
}
void InitializeAdjust()
{
var adjustConfig = new AdjustConfig("your_app_token", AdjustEnvironment.Sandbox);
adjustConfig.setLogLevel(AdjustLogLevel.Verbose);
adjustConfig.setLogDelegate(Debug.Log);
adjustConfig.setSendInBackground(true);
adjustConfig.setLaunchDeferredDeeplink(true);
adjustConfig.setSessionFailureDelegate(_ => Debug.Log("hello"));
Adjust.start(adjustConfig);
}
}
One more important thing: make sure not to start the game with an internet connection. The initial launch must be without any connection or else the issue will not occur, even in subsequent launches without a connection.
@zvinless
Thanks for sharing this code snippet with us. I am still unable to reproduce this, am using this exact code you provided with you Unity IDE version. 🤔
Which Adjust Unity SDK version are you using?
I'm on Adjust Unity SDK 4.12.2. Currently, I'm installing onto a Pixel 2 XL on Android 8.1.0, but I've been able to reproduce on a variety of devices.
I was thinking that Unity's Performance Reporting was somehow affecting the code in an unexpected way since disabling it resolves the issue, but if it's enabled and working for you, maybe something else is going on. I am also on a Unity Pro license in case that's relevant?
Also, my Minimum API level is set to Android 4.1, and Target API Level is Android 7.1, with .NET 2.0 Subset Api Compatibility Level.
Hm, I can no longer reproduce after disabling and re-enabling Performance Reporting--I can let you know when I have more info.
I don’t think license should matter. Are you able to reproduce the issue with 4.12.3 as well?
Ok, so I can still reproduce, and it does occur with 4.12.3.
The actual user-facing experience is that the app force closes to desktop ("App has stopped").
Thanks for the logs. I definitely see what you are talking about but I am not able to reproduce the issue on any Android device I have tried. Is there any chance that you maybe zip and send us over some dummy example app in which you are able to reproduce this issue so that we can give that app a try?
I think it might matter that I'm using Pro, because I wasn't able to properly activate the Performance Reporting feature until I was logged into an account that was on a paid license. I'm hoping you'll still be able to repro on my demo project without my account, since the issue still occurred after I signed out of Unity and rebuilt.
What would be the best way to privately send a test app your way (it has real organization IDs since it had to be set up on a paid account)?
@zvinless
Please feel free to drop an email to support@adjust.com referencing this issue and we can continue from there.
Thanks in advance!
@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!
This happens with 100% reproducibility under the following conditions:
AdjustConfig
(I believe it only needs to be the session failure delegate)Steps:
AdjustConfig
(no-op callbacks are fine; I just logged const strings)Adjust.start
is called somewhere with said AdjustConfig instanceAdjust.trackEvent
is called after Adjust initializesadb install
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-L603I think the
ajoJsonResponse
isnull
(since there's no response). It's crashing despite the try/catch block.