-
Notifications
You must be signed in to change notification settings - Fork 120
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
[App Crash] activeSurvey is null #2815
Comments
This crash occurerd 20 times in the last 30 days, all from |
The crash occurs here: private val activeSurvey: Survey = requireNotNull(surveyRepository.activeSurvey) This sounds like a race condition because we're using a synchronous call to |
Suggestion from @gino-m for the race condition, given the load from db should be very fast, it's ok to block the UI to wait for this for now. |
@anandwana001 That might look something like this: private val activeSurvey: Survey = runBlocking { surveyRepository.activeSurveyFlow.filterNotNull().first() } |
Feedback is that this is probably an unrecoverable error, so after the timeout expires then the app should crash (i.e. propagate the error). |
The text was updated successfully, but these errors were encountered: