-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Grammars built with Emscripten 3 don't load in browser: RuntimeError: abort(Assertion failed: undefined) #1560
Comments
(This comment is a temporary suggestion) Until a fix comes, I had a similar issue on a very similar environment, which I was able to solve using the Docker option as follows:
|
@maxbrunsfeld is there incompatibility with the latest Emscripten 3? the wasm binary is twice the size and bails out with the above assertion error. Only forcing the compile through docker that uses Emscripten 2 helps... |
I have to use EMCC 2.0.16. There's an old issue around here about this. |
I am trying to use tree-sitter in the browser (using Webpack) and when I load the grammar I built, I get this error
It happens on this line
I can see that the wasm file gets requested and is successfully downloaded. This happens with other grammars, not just the Python grammar. I am able to load wasm files I built a couple months ago.
I am using Node 16 and emcc 3.0.2 installed with Homebrew on an M1 Macbook Air with macOS 12.1
I am building the grammar with
You can download a broken
tree-sitter-bash.wasm
file I built if you doIn fact, the fastest way to reproduce this issue would be to
git clone git@github.com:curlconverter/curlconverter.github.io.git cd curlconverter.github.io git checkout c2d12aebf58c83f20a766edde46e875b5c976b6b
then in package.json change
"curlconverter": "^4.0.0-alpha.7",
to"curlconverter": "=4.0.0-alpha.8",
before runningnpm install
then runningnpm start
and you should see the error in the browser's JS console. The grammar file shipped in the previous version (i.e. 4.0.0-alpha.7) should work though.I also created a gist of a simpler project that I can reproduce this issue with: https://gist.github.com/verhovsky/a04c7256da13797e312acd0a8afd9023
The text was updated successfully, but these errors were encountered: