BobbyWibowo / lolisafe

Blazing fast file uploader and awesome bunker written in node! 🚀
MIT License
317 stars 56 forks source link

Page not loading properly #628

Open ambozz opened 1 year ago

ambozz commented 1 year ago

I've tried installing this on 2 of my servers but on both I am facing some issues. Most of the times the page won't load because of some things not loading and only in some few cases the page loads.

This is how it looks in the requests (sometimes changes but style.css almost never loads) Tested with Chrome & Firefox on Ubuntu, Chrome Mobile, Safari, Opera GX on Windows all don't load it. image

I am running on Ubuntu 20.04 with Node.js 16 on both servers.

Running on my PC it works completely fine running on Ubuntu 22.04 but also Node.js 16.

I have been using the default config and not changed anything in them except for enabling files being served through node.

I can't find where the issue is on why in most cases it doesn't load but then sometimes in rare cases it will and then it works fine.

BobbyWibowo commented 1 year ago

It sounds more or less identical with the issue in https://github.com/BobbyWibowo/lolisafe/issues/566#issuecomment-1224475499

In short, there seems to be an odd quirk in that specific machine, whenever lolisafe attempts to establish a "read stream" to the physical files upon visits

You can likely circumvent the issue by serving files with Nginx/etc, AND pre-caching website assets into RAM by enabling environmental variable as linked above

The root cause haven't been found till this date, since I haven't been able to reproduce it on any of my local nor remote machines so far

perdedora commented 1 year ago

I'm getting sorta of the same error when running yarn dev. The css, js and fonts doesn't load but running yarn start works perfectly.

Screenshot from 2023-02-20 11-48-36 Screenshot from 2023-02-20 11-48-53 Screenshot from 2023-02-20 11-50-01

BobbyWibowo commented 1 year ago

It sounds like for some reason dist-dev directory wasn't being filled with development-version of the client assets when running under yarn dev

Meanwhile yarn start worked okay because it's using pre-built assets from dist directory

BobbyWibowo commented 1 year ago

@perdedora I overlooked the fact that yarn dev would not build dev client assets by default (you'd have to use yarn dev:reload first) Should be fixed in https://github.com/BobbyWibowo/lolisafe/commit/807f1533243acd7435d015ca74136b7600e1951d

Still unrelated with OP's issues tho