Settings-view: "apm config set strict-ssl false" and "strict-ssl=false" have no effect in GUI

Created on 19 Jun 2018  ·  18Comments  ·  Source: atom/settings-view

@railsfanatic commented on Jun 18, 2018, 6:31 PM UTC:

Prerequisites

Description

Receive the following error, even after:

  1. apm config set strict-ssl false
  2. ensuring "strict-ssl=false" is in ~/.atom/.apmrc

Searching for “[anything here]” failed.Hide output…
unable to get local issuer certificate

Steps to Reproduce

  1. Get behind a firewall with a "user transparent" SSL proxy with self-issued certificate
  2. Launch Atom
  3. Preferences
  4. Install
  5. Search for anything

Expected behavior: [What you expect to happen]

Works fine in apm command line. Broken in Atom GUI. Why doesn't Atom obey the strict-ssl=false setting in ~/.atom/.apmrc ??

Actual behavior: [What actually happens]

No idea why Atom not using ~/.atom/.apmrc, as apm install from Terminal works fine.
No idea where this is happening, as Developer Tools shows no XHR or other requests when searching for packages.

Reproduces how often: [What percentage of the time does it reproduce?]

Every. Single. Time.
atom --clear-window-state? Yep.
atom --safe? Yep.
mv ~/.atom ~/.atom-safe and re-apply strict-ssl false? Yep.

Versions

$ atom --version
Atom : 1.27.2
Electron: 1.7.15
Chrome : 58.0.3029.110
Node : 7.9.0

macOS Sierra 10.12.6 (16G1314)
MacBook Pro (15-inch, 2017)
2.9 GHz Intel Core i7
16 GB 2133 MHz LPDDR3

Additional Information

This issue was moved by rsese from atom/atom/issues/17536.

help-wanted

Most helpful comment

For me search it worked if I set
NODE_TLS_REJECT_UNAUTHORIZED=0
and I also start like this:
atom --proxy-server=http://localhost:3128

For install I need to keep the .apmrc settings:
strict-ssl=false
http-proxy=http://localhost:3128
https-proxy=http://localhost:3128

(so it looks some of these settings are for the search part and some are for the install/update part - search is working without http-proxy option but install is not; on the other hand you can update without using --proxy-server parameter, maybe also without NODE_TLS_REJECT...)

All 18 comments

Thanks for the report @railsfanatic - just to clarify, both searching and installing don't work? Does the featured packages list show up?

Also, did this work in older versions of Atom or has it always been like this?

I'm getting the same thing, having http-proxy and https-proxy set in apm config, as well as strict-ssl false. The error when searching for packages to install is self signed certificate in certificate chain.

What's interesting is that I'm able to run package updates and install dependencies when prompted through the gui. I just can't search.

I have the same problem as Kyle. I can install updates but searching blows up.

Same issue here. I get: tunneling socket could not be established, statusCode=407 even though the user credentials are perfectly accurate (and apm install on command line works with same .apmrc file).

File contents (edited of course to hide confidential details):

http-proxy=http://user:pass@corporate-proxy-hostname-here:8080
https-proxy=http://user:pass@corporate-proxy-hostname-here:8080
strict-ssl=false

Seems to be a regression in 1.25.0 - https://github.com/atom/apm/issues/772

I'm having the same issue when working behind firewall on my work computer. I keep getting the following:

Searching for "term" failed. Hide output...

  unable to get local issuer certificate

In my .apmrc file I have:

strict-ssl=false
https-proxy=<proxy address>

I'm also having the same issue on Windows 10.

  • Featured packages are shown;
  • apm search / apm install both work fine.
  • Search inside atom itself IS NOT working;
  • Installing featured packages DOES WORK, I've just installed atom-clock from inside atom, selecting from the featured items.

So... this is a search issue only. The error keeps changing around:

  • sometimes it's connect ETIMEDOUT 34.231.150.116:443, like the proxy settings were reset (although I didn't change anything);
  • most of the times it's self signed certificate in certificate chain

.apmrc file

strict-ssl=false
http-proxy=http://<redacted>:8080
https_proxy=http://<redacted>:8080
http_proxy=http://<redacted>:8080
proxy=http://<redacted>:8080
https-proxy=http://<redacted>:8080

apm config list

; cli configs
globalconfig = "C:\\Users\\<redacted>\\.atom\\.apm\\.apmrc"
user-agent = "npm/3.10.10 node/v6.9.5 win32 x64"
userconfig = "C:\\Users\\<redacted>\\.atom\\.apmrc"

; environment configs
node-gyp = "C:\\Users\\<redacted>\\AppData\\Local\\atom\\app-1.29.0\\resources\\app\\apm\\bin\\\\..\\node_modules\\node-gyp\\bin\\node-gyp.js"

; userconfig C:\Users\<redacted>\.atom\.apmrc
http-proxy = "http://<redacted>:8080"
http_proxy = "http://<redacted>:8080"
https-proxy = "http://<redacted>:8080/"
https_proxy = "http://<redacted>:8080"
proxy = "http://<redacted>:8080/"
strict-ssl = false

; globalconfig C:\Users\<redacted>\.atom\.apm\.apmrc
cache = "C:\\Users\\<redacted>\\.atom\\.apm"
progress = false

; node bin location = C:\Users\<redacted>\AppData\Local\atom\app-1.29.0\resources\app\apm\bin\node.exe
; cwd = C:\Users\<redacted>\AppData\Local\atom\bin
; HOME = C:\Users\<redacted>
; "npm config ls -l" to show all defaults.

PS. I know about the trailing slashes, but apm config setkeeps putting random trailing slashes on places ¬¬

For me search it worked if I set
NODE_TLS_REJECT_UNAUTHORIZED=0
and I also start like this:
atom --proxy-server=http://localhost:3128

For install I need to keep the .apmrc settings:
strict-ssl=false
http-proxy=http://localhost:3128
https-proxy=http://localhost:3128

(so it looks some of these settings are for the search part and some are for the install/update part - search is working without http-proxy option but install is not; on the other hand you can update without using --proxy-server parameter, maybe also without NODE_TLS_REJECT...)

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.

Thanks again for reporting this issue - unfortunately, we don't have the resources to simulate, test, or reproduce proxy configurations right now. For those working under this type of setup and interested in investigating the issue, we're adding the help-wanted label and we'd be willing to review a well-written pull request.

Additionally, if anyone wants to contribute an open-source, well-documented, and repeatable method for testing proxy configurations, we would find that extremely helpful.

I still get the same bug. I started using VS code for several months because of this bug. In the recent months, I tried many times but no solution can be found. Can anyone help?

Just like @zhangliye I switched to VScode because of this issue. Make Atom respect system CAs, please! I love Atom :(

I was facing this as well. However found somewhere this and it started to work fine!

In your init.coffee file you need to add this
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0

I was facing this as well. However found somewhere this and it started to work fine!

In your init.coffee file you need to add this
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0

Tried this, but didn't work unfortunately. I'm sitting behind a corporate proxy too, but nothing seems to work. I guess I have to switch to VS too...

apm config set strict-ssl false
NODE_TLS_REJECT_UNAUTHORIZED=0 atom &

worked for me on Linux (atom v 1.49) -- I can search and install.

This is quite a big problem and its clearly an atom bug...

In your init.coffee file you need to add this
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0

This worked for me as well.

Note: You need to restart atom for this work.

I was facing this as well. However found somewhere this and it started to work fine!

In your init.coffee file you need to add this
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0

This worked for me. Thanks for sharing.

Was this page helpful?
0 / 5 - 0 ratings