mirror of
https://github.com/stoatchat/self-hosted.git
synced 2026-07-21 04:25:24 -04:00
bug: Client Crash Report after installation #103
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jakewelliott on GitHub (May 9, 2025).
What happened?
I have the entire system setup on my Unraid server. I had to work around a couple version issues but finally got everything to a point where all containers would start and were healthy. I have my NGINX proxy pointing to Caddy and updated the toml and env files as described in the readme. Cloudflare DNS is set up to proxy it so that I get HTTPS connections. When I visit the domain, I get a "Client Crash Report" which is clearly something created by Revolt. The stack trace makes no sense to me. I visited the Sources tab in my dev tools and looked at the two files mentioned. Most of the column numbers are not even valid column numbers, there is one line that is part of the stack trace which is just a variable declaration (not even being initialized), the function names don't match with the line mentioned, as well as other random issues. Below is a look at the stack trace but I have removed all instances of my domain. For instance, if it was running on
subdomain.domain.tldthen that entire block was replaced with{my domain}. I think it is important to note that I did use Postman to make a GET request tohttps://{my domain}/apiand got back a 200 ok response with some details about Revolt. So clearly my api is working and the frontend is too since this Revolt page is appearing, leading me to believe that the issue is not with any of the proxying that is going on but rather something else under the hood. Could anyone provide any insight into what is going on as well as how to fix it? I have a little bit of experience with this but not ever a stack trace that didn't match up with the code like this so don't even understand what the issue is. If more information is needed, I would be happy to provide; I just don't know where the issue could even be so what relevant pieces of information might be needed to troubleshoot this.@https://{my domain}/assets/Login.c46a8a30.js:1:12504
@https://{my domain}/assets/main.08ce25a6.js:134:50452
trackDerivedFunction$1@https://{my domain}/assets/main.08ce25a6.js:114:20020
@https://{my domain}/assets/main.08ce25a6.js:114:26644
useObserver@https://{my domain}/assets/main.08ce25a6.js:134:50431
j$6@https://{my domain}/assets/main.08ce25a6.js:1:7698
w$8@https://{my domain}/assets/main.08ce25a6.js:1:3465
j$6@https://{my domain}/assets/main.08ce25a6.js:1:7955
w$8@https://{my domain}/assets/main.08ce25a6.js:1:3465
j$6@https://{my domain}/assets/main.08ce25a6.js:1:7955
w$8@https://{my domain}/assets/main.08ce25a6.js:1:3465
j$6@https://{my domain}/assets/main.08ce25a6.js:1:7955
w$8@https://{my domain}/assets/main.08ce25a6.js:1:3465
j$6@https://{my domain}/assets/main.08ce25a6.js:1:7955
w$8@https://{my domain}/assets/main.08ce25a6.js:1:3465
j$6@https://{my domain}/assets/main.08ce25a6.js:1:7955
w$8@https://{my domain}/assets/main.08ce25a6.js:1:3465
j$6@https://{my domain}/assets/main.08ce25a6.js:1:7955
w$8@https://{my domain}/assets/main.08ce25a6.js:1:3465
j$6@https://{my domain}/assets/main.08ce25a6.js:1:7955
w$8@https://{my domain}/assets/main.08ce25a6.js:1:3465
L$5@https://{my domain}/assets/main.08ce25a6.js:1:9348
j$6@https://{my domain}/assets/main.08ce25a6.js:1:8169
w$8@https://{my domain}/assets/main.08ce25a6.js:1:3465
L$5@https://{my domain}/assets/main.08ce25a6.js:1:9348
j$6@https://{my domain}/assets/main.08ce25a6.js:1:8169
w$8@https://{my domain}/assets/main.08ce25a6.js:1:3465
L$5@https://{my domain}/assets/main.08ce25a6.js:1:9348
j$6@https://{my domain}/assets/main.08ce25a6.js:1:8169
w$8@https://{my domain}/assets/main.08ce25a6.js:1:3465
j$6@https://{my domain}/assets/main.08ce25a6.js:1:7955
w$8@https://{my domain}/assets/main.08ce25a6.js:1:3465
j$6@https://{my domain}/assets/main.08ce25a6.js:1:7955
w$8@https://{my domain}/assets/main.08ce25a6.js:1:3465
j$6@https://{my domain}/assets/main.08ce25a6.js:1:7955
w$8@https://{my domain}/assets/main.08ce25a6.js:1:3465
j$6@https://{my domain}/assets/main.08ce25a6.js:1:7955
w$8@https://{my domain}/assets/main.08ce25a6.js:1:3465
j$6@https://{my domain}/assets/main.08ce25a6.js:1:7955
@https://{my domain}/assets/main.08ce25a6.js:1:2717
some@[native code]
g$7@https://{my domain}/assets/main.08ce25a6.js:1:2596
@Docteh commented on GitHub (May 9, 2025):
First thing I'd check is if the URLs mentioned in /api are correct.
"ws": "wss://subdomain.domain.tld/ws",
Oh, are you getting an error just getting the first page, not asking for either a login or to create a new account? hmm.
@jakewelliott commented on GitHub (May 9, 2025):
@Docteh
I assume you're talking about when I make the GET request to the api endpoint. In which case, yes they are all correct and ws looks exactly like what you commented.
Yes, this error comes up before ever seeing any other pages. I can't even get to a login screen or anything.
@Docteh commented on GitHub (May 10, 2025):
looks like in that file they're trying to read the invite_only variable from somewhere, as a test I replaced the /api/ response with something else on mine and I get the following
In the browser dev tools, look at the response the front end is getting when it hits the api
Maybe throw the json stuff at a json validator? but invite_only should be either
trueorfalse@insertish commented on GitHub (May 12, 2025):
I've come to associate the
invite_onlyerror with a web server configuration error serving non-JSON data where JSON should be. Can you inspect network requests and see what the exact response is for the root API route?@jakewelliott commented on GitHub (May 13, 2025):
@insertish @Docteh
The frontend never even contacts the backend. The only request it makes is to https://reporting.revolt.chat/ in order to report the failure, which fails due to origin issues.
@jakewelliott commented on GitHub (May 13, 2025):
I moved it to a different domain temporarily to assist with troubleshooting. You can see the error for yourself if you go to https://chat.jakee.dev/
@jakewelliott commented on GitHub (May 13, 2025):
Here are some of my configuration files:
Revolt.toml(keys removed for security purposes)Caddyfile.env.webdocker-compose.yaml@Docteh commented on GitHub (May 13, 2025):
from revites inject.js, a script that runs in the web container
https://github.com/revoltchat/self-hosted/blob/99b0d743af8a70d71ce0a8a205500efff80330de/generate_config.sh#L1-L5
Your .env.web has
slap /api on the end of that REVOLT_PUBLIC_URL, and then likely need to compose down/up the web container rather than just a restart.
Separately, I'm not sure if your port assignments in your Docker
compose.ymlmatter, butThe websocket is actually handled by
events, which is one down fromapiAlso I tried manually going to https://chat.jakee.dev/api just cause and got a gateway error from cloudflare
@jakewelliott commented on GitHub (May 13, 2025):
I will update those two things later and will update the status. In the meantime, I wanted to mention the following:
In the README under the section for custom domains, the instructions say to remove the /api in the TOML file. If changing this fixes the issue, the README must be incorrect.
@jakewelliott commented on GitHub (May 13, 2025):
And regarding the Cloudflare issue: I tried changing something earlier and had to docker compose down and back up to update it and see if it made a difference. My assumption is that was what caused the issue for you; you had attempted to navigate to it while it was going down/back up. I just verified and it is working right now
@Docteh commented on GitHub (May 13, 2025):
Ohhh, okay. I followed their VPS instructions further above which had me run generate_config.sh instead of editing a bunch of files
I guess I'll file a PR for the readme.
Now, we can pull in the configuration for Revolt:
Generate a configuration file by running:
@Docteh commented on GitHub (May 13, 2025):
There, https://github.com/revoltchat/self-hosted/pull/151 is filed to edit the README
@dalekcoffee commented on GitHub (May 21, 2025):
Thanks for this!, looks like this was my issue as well, been racking my brain for a for a few hours on this haha
@quelsh commented on GitHub (Jul 16, 2025):
I was also struggling for hours now why my instance wont work, showing the same crash as people reported here. I will try the fixes as well but want to mention the issue https://github.com/revoltchat/self-hosted/issues/135 where the poster got rid of their problem by removing the /api part?! Unfortunately web searches containing the error lead to only that issue instead to also this one.
Edit: I tested the proposed fix and appended /api to the REVOLT_PUBLIC_URL in .env.web. This fixed the issue on my end