Description
- Version: 9.11.1, 14.15.0, 14.15.1
- Platform: Windows 10 v.1909 and 2004; Windows Server 2016 v.1607
- Subsystem: N/A
What steps will reproduce the bug?
Axios v.0.21.0 Basic Auth GET-queries causes node.exe to silently crash, without possibility to catch the exception.
Occurs with node.js v.14.15.1 (current LTS Version), and earlier versions. Later versions (e.g. v.15.1.0) works Ok
// This is example code for reproducing the problem. Actually nothing special, just continuous getting lots of data.
// Size of retrieved files is not important (from several kilobytes to several megabytes)
var axios = require('axios');
let n=1;
test();
async function test() {
do {
await axios.get(ApiUrlWithBasicAuth,ApiConfig)
.then(res => console.log(n++, "got "+JSON.stringify(res.data).length+" bytes (node.js "+process.version+")"))
.catch(err => {console.error("ERROR: "+err.message);process.exit()})
} while (true)
};
How often does it reproduce? Is there a required condition?
Effect is not stable. Occurs on continuous testing. With more or less normal internet connection node.exe crashes within getting of about one or two gigabytes of data (in summary, by portions, not at once). Choosing bad internet connection will bring the same result faster.
I have reproduced this issue at two different independent REST APIs with Basic Auth. Unfortunately I can't share them, because they are private resources. But I can check some other REST API, if someone can share with me Basic Auth-protected one, available for tests.
I have also tried dozens of APIs from https://github.com/public-apis/public-apis. [Un]fortunately they all work fine, I'm not able to reproduce the issue on them. Probably because there are no Basic Auth-protected APIs.
What is the expected behavior?
Running the above code leads to crash of node.exe without possibility to catch the exception.
UPDATE: with %errorlevel%=0
What do you see instead?
N/A
Additional information
Issue has been also reported to Axios developers: axios/axios#3396
(no solution so far)
Activity