electric-sql / pglite

Lightweight Postgres packaged as WASM into a TypeScript library for the browser, Node.js, Bun and Deno
https://electric-sql.com
Apache License 2.0
4.74k stars 79 forks source link

Aborted in WebContainer #2

Open d3lm opened 4 months ago

d3lm commented 4 months ago

I am trying to run this in WebContainer and now that #1 was merged and released I am seeing the following error:

RuntimeError: Aborted(). Build with -sASSERTIONS for more info.
    at abort (file:///home/projects/node-oqtitn/node_modules/@electric-sql/pglite/dist/chunk-RM7SEAOI.js:412:15)
    at _abort (file:///home/projects/node-oqtitn/node_modules/@electric-sql/pglite/dist/chunk-RM7SEAOI.js:5626:7)
    at wasm://wasm/02d347d2:wasm-function[123]:0x77e6
    at wasm://wasm/02d347d2:wasm-function[6809]:0x6ac11a
    at wasm://wasm/02d347d2:wasm-function[4366]:0x437a87
    at wasm://wasm/02d347d2:wasm-function[14076]:0x9a2381
    at wasm://wasm/02d347d2:wasm-function[15480]:0x9de758

But only if there's a db folder. If you remove the folder then it works fine.

Any idea? I think it'd be nice to have a debug build as well where -sASSERTIONS is enabled. This could maybe be published under a specific debug tag?

samwillis commented 4 months ago

Hey @d3lm,

I've published a debug build with -s ASSERTIONS=1 although I'm unsure is it's giving us any more detailed errors. https://www.npmjs.com/package/@electric-sql/pglite/v/0.0.1-debug.2

There is also the ASSERTIONS=2 and SAFE_HEAP=1 options we can try.

d3lm commented 4 months ago

Thanks!

That's strange, cause it's still not giving more info and prints the same error 🤔

vBuravlev commented 4 months ago

Confirm. I couldn't run PG lite in any of the options. This repository is 100% erroneous code.

Yaromey commented 3 months ago

Confirm. I couldn't run PG lite in any of the options. This repository is 100% erroneous code.

Same here. On Windows machine. Do you also use Windows?

samwillis commented 3 months ago

Same here. On Windows machine. Do you also use Windows?

Hey @Yaromey, there's a bug on Windows #34, should be fixed this week!