Hello, I’m a developer who runs mobile games targeting iPhone, android.
I got NullReferenceException error from IsInvoking, CancelInvoke method.
This problem is occurring only for some users, so I couldn’t reproduced this error.
This is a problem that occurs on both Android and iOS platforms.
The error continues to occur only with some users, and the same symptoms are repeated when the user deletes and reinstalls the app.
Originally, only the CancelInvoke method was used, but a nullReferenceException error occurred, so I added IsInvoking, but this time, IsInvoking have that error.
Sentry error log:

Error Occured Code 1:
public override void KillSkill()
{
try
{
if (IsInvoking("Timer")) // NullReferenceException ERROR! (line 114)
CancelInvoke("Timer");
isActivate = false;
supportImage?.gameObject.SetActive(false);
if (effectObject != null)
if (effectObject.TryGetComponent(out ParticleSystemRenderer particleSystemRenderer))
{
particleSystemRenderer.material.DOFade(0, 1f).OnComplete(() =>
{
if (effectObject.TryGetComponent(out ParticleSystem particleSystem))
{
particleSystem.Stop();
}
particleSystemRenderer.material.color = Color.white;
effectObject.SetActive(false);
});
}
}
catch (Exception e)
{
GlobalLogCatch.instance.LogCatch(e.Message, e.StackTrace, LogType.Error);
Sentry.SentrySdk.CaptureException(e);
}
finally
{
}
Sentry error log:

Error Occured Code 2:
void SkillDuration()
{
if (IsInvoking("Timer")) CancelInvoke("Timer"); // NullReferenceException ERROR! (line 99)
timer = duration;
InvokeRepeating("Timer", 0, 0.1f);
}
Timer method for invoke :
void Timer()
{
if (timer > 0)
{
timer -= 0.1f;
}
else
{
if (IsInvoking("Timer"))
CancelInvoke("Timer");
KillSkill();
}
}
As you can see from the code, we only saw that the method had written on the server that a Null ReferenceException occurred, and we checked all possible problems within the method.
However, due to the continuous problem, we eventually used Sentry (which allows us to track the line number of the IL2CPP-built apps) to track exactly which line the error occurred, and as a result, we found that the Invoke-related method had an error.