-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Interceptor occasionally not returning callbacks of RxJava #3549
Comments
ArcherEmiya05
changed the title
Interceptor not returning callbacks of RxJava
Interceptor occasionally not returning callbacks of RxJava
Apr 28, 2021
Any update? |
Hii @ArcherEmiya05 , |
@ArcherEmiya05 @falgunirana2022 Do we have any updates for this issue? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am having trouble with Interceptor as it does not call
onError
noronSuccess
on specific scenarioThis is my interface class
Fetching it with this
Case 1: No network (Wifi/Mobile Data is OFF)
Interceptor :
A/INTERCEPT: FALLBACK TO CACHE Unable to resolve host "some.host.com": No address associated with hostname
onError (error ->) is called if no cache
onSuccess (result ->) is called if cache is available
All Good! We show error UI to user during offline mode if no cache exist else we show the list if cache is at least available.
========================================================================
Case 2: Connected to network (Wifi/Mobile Data is ON and the network has INTERNET SERVICE)
onError (error ->) is called when response was failed such as 404, etc.
onSuccess (result ->) is called when response was success
All Good! BUT due to unknown circumstances sometimes I got
A/INTERCEPT: FALLBACK TO CACHE CANCELED
from the
Interceptor
and when this happen I don't receive any callbacks neither onError nor onSuccess thus the UI for loading never ends.========================================================================
Case 3: Connected to network (Wifi/Mobile Data is ON but the network has NO INTERNET SERVICE)
Interceptor :
A/INTERCEPT: FALLBACK TO CACHE Unable to resolve host "some.host.com": No address associated with hostname
onError (error ->) is not called
onSuccess (result ->) is not called
As you can see, my
Interceptor
log here is just the same in our first case yet no callback has been return even a cache is available thus the UI for loading never ends again.dependencies
The text was updated successfully, but these errors were encountered: