ground-android icon indicating copy to clipboard operation
ground-android copied to clipboard

Non-fatal Exception: kotlinx.coroutines.JobCancellationException

Open gino-m opened this issue 1 year ago • 6 comments

This has been logged in prod 319 times in the past 7 days. There are some potentially useful log lines under "Logs & Breadcrumbs", primarily related to:

  • Photo upload failed. local path: .. <-- likely due to no connection, should be fixed in #2852
  • Value not found for task .. <-- @shobhitagarwal1612 Could this be related to #2847 ?

gino-m avatar Nov 20 '24 21:11 gino-m

This exception occurs when the coroutine is cancelled via job.cancel() or due to a timeout. It is automatically propagated to all it's child coroutines to cancel everything as expected. Therefore, we shouldn't be logging it as an exception.

shobhitagarwal1612 avatar Nov 23 '24 09:11 shobhitagarwal1612

On further debugging, I found that it happens when calling await() if the job is already cancelled. So, handling this more gracefully will prevent this exception from getting thrown.

shobhitagarwal1612 avatar Nov 23 '24 10:11 shobhitagarwal1612

Wait for #2869 to be released in next candidate and then check again if the issue is resolved or not via crash logs.

shobhitagarwal1612 avatar Nov 26 '24 18:11 shobhitagarwal1612

To verify crashlytics stats once next release cut by @rfontanarosa

kenstershiro avatar Dec 04 '24 15:12 kenstershiro

@gino-m to take a look at the stats to see if this is fixed

kenstershiro avatar Feb 19 '25 15:02 kenstershiro

Confirmed this is still occurring as a non-fatal crash in SurveySelectorFragment and TermsOfServiceFragment. @shobhitagarwal1612 I'll leave assigned to you in case you'd like to take a look!

gino-m avatar Feb 19 '25 18:02 gino-m