-
Notifications
You must be signed in to change notification settings - Fork 731
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
🐛 BUG: EBADF: bad file descriptor, write #4540
Comments
Hello, I have the exact same issue. When downgrading the node version to 20.10.0 (latest LTS at the time of writing) and re-running the same commands, the login is successful for me. Running
We are told “EBADF fd is not a valid file descriptor or is not open for writing.” I assume that within the node major version (from 20 to 21), something changes in fs.writeFileSync https://nodejs.org/api/fs.html#fswritefilesyncfile-data-options, I see that it is invoked in https://github.com/cloudflare/workers-sdk/blob/main/packages/wrangler/src/user/user.ts#L869 from https://github.com/cloudflare/workers-sdk/blob/main/packages/wrangler/src/user/user.ts#L978C28-L978C28 System context: I am using wrangler version 3.18.0 and node version 21.3.0 on Fedora Linux with kernel 6.5.12 As the developer docs for wrangler don’t specify an upper bounds for the node version to be installed, this is an easy trap to fall into. I think users should be encouraged to stay on the node LTS until further notice. |
It looks like this was fixed in Node.js 21.4.0: nodejs/node#50990 |
Hello @shirshak55 , I don't think this issue should be closed. The docs define a lower bound of node version that is supported, but don't indicate an upper bound. Instead of letting users run into strange error messages due to problems with downstream dependencies, wrangler should give useful feedback and define the most recent node release that all tests have been passed on. While this particular bug might have been resolved, the problem in general still stands. Node will keep changing and the package.json does not limit the upper bound of the version number. |
Which Cloudflare product(s) does this pertain to?
Workers Runtime, Wrangler core
What version(s) of the tool(s) are you using?
3.18
What version of Node are you using?
21.3.0
What operating system are you using?
Mac
Describe the Bug
Whenever I try to deploy cloudflare worker, I get this message
Attempting to login via OAuth...
And, it opens a link in browser. And, when I allow it in browser i get this error.
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: