error to download file in jupyterhub - failed - network error

when I click on download some file in jupyterhub, it presents error:

failed - network error

as shown in the screenshot below:

failed_download_file

this problem happens in google chrome and edge, I tested it in firefox and the download went without problem

is there a way to fix this issue or is it a jupyterhub bug?

We’ll need more information before we can help you. For example, are you using JupyterLab or Jupyter notebook, are you running JupyterHub or is it managed by someone else, is this your own computer that you’re in full control of?

Getting good answers to your questions is a good place to start if you’re not sure what to include.

i am using jupyterhub with jupyterlab

it is installed on a host that is part of a cloudera cluster

jupyterhub has integration with AD and with spark from the cloudera cluster

I have full control over the service

Try opening your browser/debug console in all browsers, and compare the logs. Do you see any errors in chrome/edge?

Can you try launching your singleuser server without JupyterHub- do you get the same errors?

accessed jupyterhub with LDAP (AD) account to access jupyterlab

i opened the console option in chrome and clicked on download file in jupyterlab but it didn’t show error in the console when downloading the file

If it’s working now then maybe it was a temporary network/server error?

is not working

when I click on download some file in jupyterlab, it presents error:

failed - network error

as shown in the screenshot below:

failed_download_file

Since it’s working with Firefox it’s most likely something to do with your computer rather than JupyterHub. For example do you have any plugins installed, firewall/anti-virus/security software, or anything else?

i don’t have any extension installed, antivirus, firewall

i even tried by incognito window in google chrome and it presents the same error

it must be some very complex “bug” in jupyterhub/jupyterlab

It might be a bug in JupyterHub/JupyterLab, but without sufficient information for someone to reproduce it I’m afraid there’s not much we can do.

i found some people with the same problem, that’s why it’s a bug anyway

well, as there is no definitive solution in the jupyter community, I will use jupyterhub/jupyterlab in firefox for now

Checking the server logs and the browser console will help. It could be related to some CORS/header checks, which can differ across browsers. Either way, there should be a good message in the single-user server’s and/or browser’s js console that will help identify the problem.

unfortunately I did not find any errors that may be in this download

I looked at the logs of the jupyterhub service, the server where jupyterhub is installed, the browser and none showed an error

I left all the logs open and clicked download and no error was generated in the logs

the download gives the error as shown in the screenshot

the funny thing is that when I open the browser downloads page and click on the download link for the file, the download succeeds.

this behavior is a very strange bug, I found other users with the same problem, I will wait to release a version that fixes this problem.

Just ran into the same problem on a setup with self-signed SSL certificate (with mismatched wildcard domain, manually clicked “Proceed to …” in Chrome). The problem was solved after I:

  1. updated the self signed certificate with matching domain
  2. imported the self signed certificate (in fact the self signed CA of the certificate) into client OS (specifically for MacOS: KeyChain Access → System → Certificate → right click on the certificate and choose “Get Info” → under “Trust”, select “Always Trust” for “Secure Socket Layer (SSL)”

I think one of the steps (or maybe both) fixed the problem for me.