Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5.0.2: onAttributionRead callback is called on a different thread in Development Build #310

Closed
pspgit opened this issue Sep 5, 2024 · 3 comments

Comments

@pspgit
Copy link

pspgit commented Sep 5, 2024

Hi
I'm recently updated to v5.0.2 SDK.

In Development Build, when I call Adjust.GetAttribution(callback) and trying to access Unity, e.g. Time.realTimeSinceStartup from the callback, I get an exception on Android (iOS not tested):

UnityException: get_realtimeSinceStartup can only be called from the main thread.
AdjustSdk.AdjustAndroid+AttributionReadListener.onAttributionRead(UnityEngine.AndroidJavaObject)

I guess other callbacks, e.g. GetAdid(callback) might also have this issue.

This doesn't happen if I uncheck "Development Build". Changing behavior based on this flag looks weird.


AttributionChangedDelegate is also called on non-main thread in Dev Builds.

@juanblasco
Copy link

I've seen a repeating ANR here, could it be related?
Captura de pantalla 2024-09-30 a las 11 33 52

@uerceg
Copy link
Contributor

uerceg commented Feb 27, 2025

Hey @pspgit,

Sounds similar to #277. Pretty much what I wrote there.

I'll keep you posted.

@uerceg uerceg mentioned this issue Feb 28, 2025
@uerceg
Copy link
Contributor

uerceg commented Feb 28, 2025

Hey guys,

We have just shipped v5.1.0 where we tried to address this issue. If possible, feel free to give it a shot and let us know if the issue still persists with this version or not. I'll close this ticket for the time being, but feel free to comment / reopen it if needed.

Looking forward to hearing back from you.

Cheers

@uerceg uerceg closed this as completed Feb 28, 2025
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

No branches or pull requests

3 participants