Uncaught TypeError: Failed to fetch simulated offline in Google Chrome.
See original GitHub issueIntended outcome:
When making a query or polling query and the network has an outage/offline/disconnected. NetworkError is caught, retry-link retries. Polling queries would retry.
Actual outcome:
Uncaught TypeError: Failed to fetch.
Uncaught TypeError: Failed to fetch
at eval (createHttpLink.js?53eb:96:1)
at new Subscription (module.js?c1e0:190:1)
at Observable.subscribe (module.js?c1e0:264:1)
at subscribeObservable.subscribe (pusher-link.ts?1f2c:32:1)
at eval (index.js?9187:11:1)
at new Subscription (module.js?c1e0:190:1)
at Observable.subscribe (module.js?c1e0:264:1)
at RetryableOperation.try (retryLink.js?d616:103:1)
at RetryableOperation.start (retryLink.js?d616:91:1)
at RetryLink.request (retryLink.js?d616:134:1)
When network connection comes back. No retry attempts are made, and no polling queries are retried everything just stops.
How to reproduce the issue:
Have a retry-link.
Make a query or polling query during a network outage. Can simulate network outage in Chrome Network tab under the throttling drop down. Restore network connection and see that nothing is retried.
Versions
System:
OS: Windows 10 10.0.19044
Binaries:
Node: 16.14.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.3.0 - ~\AppData\Roaming\npm\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.37)
npmPackages:
@apollo/client: ^3.6.9 => 3.6.9
vue-apollo: ^3.1.0 => 3.1.0
Suspect this is related to https://github.com/apollographql/apollo-client/issues/9870
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
PWA not working correctly offline. Uncaught (in promise ...
... in simulated offline mode. So, in your case, the service worker should return a cached 'index.html' when fetch(event.request) is failed.
Read more >ERR_INTERNET_DISCONNECT...
If the error repros, "Uncaught TypeError: Failed to fetch" is printed to ... if the service worker code calls fetch() while the 'simulated...
Read more >Re: Undocumented TypeError: Failed to fetch - Google Cloud ...
It seems from what you observe, the browser treats the the CORS response from Apigee as insufficient. You can use Apigee trace to...
Read more >Randomly fails to load while fetching multiple resources
Tried testing the issue on chrome reported version# 70.0.3538.77 using Windows-10 ... Actual: "Uncaught (in promise) TypeError: Failed to fetch TypeError: ...
Read more >How to Fix the "ERR_CONNECTION_RESET" Error (5 Ways)
Learn how to fix the "ERR_CONNECTION_RESET" error code that displays in Google Chrome because there was a failed connection.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@LiamKarlMitchell Hi! Thanks a ton for opening this issue. I’d need to take a bit of a deeper dive before I can confirm it’s related to #9870, as for the most part that issue relates to error reporting, rather than re-polling/fetching errors.
Yep! After cloning and building this repo, cd to
/dist
and runnpm pack
which will create a file namedapollo-client-3.xx.tgz
in theapollo-client/dist
directoryThen in your app, run
npm i ~/path/to/folder/apollo-client/dist/apollo-client-3.xx.tgz
to install the newly built/modified client. You should see the package.json change to look something like this:Still a concern, but I have not had the time to investigate it further yet.