question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'Network error' on page refresh (Firefox 52.0.1 (64-bit))

See original GitHub issue

Hello, i’ve faced with an issue which occurs after page refresh in Firefox (latest Firefox 52.0.1 (64-bit)) browser when request in loading state.

Steps to reproduce: I make a request to the server which takes around 1 min to response, meanwhile I refreshing current page and my error statement handle with ‘Network Error’ issue (but in Chrome and IE this issue doesn’t occur).

axios.post(url, body, config)
   .then(respone => {
    // success response
   }, error => {
      if(error.response) {
         // error response
       } else { 
         // here is 'Network Error' 
       }
    });

I use ‘else’ statement for handle internet problems and redirect user to appropriate page. But its ‘Network Error’ occurs even though connection is okay.

Here is my screen shot with error object: issueaxios

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
enheitcommented, Apr 4, 2017

I have spent a lot of time to find workaround for the issue. I fixed it by wrap network issue handler (or bad request handler) in setTimeout function.

Solutions looks like this:

const request = axios.get(url, config);

request.then(response => { 
    // success response handler goes here 
}, error => {
    const { response } = error; // same as var response = error.response;
    if(response) {
        // error handler goes here
    } else {
       // Here is wrapper for unexpected errors with i-net/request 
       setTimeout(() => {
           // handle unexpected errors
       }, 1000);
   }
}

This is workaround for FireFox 52.0.2 (64-bit). Other browsers have no issues with request interruption.

1reaction
enheitcommented, May 24, 2017

@rubennorte, for example, when user try to make an action and suddenly i-net connection has lost, application will handle this exception. But there is no possibility to compare real i-net connection problem with FireFox request interruption.

Read more comments on GitHub >

github_iconTop Results From Across the Web

network error on local webpage, ok on website - Mozilla Support
The network error occurs when the page tries to read the file, and only half the webpage appears. On the website there is...
Read more >
Firefox 52.0, See All New Features, Updates and Fixes - Mozilla
Firefox now displays a “This connection is not secure” message when users click into the username and password fields on pages that don't...
Read more >
Firefox 52.0.1, See All New Features, Updates and Fixes
Release Notes tell you what's new in Firefox. As always, we welcome your feedback. You can also file a bug in Bugzilla or...
Read more >
View problem in pages with JavaScript | Firefox Support Forum
You can reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files. hold down the Shift key and left-click...
Read more >
1346556 - High memory usage from orphan nodes on forum ...
Actual results: After this update firefox appeared again high RAM memory leakage ... this issue on Windows 10 x64 with the latest Firefox...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found