[Help Wanted] "NetworkError when attempting to fetch resource" (Self Hosting Error)
Describe the issue Every time I try to spin up a new Standard Notes instance since about Q1 of 2024 I keep getting this "NetworkError when attempting to fetch resource" error.
Steps to reproduce the behavior:
- I go through the entire process of spinning up a new instance.
- I try to create an account/login from different devices.
- And I get "NetworkError when attempting to fetch resource" on the web app or "Unknown error" on the MacOS app. Or it will accept the credentials, let me into the account then request I authenticate again every 5 seconds.
Expected behavior The deployment is supposed to accept the new credentials, create said account; then sign me in. Its not doing that. And Ive had to fall back to app.standardnotes.com for my backend instead.
Desktop (please complete the following information):
- OS: Sequoia 15.0.1
- Browser: Mullvad Browser, Safari
- Version: 3.195.13
Smartphone (please complete the following information):
- Device: iPhone 14 Pro Max
- OS: iOS 18.2.1
- Browser: Safari, Brave Browser
- Version: 3.194.11
Additional context This instance is running on a VPS using Ubuntu 24.10. I've tried this many times in many different ways. I even found out it could be a CORS issue so I rewrote my NGINX config and i've still had no luck. If anyone can provide guidance I appreciate it. :(
Do you by any chance see any "Cookie <cookie_name> rejected for invalid domain" errors in the Developer tools Console in the web app when logging in? If you do, this should help: https://github.com/standardnotes/server/issues/1068
tl;dr: You need to set COOKIE_DOMAIN=<your-API-host> in the .env file for the cookies to work correctly.
Do you by any chance see any "Cookie <cookie_name> rejected for invalid domain" errors in the Developer tools Console in the web app when logging in? If you do, this should help: standardnotes/server#1068
tl;dr: You need to set
COOKIE_DOMAIN=<your-API-host>in the.envfile for the cookies to work correctly.
I’m just now seeing this. My apologies for the really late reply. I’m going to try to spin up a new instance now with this new information.
Are you using one of the apps or the official web app? I am asking because I have this issue on the official web app due to a CORS issue.
Content-Security-Policy: The page’s settings blocked the loading of a resource (connect-src) at https://notes.example.com/v2/login-params because it violates the following directive: “connect-src https://api.standardnotes.com/ https://sync.standardnotes.org/ https://files.standardnotes.com/ ws://sockets.standardnotes.com https://raw.githubusercontent.com/ https://listed.to/ blob:”
yeah, I have the CORS issue too