Live data from Hacker News

Hosting SQLite Databases on GitHub Pages

phiresky.netlify.app

11–20 of 82 posts

Re: Hosting SQLite Databases on GitHub Pages

#11

Good writeup, thanks! All the code snippets, when run, give me the following error message: [error: RuntimeError: abort(Error: server uses gzip or doesn't have length). Build with -s ASSERTIONS=1 for more info. (evaluating 'new WebAssembly.RuntimeError(e)')] Could that be a Mobile Safari thing?

Same error on mobile chrome on my android

Same error on mobile Firefox, but mobile Chrome works for me (Android).

Re: Hosting SQLite Databases on GitHub Pages

#12
I get this error on Firefox 90.0.2 on Debian 10. It works in chrome though.

[error: RuntimeError: abort(Error: Couldn't load https://phiresky.netlify.app/world-development-indicators-sq.... Status: 0). Build with -s ASSERTIONS=1 for more info.]

Other than that, is pretty awesome and exactly what I was hoping for.

Re: Hosting SQLite Databases on GitHub Pages

#13

I get this error on Firefox 90.0.2 on Debian 10. It works in chrome though. [error: RuntimeError: abort(Error: Couldn't load https://phiresky.netlify.app/world-development-indicators-sq... . Status: 0). Build with -s ASSERTIONS=1 for more info.] Other than that, is pretty awesome and exactly what I was hoping for.

Looks like Netlify changed something since I wrote this article regarding what headers they send. Detecting support for Range-requests is kinda tricky and relies on heuristics [1]. Not sure why it still works in Chrome though.

You can go to this version of my blog, it should work there:

https://phiresky.github.io/blog/2021/hosting-sqlite-database...

Maybe the link could be updated?

Except for the DOM demo, since those need some Cross-Site-Isolation Headers you can't set on GitHub Pages (that's the reason I mirrored it to Netlify originally)

[1] https://github.com/phiresky/sql.js-httpvfs/issues/13

Re: Hosting SQLite Databases on GitHub Pages

#14
post #8

Earlier quoted context omitted.

Why don't people ditch Safari and use Chrome instead.

I’m not sure if this is sincere but Apple do not allow other browser engines. They are all Safari skins.

> Safari skins

More like embedded WebViews.

Re: Hosting SQLite Databases on GitHub Pages

#15
post #4

Good writeup, thanks! All the code snippets, when run, give me the following error message: [error: RuntimeError: abort(Error: server uses gzip or doesn't have length). Build with -s ASSERTIONS=1 for more info. (evaluating 'new WebAssembly.RuntimeError(e)')] Could that be a Mobile Safari thing?

Yeah it's sad apple has crippled their browser the browser on a $40 android tablet is more powerful than safari running on a $1200 iPhone

https://news.ycombinator.com/item?id=28016398

Re: Hosting SQLite Databases on GitHub Pages

#17

bummer on not being able to write to sqlite. I am using neocities and was wonder how i could get a db into play

I don't think it would be impossible, although I think it may be easier to just use a JavaScript Git client and something like Critic markup to make changes.

Re: Hosting SQLite Databases on GitHub Pages

#18

I get this error on Firefox 90.0.2 on Debian 10. It works in chrome though. [error: RuntimeError: abort(Error: Couldn't load https://phiresky.netlify.app/world-development-indicators-sq... . Status: 0). Build with -s ASSERTIONS=1 for more info.] Other than that, is pretty awesome and exactly what I was hoping for.

Looks like Netlify changed something since I wrote this article regarding what headers they send. Detecting support for Range-requests is kinda tricky and relies on heuristics [1]. Not sure why it still works in Chrome though. You can go to this version of my blog, it should work there: https://phiresky.github.io/blog/2021/hosting-sqlite-database... Maybe the link could be updated? Except for the DOM demo, since thos…

Maybe because Firefox is stricter? Netlify (incorrectly) sends a 4,583 byte chunk, while GitHub (correctly) sent precisely 1024 bytes. Chrome might just trim it to 1024 bytes, but Firefox just fail-safe at the difference.

Edit: Netlify is indeed wrong: asserts in the headers that the content length is 1024 bytes but sends up 4,583 bytes of content. That will definitely fail in Firefox.

Post reply on HN