standardnotes / forum

Support from other community members. For 1-on-1 help, please contact help@standardnotes.com.
https://forum.standardnotes.org
196 stars 9 forks source link

Files Upload Erroring Out - Self Hosted #2435

Closed spazzanator closed 1 year ago

spazzanator commented 1 year ago

Hi There

Up until now I haven't had a need to use the Files portion of Standard Notes. I had followed the doc's every time I updated the standalone and updated all .env files as required.

Tonight I've gone to use it and think I've messed something up along the way, tried resolving it myself but cant seem to pin point an error in the logs.

I essentially get the same UI error as presented in https://github.com/standardnotes/forum/issues/2419 Unable to start upload session There was a problem uploading the file

I re-read the docs and even though it states using the Public Facing URL, I have a feeling this is where my issue lies. I have tried localhost as it was initially in the sample file I have tried the internal IP address and tried uploading the file while connected to the network I have tried creating a separate subdomain where its hosted and pointed the port to the IP where its hosted I have tried using the existing subdomain and creating a stream in Nginx Proxy Manager It is going through Cloudflare

I have used the client and the web app and aren't having much luck.

I don't know why I try and sort all of this at 12.30pm at night (especially on a weeknight with work the next morning), I just like starting something and trying to get it working, but in this instance I'm not having much luck. Maybe its something that could be updated in the documentation once its figured out? (Just a thought) Am I just being silly and have missed something obvious or am I not the only one experiencing this?

deljones commented 1 year ago

I have done two updates to both the server and the app hoping there would be a fix for this but nothing! Using any iOS device to upload or download files does not work for self hosted. Period. However if you are self hosting SN say they only support self hosting when using Docker, even then it’s a bit hit and miss. Are you using Docker? Can I ask, you may not use them, but does Listed work on your self hosted instance, ie can you create an author. Also how about Cloud backup and Invite. I’d hazard a guess that they don’t work either?

spazzanator commented 1 year ago

I should try and upload with the iOS app too, I am self hosting using the provided Docker Containers.

Ill confirm with the Listed Author, Cloud Backup and Invites.

spazzanator commented 1 year ago

Sorry for the late reply on this, but I can now confirm that creating an Author for Listed and backing up to the likes on Onedrive also do not work. I half expected invites to not work as I havnt set up any smtp servers anywhere for it to send mail out, but yes they dont work either

deljones commented 1 year ago

Hi @spazzanator thanks for confirming this. Are you using?. SN claim to only support self hosting when using Docker. Now they want a fee, which wouldn’t be too bad if the software worked!!!

I paid the 39 bucks but told it was to be paid yearly. Of course I‘la be stopping that if the software doesn’t work.

Unfortunately I’m using YUNOHOST and SN is no longer supported. My journey with SN has been short which is a shame because I liked the offering but only 25% of it works.

dj

spazzanator commented 1 year ago

So I have had a few more days and played around over those days. Leaving my initial server untouched, I had a spare machine lying around a little less powerful but still enough to run ubuntu server on and rebuilt my entire server, followed the selfhosted instructions and imported my notes once again.

I must admit each time ive installed Standard Notes SelfHosted its been easier and easier, this time took less than 15minutes. Comparing that alone to the first time I installed it back in December 2021 its soo much easier to follow.

Although, I now have a new server setup and tried uploading files again, from my ios app, the web app, selfhosted web app and the windows desktop client. The Web app is the one that tells me straight up that theres an error which is exactly the same as before. The Desktop app, doesnt really tell me anything.

After looking at some network logs, im just getting ERR_CONNECTION_TIMED_OUT leads me to believe I still have something configured incorrectly, either a variable, something DNS related or my domain name

spazzanator commented 1 year ago

I slept and came back to it with a fresh mind, Its resolved. Pulled up all DNS, domain and variables and went through them all. Re read all the instructions and focused on the following statement

"Edit FILES_SERVER_URL to the final public-facing URL of your server. For example, if you are self-hosting on a server on your local network which you know has an IP of 10.0.1.2, set this value to http://10.0.1.2:3125/. Read more about configuring your setup for files."

All domains and DNS in Cloudflare were set and pointing to the correct location, it was the environment variable that I changed to get it to work. I left the EXPOSED_PORT variable as it was and changed the FILES_SERVER_URL. initially I had it set to http://sub.domain.com:3125 but since I had NPM running all I needed to do to get it running was remove the port number from the URL and make it point to https. the end result was FILES_SERVER_URL=https://sub.domain.com After stopping the stack and starting it again, I tested a file upload and it worked. I then tested downloading it on my phone while it wasnt connected to the network and it all worked. Then pulled my laptop up and connected it to the hotspot, uploaded a file and it works as expected.

Marking this as resolved. Now onto automated cloud backup's!

motoridersd commented 1 month ago

I spent a LOT of time trying to figure why my File Uploads were not working. On Discord someone finally had me look at the subscription messages in the browser debugs, and I found that under subscription-invites I was seeing CORE_USER instead of PRO_USER.

I had missed step 5 of this page after activating an offline subscription: https://standardnotes.com/help/48/can-i-use-extensions-with-a-self-hosted-server

Step 5 has you activating server-side subscription on a self-hosted server: https://standardnotes.com/help/self-hosting/subscriptions

Once I did that, I got a "Purchase was Successful" message on Standard Notes, and after that I was finally able to upload files.

So if you're having issues, make sure your subscription is fully activated