Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Uncaught Error: tunneling socket could not be established, statusCode=407 #14866

Closed
topecz opened this issue Jun 21, 2017 · 21 comments
Closed

Uncaught Error: tunneling socket could not be established, statusCode=407 #14866

topecz opened this issue Jun 21, 2017 · 21 comments

Comments

@topecz
Copy link

topecz commented Jun 21, 2017

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.18.0 ia32
Electron: 1.3.15
OS: Unknown Windows version
Thrown From: Atom Core

Stack Trace

Uncaught Error: tunneling socket could not be established, statusCode=407

At stream.js:74

Error: tunneling socket could not be established, statusCode=407
    at ClientRequest.onConnect (~/AppData/Local/atom/app-1.18.0/resources/app/node_modules/tunnel-agent/index.js:166:19)
    at ClientRequest.g (events.js:286:16)
    at emitThree (events.js:116:13)
    at ClientRequest.emit (events.js:194:7)
    at Socket.socketOnData (_http_client.js:393:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at TCP.onread (net.js:543:20)

Commands

Non-Core Packages

minimap 4.26.8 
minimap-git-diff 4.3.1 
multi-cursor 2.1.5 
split-diff 1.1.4 
Sublime-Style-Column-Selection 1.7.3 
@rsese
Copy link
Contributor

rsese commented Jun 21, 2017

Thanks for the report! Can you confirm a few things for us?

  • what were you doing at the time of the error?
  • is the error is reproducible?
  • are you using a proxy?

@Mikaciu
Copy link

Mikaciu commented Jul 5, 2017

Hello,

I can reproduce.
The error occurs once I open the window "Settings View: Install Packages And Themes". Most of the times, 2 or 3 error messages are displayed.
I'm using a proxy (CNTLM).

@jugalps
Copy link

jugalps commented Jul 20, 2017

I am getting the same error when performing the same operation and I am also behind a corporate proxy.

@rsese
Copy link
Contributor

rsese commented Jul 20, 2017

Are folks getting this error after setting up apm to use your proxy?

https://github.com/atom/apm/#using-a-proxy

@jugalps
Copy link

jugalps commented Jul 24, 2017

Yes, that's correct. I get the error even after setting up apm to use proxy. It seems recently there was a change to our proxy configuration which required us to authenticate, perhaps that's the reason it isn't working any more.

@Mikaciu
Copy link

Mikaciu commented Jul 24, 2017

Yep, my previous tests were done with the proxy set in apm :

> apm config get http-proxy
http://localhost:8246

> apm config get https-proxy
http://localhost:8246/

> cat %userprofile%\.atom\.apmrc
http-proxy=http://localhost:8246
https-proxy=http://localhost:8246
strict-ssl=false

I don't know if the trailing forward slash in the https-proxy config has to do with this though, it's not present in the .apmrc file.

@zicklag
Copy link

zicklag commented Sep 20, 2017

@jugalps, I am also behind a proxy with authentication, but I was able to get it to work by setting the http and https proxy to http://user:password@server:port. I had my http_proxy and https_proxy environment variables set like that, but that only worked for apm on the commandline. After using apm config set it worked in the UI as well.

@hendrikbl
Copy link

I'm getting this again after updating atom to version 1.25.0. It worked just fine with 1.24.*.

Now I'm getting a tunneling socket could not be established, statusCode=407 message when searching for packages or themes. When using apm search everything works fine and featured packages are shown too.

I have set my http and https proxy via apm config and as environment variables.

@astrapotro
Copy link

Same error like @hendrikbl here when trying to find a package: tunneling socket could not be established, statusCode=407
Checking updates of atom itself works fine.
Atom version is last one, 1.25.0
http and https proxy in .atom/.apmrc are OK
Installing package via apm works fine

@samuelharmer
Copy link

samuelharmer commented Apr 5, 2018

Talk about SOUP. These were all the URLs I needed access to through the proxy to install sync-settings (my particular use case).

  • atom.io
  • www.atom.io
  • packagecloud.io
  • packagecloud-repositories.s3.dualstack.us-west-1.amazonaws.com
  • packagecloud-prod.global.ssl.fastly.net
  • codeload.github.com
  • gh-contractor-zcbenz.s3.amazonaws.com
  • registry.npmjs.org

@Getz85
Copy link

Getz85 commented Apr 6, 2018

Same issue as astrapotro described, even with the v1.25.1.

@moriyas1984
Copy link

I'm getting the same error.
I'm using v1.27.1 x64 on Windows (I'v updated it today).
The command apm search via git bash returned proper results, but searching package on Atom GUI (Install new Package and Themes) failed and returned error message tunneling socket could not be establised, status code=407 .
I think my setting in .apmrc is OK, but something of Atom GUI isn't running normally.

@jpicton
Copy link

jpicton commented Jun 6, 2018

Can verify that this is a regression.

I have Atom 1.27.2 x64 installed and have observed the following:

  • apm search returns expected results
  • apm install installs packages as expected
  • Featured Packages section in the GUI successfully loads results
  • Available Updates in the GUI successfully loads results / checks for updates
  • Install Package in the GUI always displays the tunneling socket could not be established, statusCode=407 error message

I have https-proxy config set in .apmrc, and it seems to be applied successfully in all cases except for installing packages via the GUI. I've only noticed this issue in the past month, so the regression must have been introduced in a recent release.

@fkiefl
Copy link

fkiefl commented Jul 3, 2018

I have installed Atom 1.28.0 and can confirm exactly the same like jpicton was commented

@Mikaciu
Copy link

Mikaciu commented Jul 3, 2018

Same thing with 1.29.0-beta0.

@jpcozar
Copy link

jpcozar commented Jul 9, 2018

Same thing as jpicton said in Atom 1.28.1 x64.
Just adding that I had in File->Config...:
useProxySettingsWhenCallingApm: true
By default it was to false and error was:

connect ETIMEDOUT 34.232.181.106:443

@hendrikbl
Copy link

hendrikbl commented Aug 1, 2018

Same error with 1.29.0.

Edit.: I just figured out that everything works fine if you start atom with atom --proxy-server=http://your.proxy. Maybe this helps.

@nitishlobo
Copy link

Same error with 1.29.0

@hendrikbl when I use <atom --proxy-server=http://my.proxy> the error is no long reproducible.
Your suggestion works. But how do I make it work with the windows explorer right click option "Open with Atom"?

@hendrikbl
Copy link

@nitishlobo you can change the registry key Computer\HKEY_CLASSES_ROOT\*\shell\Atom\command and set its value to "path\to\atom.exe" "--proxy-server=http://your.proxy" "%1". Now your context menu should run atom with the additional proxy parameter.
It's very likely that every update of atom will reset these changes since it has to modify the path to atom.exe. Same goes with disabling filehandling and then turning it back on.

Also, I guess that these are no per user modifications so possibly every user on your machine will run atom with the additional parameter. Wich also means, if your proxy needs authentication, every user will use your credentials and everyone with access to the registry is able to read your password since you have to provide it with the--proxy-server parameter.

After all, the whole additional parameter thing is nothing more than a workaround and I still hope that all these proxy issues will be fixed some day.

@no-response no-response bot closed this as completed Sep 20, 2018
@no-response
Copy link

no-response bot commented Sep 20, 2018

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@lock
Copy link

lock bot commented Mar 19, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Mar 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests