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
Axios causes node.exe to crash without possibility to catch the exception #3396
Comments
@pavelseverov Thanks for the report. I'll try to reproduce. What version of windows did you encounter this on and did you install node from nvm or the binary download? (Edit: I see the Windows version is Windows 10 1909) I don't know if the Windows version and install method will make a difference but might help me reproduce. |
Please try this test to see if the issue is reproduced: https://github.com/timemachine3030/axios/blob/bug/3396/test/unit/regression/3396.js I was able to transfer 3Gb without issue. You can adjust the latency by changing the setTimeout value. Tested on Window 10 Pro 64-bit, build 19041.572 (running in a Virtual Machine) |
@timemachine3030 thank you for reply!
I have installed node from node-v14.15.0-x64.msi
Am I right that I need to:
Unfortunately npm install fails (see the npm_install.log). Maybe you can share the axios-bug-3396 folder with node_modules already installed? |
You have the correct steps. Your install log shows a failure building Use mocha to run the test: (Edit: you need to use |
- Everything still works as expected. - Remove bundlesize - It still uses libtorb which is deprecated and broken on Win and requires a full suite of build tools on Mac. Keeping it in the package makes it difficult for anyone filing issues to run tests. - See: axios#3396 - Update grunt and it's plugins - Update karma to v4...so much faster! - Changed the karma config. Better changes: axios#3394 - Update Webpack - Uses terser over uglify - Update eslint - Caused an error in util.js from the `global` directive so the directive is removed (it was not needed). - Update typescript - The old version of tsc didn't know about new features in @types/node (like `asserts value`).
Do you mean this code?: I have suspicion that problem is in queried API. I have tried many free REST API resources, but can't reproduce the error. |
@timemachine3030, |
@pavelseverov Regarding timeouts; the config.timeout value is only for the initial connection to the remote. Once the data transfer starts the timeout will not fire. If you want to cancel a request after the handshake connection and during data transfer I would suggest looking in the docs at how |
@timemachine3030 |
Hi @timemachine3030, |
@timemachine3030 |
- Everything still works as expected. - Remove bundlesize - It still uses libtorb which is deprecated and broken on Win and requires a full suite of build tools on Mac. Keeping it in the package makes it difficult for anyone filing issues to run tests. - See: #3396 - Update grunt and it's plugins - Update karma to v4...so much faster! - Changed the karma config. Better changes: #3394 - Update Webpack - Uses terser over uglify - Update eslint - Caused an error in util.js from the `global` directive so the directive is removed (it was not needed). - Update typescript - The old version of tsc didn't know about new features in @types/node (like `asserts value`). Co-authored-by: Jay <jasonsaayman@gmail.com>
Occasionally experiencing the same issue on a Windows hosted Azure Function App (serverless node.js) executing
Functions process dies with
Unfortunately I was not yet able to reproduce this locally |
Here's a reproduction of a silent, uncaught failure that returns 0:
Axios version = 0.21.1 |
Giving this a bump because we just started running into the exact same Node.js crash on Azure Functions this week. It's intermittent and hard to reproduce, but happening often enough that we've begun to investigate.
Nothing's really changed in our environment; Node.js v14 on Azure Functions runtime v3, a few dependency patch releases but nothing remotely significant. Axios bumped from We can investigate logs etc, just need to know if there's any added info we could provide that might come in handy. |
We have also been hitting this (or a related/similar) problem in one of our tools. I just tried the sample reproduction code posted by @JeremyDOwens. With my default dev environment (Ubuntu 20.10, node 14.18.1), it fails silently with However, with node 16.13.0, it exits cleanly even with
|
- Everything still works as expected. - Remove bundlesize - It still uses libtorb which is deprecated and broken on Win and requires a full suite of build tools on Mac. Keeping it in the package makes it difficult for anyone filing issues to run tests. - See: axios#3396 - Update grunt and it's plugins - Update karma to v4...so much faster! - Changed the karma config. Better changes: axios#3394 - Update Webpack - Uses terser over uglify - Update eslint - Caused an error in util.js from the `global` directive so the directive is removed (it was not needed). - Update typescript - The old version of tsc didn't know about new features in @types/node (like `asserts value`). Co-authored-by: Jay <jasonsaayman@gmail.com>
I can reproduce the issue on macOS, ubuntu and node 14.18. The same code works on node v16+ throwing the stacktrace below
while in node 14 it fails in the async_hook callbackTrampoline while calling the callback.apply. the
not sure what happens inside nodejs but that is caused at this point on aborted connection errors as the node16 stacktrace can show. |
Hi 👋 Please could you retry with the latest version and open a new issue should this error still be relevant? Thanks |
I don't have enough of a reproduction path to open a new issue, but I still run into this problem with axios v0.27.2 on node v16.15.1. I found out that while awaiting my Not sure it has anything to do with it, but if I remove |
I tried the same request that causes node to exit in curl (verbose) and that ends with:
|
Still encountering this with Axios 1.1.3 intermittently in Azure Functions. |
The error is still repeating. Example code:
The console outputs an error from the catch block, but then Nodejs crashes with "UnhandledPromiseRejection" error |
I have same issue. The catch block worked expected but then Node Process crashed with error below.
|
Describe the bug
Axios v.0.21.0 causes node.exe to silently crash, without possibility to catch the exception.
Occurs with node.js v.14.15.0 (current LTS Version, recommended for most users).
Earlier or later versions works Ok (I have tested v.9.11.1 and v.15.1.0)
Update: Node v.9.11.1 also crashing in the similar way (on Windows Server 2016 v.1607)
Update 2: Basic Auth causes the crashing. Requests without authorization works ok so far
Update 3: Node v.14.15.1 also crashing in the similar way
To Reproduce
Effect is not stable and not easy to be quickly reproduced, appears mostly on bad/slow internet connections. Most probably because of “connect ETIMEDOUT”, but this is only my guessing, because node.exe just unexpectedly terminates, without any additional info.
Expected behavior
Even on more or less normal internet connection node.exe crashes within getting of one or two gigabytes of data (in summary, by portions, not at once).
Choosing bad internet connection will bring the same result faster.
Environment
Additional context/Screenshots
N/A
The text was updated successfully, but these errors were encountered: