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

Non-fatal Exception: kotlinx.coroutines.JobCancellationException #2854

Open
gino-m opened this issue Nov 20, 2024 · 2 comments
Open

Non-fatal Exception: kotlinx.coroutines.JobCancellationException #2854

gino-m opened this issue Nov 20, 2024 · 2 comments
Assignees
Labels
type: bug Something isn't working

Comments

@gino-m
Copy link
Collaborator

gino-m commented Nov 20, 2024

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:

@gino-m gino-m added the type: bug Something isn't working label Nov 20, 2024
@shobhitagarwal1612
Copy link
Member

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
Copy link
Member

shobhitagarwal1612 commented Nov 23, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants