boxedwine.js: TypeError: Cannot read properties of undefined (reading 'parent')
Closed this issue · 3 comments
Hello, I am trying to get web version working, but stuck.
I cloned the repo and built with emscripten without errors.
I copied Debian10-Wine-5.0.zip to the same dir as boxedwine.html and renamed it to boxedwine.zip
I access boxedwine.html via web server, as suggested in this comment.
I get this error:
boxedwine.js:18 Uncaught TypeError: Cannot read properties of undefined (reading 'parent')
at BFSEmscriptenFS.realPath (browserfs.boxedwine.js:2386)
at BFSEmscriptenNodeOps.lookup (browserfs.boxedwine.js:2212)
at Object.lookup (boxedwine.js:2186)
at Object.lookupNode (boxedwine.js:1871)
at ___syscall_getdents64 (boxedwine.js:4404)
at readdir (0068935e:0x485e9)
at Platform::listNodes(std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > const&, std::__2::vector<Platform::ListNodeResult, std::__2::allocator<Platform::ListNodeResult> >&) (0068935e:0x35f78)
at FsNode::loadChildren() (0068935e:0x1ead4)
at Fs::getNodeFromLocalPath(std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > const&, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > const&, BoxedPtr<FsNode>&, std::__2::vector<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >, std::__2::allocator<std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> > > >&, bool, bool*) (0068935e:0x2eeff)
at main (0068935e:0xd8423)
I think the problem is that it tries to access /root/base
dir, which is not present in Debian10-Wine-5.0.zip
I created it manually, but it didn't help.
How can I fix this error?
Debian10-Wine-1.7.zip - same error
Manually combining debian10.zip and Wine-5.0.zip - same error
Windows 10 64 bit
Emscripten 3.0.0 run on Ubuntu 20.04 through WSL2
Chrome 96
I just noticed 2 more errors at the start of console log (before message running initial setup
):
boxedwine-shell.js:1188 wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
printErr @ boxedwine-shell.js:1188
(anonymous) @ boxedwine.js:611
Promise.then (async)
(anonymous) @ boxedwine.js:610
Promise.then (async)
instantiateAsync @ boxedwine.js:608
createWasm @ boxedwine.js:629
(anonymous) @ boxedwine.js:9289
boxedwine-shell.js:1188 falling back to ArrayBuffer instantiation
I am very confused. I set a breakpoint in realPath
and hit it until node
becomes undefined
:
Then I inspect the function that called it, lookup
, and realPath
argument parent
is fine (not undefined):
WTF? How is that even possible? Something very wrong is going on here.
Firefox 94: everything is the same.
The problem is in Emscripten 3.0.0.
I tried Emscripten 2.0.21 and the error is gone.