Skip to content

[Bug]: NullReferenceException : Object reference not set to an instance of an object - GetTags #472

@RaphaelNSG

Description

@RaphaelNSG

What happened?

I updated my project to OneSignal 3.0 and everything was working fine, but some users are reporting an error. It seems related with GetTags method, but i don't know what is causing this error.

Steps to reproduce?

1. Install the OneSignal 3.0
2. Call the `GetTags` method

What did you expect to happen?

I expected to call the GetTags method and receive no error.

Unity version

2019.4.35f1

OneSignal Unity SDK version

3.0.0

Platform

Android and IOS

Relevant log output

Non-fatal Exception: java.lang.Exception: NullReferenceException : Object reference not set to an instance of an object.
       at OneSignalService+<SendIncrementalData>d__0.MoveNext(OneSignalService+<SendIncrementalData>d__0)
       at System.Threading.ContextCallback.Invoke(System.Threading.ContextCallback)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Action.Invoke(System.Action)
       at System.Threading.ContextCallback.Invoke(System.Threading.ContextCallback)
       at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task`1[TResult].TrySetResult(System.Threading.Tasks.Task`1[TResult])
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetResult(System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at OneSignalSDK.OneSignalAndroid+<GetTags>d__96.MoveNext(OneSignalSDK.OneSignalAndroid+<GetTags>d__96)
       at System.Threading.ContextCallback.Invoke(System.Threading.ContextCallback)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run(System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner)
       at System.Action.Invoke(System.Action)
       at System.Threading.ContextCallback.Invoke(System.Threading.ContextCallback)
       at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(System.Threading.Tasks.AwaitTaskContinuation)
       at System.Threading.Tasks.Task.FinishContinuations(System.Threading.Tasks.Task)
       at System.Threading.Tasks.Task`1[TResult].TrySetResult(System.Threading.Tasks.Task`1[TResult])
       at System.Threading.Tasks.TaskCompletionSource`1[TResult].TrySetResult(System.Threading.Tasks.TaskCompletionSource`1[TResult])
       at Laters.AwaitableAndroidJavaProxy`1[TResult]._setResult(Laters.AwaitableAndroidJavaProxy`1[TResult])
       at System.Action`1[T].Invoke(System.Action`1[T])
       at System.Threading.SendOrPostCallback.Invoke(System.Threading.SendOrPostCallback)
       at UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke(UnityEngine.UnitySynchronizationContext+WorkRequest)
       at UnityEngine.UnitySynchronizationContext.Exec(UnityEngine.UnitySynchronizationContext)
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(System.Runtime.ExceptionServices.ExceptionDispatchInfo)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0(System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c)
       at System.Threading.SendOrPostCallback.Invoke(System.Threading.SendOrPostCallback)
       at UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke(UnityEngine.UnitySynchronizationContext+WorkRequest)
       at UnityEngine.UnitySynchronizationContext.Exec(UnityEngine.UnitySynchronizationContext)
       at UnityEngine.UnitySynchronizationContext:Exec(UnityEngine)

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions