"File Upload Disconnected. Please try again." in ERPNext: v11.1.18

Hello - seems to occur with anything over 15kb or so - “File Upload Disconnected. Please try again.” in ERPNext: v11.1.18 (master) Frappe Framework: v11.1.18 (master)

Adding the [sitename] used when creating the site with
bench add-site [sitename]
to the hosts file and calling that [sitename] from the browser fixed a similar issue for me
Maybe that’ll work for you

Discussed here

1 Like

ok - that seems to make sense, but was not an issue in v10 … so I have a site name but since I only want erpnext available on internal network am just accessing with local ip address (192.168.2.xx) - can I just add the static ip address in there as linked to the site name?

We will always only have internal network access and will not use SSL for off-network access, by design, for security.

Thanks for looking at this!

I added
127.0.0.1 site1.local
to /etc/hosts on the ERPNext box

and
192.168.0.251 site1.local (your erpnext ip will be different, obviously)
to c:\windows\system32\drivers\etc\hosts on the client

large filemanager transfers then worked for me
large files are managed by socket.io and need to resolve the hostname from the browser header call to pick the right folder for the uploads

Well I have tried all I can think of and still same error with any file over about 10-15kb, still…

If you’ve also added the hosts entry on the client’s side
192.168.2.70 site1.local

and called the site in your client’s browser
(ex http://site1.local:8000)

and restarted bench after those changes

and the large files still don’t work, then you might want to look through that earlier discussion link
someone said they had to chmod the folder.
Just the hosts entries and calling the sitename in the browser worked for me. YMMV

Best wishes and good luck.
Post back if you find the issue so others can benefit, please

So I am unfamiliar with the need to set this on the client workstations … I didnt need to do anything in V10, but do you mean there is a setting for Chrome on our windows workstations that must have something? I have not heard that before. I have a Debian server running ERpnext which we were accessing fine from about 15 windows machines on our internal network - I was able to upload files fine before I upgraded to Erpnext v11.1 and now get the error for files over about 15kb only

I’m just reporting to you what worked for me. I have no experience with v10, but I’ve have the upload issue in all cases without doing what I’ve outlined, with large files on v11 & v12. hosts entries on the server and client fixed it for me on both versions - still some quirkyness in v12 with creating folders though.

Specifically - I had to add hosts entries on both the server, and the client I was using to access that server.
If you have 15 clients, then it sounds like you may need DNS to do it automatically. I have a small environment with a server on a VM and only one or two clients.

Gotcha - that makes sense! Thanks for taking a look, it has given me a good start to work out the kinks in V11

Well I think the issue is related to this - everything works normal except I cant upload any files larger than about 10-12kb. I understand this is likely related to the socketio function, but nothing I have tried is resolving it. I only want to run erpnext on the local network and so do not have a FQDN … I did name the site in bench, however with the name next.belldesigncloud.com in case I did want to do this.

It was not an issue in v10, I had no upload issues. So can I rename the erpnext-prd site (I only have one site in bench) with the ip address so socketio will recognize the right folder for uploads, or what would be the best way to resolve this? Can I use the nginx .conf file to bind the erpnext site name and the ip address perhaps, as in a virtual host in apache?

I have entered the ip address of the server erpnext is running on in the hosts folder but I still cant upload or use the data import function.

I just ran bench update and it is up to Installed Apps
ERPNext: v11.1.20 (master)

Frappe Framework: v11.1.21 (master)

Well I will look for that chmod article, still cant upload anything more than 10kb into v11.1

thanks for your help!

Sorry to bug you again, I am still not able to resolve this as of yet - I am just not wanting to open this server to the internet by forwarding ports through our firewall, etc - Do you mean there is a way in Windows Server DNS to bind the internal ip address with the erpnext host name I set up when installing erpnext? I would think there is but am not having much luck finding out how … I am aware I can make it a subdomain and point it from my web host where I have domain names hosted, but I want to use a local internal ip address and keep it all behind the firewall as we will only access it from the local network.

I can’t tell you how to add the local ERPNext IP to Windows Server DNS - I’m sure it can be done and it could have the benefit of not having to touch each client - but for small networks you can adjust each client’s hosts file.

You’ve already done it on the ERPNext server
127.0.0.1 site1.local (or whatever)

Now at each client you can edit the hosts file and add the IP of the static address of the server.
on a windows client the hosts file is located at
C:\Windows\System32\Drivers\etc
You’ll need to open your editor with Administrator privledges, though, to edit the file

On a linux box it’s at /etc/hosts

So, if the IP of the ERPNext server is 192.168.0.222 and the sitename is site1.local - then add this at the client’s hosts file

192.168.0.222 site1.local

Then make sure the client uses the hostname entered, instead of the IP address when browsing

It worked, and can now upload files! Thank you, I have been around but never ran into this!

now the question, is this stable and will stay or do I need to go the fully qualified subdomain name at some point to make it reliable?

Thank you so much!

It only needs to be done once on each client workstation - I can’t think of any risks related to a hosts entry, except that each client must be touched (more of an annoyance then a risk). It will persist between client reboots, and would only ever need to be changed again if the IP address of the server changes.

You’re welcome.

1 Like

Awesome! You the man!

sorry but can you explain this step by step :slight_smile: