Offtopic- thanks for OS.js
Closed this issue · 9 comments
During this difficult time, we feel the need to help with the fight against the pandemic. So we plan to use OS.js as a platform to donate code for Scripting To Save Lives, where you can donate code or money to fight against COVID-19
Thanks for creating such a versatile and extendable platform, we all appreciate it
That's really cool 😄
Let me know if you need help or anything like that and I'll do my best.
Stay safe!
I setup OS.js for a friend to act as a code server (Upload HTML here), then they put it on a .com domain and it's been acting up since
Eg. Increased login time, loss of connection etc
I got this notification:
connection to OS.js could not be established, some features might not work properly
You just uploaded the dist/
directory to a remote server ?
No, our project is hosted on glitch.com which allows custom domains.
we set it up, added the domain and done
I have no experience with glitch, really. So I don't know how their hosting works.
But what you're experiencing is pretty typical of a bad connection.
Open your browser devtools and visit your glitch domain and look at the Console and Network tab.
Do you have a free glitch account ?
For free users, Glitch apps go to sleep after five minutes of inactivity — if an app is waking up, your users might see a loading screen (we do this to keep our servers happy). Boosted apps don’t sleep and are always ready to go.
Because this sounds like trouble.
Glitch uses fly.io for custom domains
And i do have a free glitch account, but last week glitch released a premium service where apps do not sleep- alongside more disk space and no request limits.
But I have configured the container to run 'npm run serve' when the server reawakens, 'sleep' doesn't impact OS.js at all
OK. Then there's not really much I can do except maybe try glitch for myself.
connection to OS.js could not be established, some features might not work properly
This basically means that the websocket connection failed (never connected).
Eg. Increased login time, loss of connection etc
As for this the only tip I have is to look at the browser devtools console and network tab.
On the server-side you can also see in the server log output how much time the server spent on requests.
Ex: GET /881c86876af63b732063d7bdd51bb226.png 200 1034 - 12.578 ms
Okay, thanks!
FYI, glitch handles OS.js perfectly