[windows] web workers - EBADF: bad file descriptor
See original GitHub issueMaybe i should raise this over here - https://github.com/modulesio/window-worker
it looks like web workers are broken with the following output:
{ [Error: EBADF: bad file descriptor, read] errno: -4083, code: 'EBADF', syscall: 'read' }
{ [Error: EBADF: bad file descriptor, close] errno: -4083, code: 'EBADF', syscall: 'close' }
ErrorEvent {
error:
Error: EBADF: bad file descriptor, write
at Object.writeSync (fs.js:564:3)
at createRequest (c:\exokit\node_modules\window-worker\src\worker.js:24:8)
at getScript (c:\exokit\node_modules\window-worker\src\worker.js:97:33)
at c:\exokit\node_modules\window-worker\src\worker.js:124:17
at onmessage (c:\exokit\node_modules\window-worker\src\worker.js:202:5)
at onthreadmessage (c:\exokit\node_modules\child-process-thread\child.js:14:5),
message: 'EBADF: bad file descriptor, write',
filename: 'fs.js',
lineno: 564 }
Bugsnag: Encountered an uncaught error, terminating…
Error: EBADF: bad file descriptor, close
You can visit this glitch to test - https://sordid-asparagus.glitch.me/, it has a bare bones web worker example with the following code:
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<script>
var myWorker = new Worker("worker.js");
myWorker.postMessage('hello worker');
myWorker.onmessage = function(e) {
console.log(e.data);
}
</script>
</body>
</html>
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Error: EBADF: bad file descriptor, uv_pipe_open · Issue #680
Debug Console output infor. OS: win32 x64 Adapter node: v7.9.0 x64 vscode-chrome-debug-core: 3.23.0 Starting debugger app worker.
Read more >Running "rails test" is throwing Bad file descriptor (Errno
We get the Bad file descriptor (Errno::EBADF) after a handful of tests are run if we run it against mysql 8.0, but mysql...
Read more >CS110 Assignment 3: All Things Multiprocessing
The script can output information about the open file descriptors for any ... file descriptor) close(1000) = -1 EBADF (Bad file descriptor) ...
Read more >Failed readahead on ifile EBADF: Bad file descriptor 失败案例 ...
终于正确配置好Hadoop了,我用的是centos7 伪分布式安装,做个记录,留个纪念,也为和我遇到同样问题的道友“排忧解难”一下
Read more >redbean
single file distributable web server. ... On Windows redbean executes just like any other program. ... -f, log worker function calls.
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 Free
Top 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
i can confirm this is now workering again 😉
The reason window-worker exists is all of the alternatives are missing a ton of features like importScripts, transferables, forklessness, url/blob support, native re-require, and probably more I forgot.
The window-worker fix is to fix blocking pipes on windows (Unix is not a problem). Or we could sidestep the need for them by doing the synchronous piping inside the worker itself with native node workers.