Uh oh!
There was an error while loading. Please reload this page.
fix(firestore): catch InterruptedException in FirestorePagingSource - #2404
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds handling for InterruptedException in FirestorePagingSource.loadSingle to prevent undeliverable RxJava exceptions when interrupted while disposed, and includes a corresponding integration test. The review feedback suggests avoiding logging expected errors at the ERROR level in the library to prevent cluttering Logcat, and recommends saving and restoring the original RxJavaPlugins error handler in the test to avoid side effects on other tests.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…2383) * fix(auth): validate display name only when required in sign-up form * fix(auth): use locale-safe matcher for sign-up button in test
russellwheatley
left a comment
There was a problem hiding this comment.
One suggestion on error visibility, otherwise this looks solid. Ran the paging test locally and confirmed the fix works, including the new disposal-interrupt regression test.
Uh oh!
There was an error while loading. Please reload this page.
…lace sleeps with latches
a43c700 to
6da622dCompareUh oh!
There was an error while loading. Please reload this page.
Fixes#2008.
FirestorePagingSource.loadSingle()blocks onTasks.await(task)inside aSingle.fromCallable. When Paging cancels an in-flight load, RxJava disposes the subscription, which interrupts the IO-scheduler thread mid-await, throwingInterruptedException. The source only caughtExecutionException, so theInterruptedExceptionescaped the callable after the subscription was already disposed — RxJava couldn't deliver it downstream, so it surfaced as anUndeliverableExceptionon the global handler and crashed the app.DatabasePagingSource(RTDB paging) already catchesInterruptedExceptionand returns aLoadResult.Errorinstead of throwing; this applies the same fix toFirestorePagingSource.Preview
untitled.webm