Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection error while installing vscode with anaconda #10286

Closed
niskrev opened this issue Oct 31, 2018 · 9 comments
Closed

Connection error while installing vscode with anaconda #10286

niskrev opened this issue Oct 31, 2018 · 9 comments
Assignees

Comments

@niskrev
Copy link

niskrev commented Oct 31, 2018

Actual Behavior

After I answer with yes to this question

Do you wish to proceed with the installation of Microsoft VSCode? [yes|no]

I get the following output:

Proceeding with installation of Microsoft VSCode
Checking Internet connectivity ...
Please make sure you are connected to the internet!
Check /home/xxx/anaconda3/vscode_inst.py.log for more info

The output of vscode_inst.py.log is:

ERROR:vscode_inst:haveInternet
Traceback (most recent call last):
File "/home/xxx/anaconda3/pkgs/vscode_inst.py", line 143, in haveInternet
assert r.status_code == 200
AssertionError
ERROR:vscode_inst:haveInternet
Traceback (most recent call last):
File "/home/xxx/anaconda3/pkgs/vscode_inst.py", line 143, in haveInternet
assert r.status_code == 200
AssertionError

There is no problem with my internet connection.

Expected Behavior

installation should complete

Steps to Reproduce

bash ~/Downloads/Anaconda3-5.3.0-Linux-x86_64.sh

Anaconda or Miniconda version:

Anaconda3-5.3.0

Operating System:

ubuntu 18.04.1

@sreisjr
Copy link

sreisjr commented Oct 31, 2018

Same problem here on macOs Mojave

ERROR:vscode_inst:haveInternet
Traceback (most recent call last):
File "/Users/username/anaconda3/pkgs/vscode_inst.py", line 143, in haveInternet
assert r.status_code == 200
AssertionError
ERROR:vscode_inst:haveInternet
Traceback (most recent call last):
File "/Users/username/anaconda3/pkgs/vscode_inst.py", line 143, in haveInternet
assert r.status_code == 200
AssertionError
ERROR:vscode_inst:haveInternet
Traceback (most recent call last):
File "/Users/username/anaconda3/pkgs/vscode_inst.py", line 143, in haveInternet
assert r.status_code == 200
AssertionError

@niskrev
Copy link
Author

niskrev commented Oct 31, 2018

I ended up installing vscode successfully using Anaconda Navigator (after reinstalling anaconda without asking to install vscode). However, I had to update some system packages first, this may have caused the original problem.

@goanpeca
Copy link

goanpeca commented Nov 1, 2018

@niskrev what system packages did you have to update?

Pinging @nehaljwani

@niskrev
Copy link
Author

niskrev commented Nov 1, 2018

@goanpeca When I was trying (seemingly unsuccessfully) to install vscode with Anaconda Navigator I got

The package system is broken

message from Software Updater. I run

sudo apt clean
sudo apt update
sudo apt install -f

Then restarted Anaconda Navigator and vscode was installed. Whatever the above commands did/installed seemed to have helped.

@nehaljwani
Copy link

To check internet connectivity, the script sends a HEAD request to https://vscode-update.azurewebsites.net/api/update/linux-deb-x64/stable/version which used to work a while ago, returning 200. But now it returns 301, the logic will have to be fixed or changed.

@belkka
Copy link

belkka commented Nov 7, 2018

To fix the problem allow_redirects=True can be specified:
r = requests.head(VSCODE_ENDPOINT, timeout=5, allow_redirects=True)
instead of
r = requests.head(VSCODE_ENDPOINT, timeout=5)

According to requests docs:

By default Requests will perform location redirection for all verbs except HEAD.

http://docs.python-requests.org/en/master/user/quickstart/#redirection-and-history

Another option is to check that r.ok is True, because it also means we have an internet connection.
I would like to make a PR but cannot find the source of vscode_inst.py

@nehaljwani
Copy link

v5.3.1 Installers will be released soon with the fix! :-)

@JShibby
Copy link

JShibby commented Nov 17, 2018

@nehaljwani , any way for us to follow or be notified when v5.3.1 installers are out (with the fix to this issue)?

@nehaljwani
Copy link

@JShibby The 5.3.1 installers are live at https://repo.anaconda.com/archive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants