millejoh / emacs-ipython-notebook

Jupyter notebook client in Emacs
http://millejoh.github.io/emacs-ipython-notebook/
GNU General Public License v3.0
1.47k stars 122 forks source link

ein:notebook-buffer: Wrong type argument: ein:$notebook, nil #464

Closed maliky closed 4 years ago

maliky commented 5 years ago

Hi,

I'm running ein 20190123.2145 installed from elpa in emacs 26.1 on a Linux-Mint.

I have been using ein for more than a year without major problems but since Friday February the 1st, I experience some disturbing ein breakdowns.

It started with a connection problem

Using a proxy for http...
ein: [error] Login to http://127.0.0.1:8889 failed, error-thrown (error http 403), raw-header HTTP/1.1 403 Forbidden
Server: squid
Mime-Version: 1.0
Date: Mon, 04 Feb 2019 10:22:43 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 4327
X-Squid-Error: ERR_ACCESS_DENIED 0
Vary: Accept-Language
Content-Language: en
X-Cache: MISS from www-cache.univ-foo.baz
X-Cache-Lookup: NONE from www-cache.univ-foo.baz:3128
Via: 1.1 www-cache.univ-foo.baz (squid)
Connection: keep-alive

The Jupyter server is correctly launched and I can connect to it using firebox or Chrome

[I 11:22:42.648 NotebookApp] JupyterLab extension loaded from /home/foo/.local/share/virtualenvs/Python--sNkv1kf/lib/python3.6/site-packages/jupyterlab
[I 11:22:42.648 NotebookApp] JupyterLab application directory is /home/foo/.local/share/virtualenvs/Python--sNkv1kf/share/jupyter/lab
[I 11:22:42.651 NotebookApp] Serving notebooks from local directory: /home/foo/Formation/Prog/Python
[I 11:22:42.651 NotebookApp] The Jupyter Notebook is running at:
[I 11:22:42.652 NotebookApp] http://localhost:8889/?token=27db822f9555c7a43f3d0b6e4a49a0f93bc7167ce0986bc0
[I 11:22:42.652 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 11:22:42.652 NotebookApp] 

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8889/?token=27db822f9555c7a43f3d0b6e4a49a0f93bc7167ce0986bc0

Then I found out that it related to the proxies. Strangely because before Friday I had no connection to the server from emacs and my .bashrcas well as my init.el set proxy exceptions for localhost. Stil, I was only able to load the *ein:notebooklist* when not starting emacs from my terminal (ie using the mint app menu instead of typing emacs & in the Terminal)

So, I can now access notebooks from emacs but I have two emacs config folders. One with packages from straigth.el and the "old" conf folder. Both configration can open the notebooks in emacs but differences persists.

With the straight.el config directory, it seems ok. I need to finalize the installation of my commonly used packages. Since, I don't find this straight forward, I would still like to have the old config working.

With the old config I encounter the following problems:

To summarize

|                               | straight.el               | january                                   |
|                               | config                    | config                                    |
|-------------------------------+---------------------------+-------------------------------------------|
| Initial Bug                   |                           | jupyter starts but cannot                 |
|                               |                           | connect to it from emacs                  |
|-------------------------------+---------------------------+-------------------------------------------|
| - packages state              |                           | ein latest installed, but marked obsolete |
| - and after several reinstall | ok                        | ok                                        |
|-------------------------------+---------------------------+-------------------------------------------|
| loading emacs from Terminal   | jupyter starts but cannot |                                           |
| that set proxies              | connect to it from emacs  | idem                                      |
|-------------------------------+---------------------------+-------------------------------------------|
| loading emacs from Mint menu  |                           |                                           |
| - loading ein:notbooklist     | ok                        | ok                                        |
| - Saving notebooks            | ok                        | ein:notebook-buffer: Wrong type argument: |
|                               |                           | ein:$notebook, nil                        |
|                               |                           |                                           |
dickmao commented 5 years ago

Using january config, please try the following:

  1. M-x ein:dev-start-debug
  2. M-x ein:run and produce the ein:notebook is nil error
  3. M-x ein:log-pop-to-all-buffer. This shows errors with the ein logic.
  4. M-x ein:log-pop-to-request-buffer This shows errors with curl.

If you cannot discern the root problem from the above, a. M-x ein-dev-bug-report-template. Fill out the info and copy here. b. Copy the output of steps 3 and 4 above, but please remove any information sensitive to your institution.

millejoh commented 5 years ago

What @dickmao said, but it sounds like this may be an issue with curl. My Windows box has two different versions curl running around (don't ask). The key difference in my setup is that one supports libz and does work with ein/jupyter and the other doesn't. In your case maybe you also need a curl that supports UnixSockets and HTTPS-proxy. Looking at the request log buffer will let us know if that is the case in your config.

maliky commented 5 years ago

Ok, Thank you dickmao for the ine:dev-start-debug, found out that the bicycle extension was using hideshow and conflicted with ein. I activated it in the last month when I was using ein so much.

So things are ok for me, now. I'm back on tracke. As for the proxy problem, I'll just stop running my mail in the same emacs that runs ein. no big deal.

thank you.

maliky commented 5 years ago

Sorry, in fact, I do need to have ein work again behind the proxies... I did not realize that some of my scripts need Internet access. Here's my log when I try from behind proxies

;; ;;;; ein:log-all ;;;;
20:08:52:683: [debug] Login attempt #0 in response to nil from http://127.0.0.1:8890.
@#<buffer *scratch*>
20:08:53:325: [debug] Login attempt #1 in response to 403 from http://127.0.0.1:8890. @#<buffer *scratch*>
20:08:53:325: [debug] Race! (notebooklist-login--iteration http://127.0.0.1:8890) (:bad-page nil) @#<buffer *scratch*>
20:08:53:383: [debug] ein:notebooklist-login--complete STATUS: 403 DATA: (:bad-page nil) @#<buffer *scratch*>
20:08:53:410: [error] Login to http://127.0.0.1:8890 failed, error-thrown (error http 403), raw-header HTTP/1.1 403 Forbidden
Server: squid
Mime-Version: 1.0
Date: Mon, 04 Feb 2019 19:08:53 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 4544
X-Squid-Error: ERR_ACCESS_DENIED 0
Vary: Accept-Language
Content-Language: en
X-Cache: MISS from www-cache.univ-foo.baz
X-Cache-Lookup: NONE from www-cache.univ-foo.baz:3128
Via: 1.1 www-cache.univ-foo.baz (squid)
Connection: keep-alive
@#<buffer *scratch*>
20:08:53:427: [debug] ein:notebooklist-login--complete STATUS: 403 DATA: (:bad-page nil) @#<buffer *scratch*>

;; ;;;; request-log ;;;;
[debug] REQUEST
[debug] Run: curl --silent --include --location --compressed --cookie /home/foo/.emacs.d/request/curl-cookie-jar --cookie-jar /home/foo/.emacs.d/request/curl-cookie-jar --write-out \n(:num-redirects %{num_redirects} :url-effective "%{url_effective}") --data-binary @/tmp/emacs-requesthVDc6c --header X-XSRFTOKEN: 2|3f4ff069|e7a021adf28dab5026a1587677ebe1b6|1549111466 http://127.0.0.1:8890/login
[debug] Start timer: timeout=6.3 sec
[debug] REQUEST--CURL-CALLBACK event = finished

[debug] REQUEST--CURL-CALLBACK proc = #<process request curl>
[debug] REQUEST--CURL-CALLBACK buffer = #<buffer  *request curl*>
[debug] REQUEST--CURL-CALLBACK symbol-status = nil
[debug] REQUEST--CALLBACK
[debug] (buffer-string) =
HTTP/1.1 403 Forbidden
Server: squid
Mime-Version: 1.0
Date: Mon, 04 Feb 2019 19:08:53 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 4544
X-Squid-Error: ERR_ACCESS_DENIED 0
Vary: Accept-Language
Content-Language: en
X-Cache: MISS from www-cache.univ-foo.baz
X-Cache-Lookup: NONE from www-cache.univ-foo.baz:3128
Via: 1.1 www-cache.univ-foo.baz (squid)
Connection: keep-alive

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta type="copyright" content="Copyright (C) 1996-2015 The Squid Software Foundation and contributors">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ERROR: The requested URL could not be retrieved</title>
<style type="text/css"><!--
/*
* Copyright (C) 1996-2016 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
* Please see the COPYING and CONTRIBUTORS files for details.
*/

/*
Stylesheet for Squid Error pages
Adapted from design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
*/

/* Page basics */
* {
font-family: verdana, sans-serif;
}

html body {
margin: 0;
padding: 0;
background: #efefef;
font-size: 12px;
color: #1e1e1e;
}

/* Page displayed title area */
#titles {
margin-left: 15px;
padding: 10px;
padding-left: 100px;
background: url('/squid-internal-static/icons/SN.png') no-repeat left;
}

/* initial title */
#titles h1 {
color: #000000;
}
#titles h2 {
color: #000000;
}

/* special event: FTP success page titles */
#titles ftpsuccess {
background-color:#00ff00;
width:100%;
}

/* Page displayed body content area */
#content {
padding: 10px;
background: #ffffff;
}

/* General text */
p {
}

/* error brief description */
#error p {
}

/* some data which may have caused the problem */
#data {
}

/* the error message received from the system or other software */
#sysmsg {
}

pre {
font-family:sans-serif;
}

/* special event: FTP / Gopher directory listing */
#dirmsg {
font-family: courier;
color: black;
font-size: 10pt;
}
#dirlisting {
margin-left: 2%;
margin-right: 2%;
}
#dirlisting tr.entry td.icon,td.filename,td.size,td.date {
border-bottom: groove;
}
#dirlisting td.size {
width: 50px;
text-align: right;
padding-right: 5px;
}

/* horizontal lines */
hr {
margin: 0;
}

/* page displayed footer area */
#footer {
font-size: 9px;
padding-left: 10px;
}

body
:lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; }
:lang(he) { direction: rtl; }
--></style>
</head><body id=ERR_ACCESS_DENIED>
<div id="titles">
<h1>ERROR</h1>
<h2>The requested URL could not be retrieved</h2>
</div>
<hr>

<div id="content">
<p>The following error was encountered while trying to retrieve the URL: <a href="http://127.0.0.1:8890/login">http://127.0.0.1:8890/login</a></p>

<blockquote id="error">
<p><b>Access Denied.</b></p>
</blockquote>

<p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p>

<p>Your cache administrator is <a href="mailto:proxy@univ-foo.baz?subject=CacheErrorInfo%20-%20ERR_ACCESS_DENIED&amp;body=CacheHost%3A%20www-cache.univ-foo.baz%0D%0AErrPage%3A%20ERR_ACCESS_DENIED%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Mon,%2004%20Feb%202019%2019%3A08%3A53%20GMT%0D%0A%0D%0AClientIP%3A%20193.52.29.156%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Flogin%20HTTP%2F1.1%0AUser-Agent%3A%20curl%2F7.47.0%0D%0AAccept%3A%20*%2F*%0D%0AAccept-Encoding%3A%20deflate,%20gzip%0D%0AProxy-Connection%3A%20Keep-Alive%0D%0ACookie%3A%20_xsrf%3D2%7C3f4ff069%7Ce7a021adf28dab5026a1587677ebe1b6%7C1549111466%3B%20username-127-0-0-1-8888%3D%222%7C1%3A0%7C10%3A1549277469%7C23%3Ausername-127-0-0-1-8888%7C44%3ANWIzN2MzZWQ3ODYyNDRiMjgyNWRhYzhjMjcwYTJlZGM%3D%7C212d32710f5c59f6184de4ecc564480a462ee1c6af4bf197afdaa0121b020dee%22%3B%20username-127-0-0-1-8889%3D%222%7C1%3A0%7C10%3A1549271173%7C23%3Ausername-127-0-0-1-8889%7C44%3AMTJiZmVjMWE4Y2VhNDRjOGFhMWZiMWIwNDRlNDg0NWU%3D%7Cad43c0510a7161b350cc1e12625db592bdff8986cfccd5f05edb02459851517f%22%3B%20username-127-0-0-1-8890%3D%222%7C1%3A0%7C10%3A1549275834%7C23%3Ausername-127-0-0-1-8890%7C44%3AMTg0YTJjMzM5YTYwNGJiNjk3MGZjYzcwZjYzYTFlMGU%3D%7C2171c43dee151d291793a252c91967ac04594577a0ae578dff52eaae15a3e7f0%22%0D%0AX-XSRFTOKEN%3A%202%7C3f4ff069%7Ce7a021adf28dab5026a1587677ebe1b6%7C1549111466%0D%0AContent-Length%3A%2057%0D%0AContent-Type%3A%20application%2Fx-www-form-urlencoded%0D%0AHost%3A%20127.0.0.1%3A8890%0D%0A%0D%0A%0D%0A">proxy@univ-foo.baz</a>.</p>
<br>
</div>

<hr>
<div id="footer">
<p>Generated Mon, 04 Feb 2019 19:08:53 GMT by www-cache.univ-foo.baz (squid)</p>
<!-- ERR_ACCESS_DENIED -->
</div>
</body></html>

[debug] REQUEST-RESPONSE--CANCEL-TIMER
[debug] -CLEAN-HEADER
[debug] -CUT-HEADER
[debug] error-thrown = (error http 403)
[debug] -PARSE-DATA
[debug] parser = ein:notebooklist-login--parser
[debug] data = (:bad-page nil)
[debug] symbol-status = error
[debug] Executing error callback.
[debug] REQUEST
[debug] Run: curl --silent --include --location --compressed --cookie /home/foo/.emacs.d/request/curl-cookie-jar --cookie-jar /home/foo/.emacs.d/request/curl-cookie-jar --write-out \n(:num-redirects %{num_redirects} :url-effective "%{url_effective}") --data-binary @/tmp/emacs-requestMg3JhC --header X-XSRFTOKEN: 2|3f4ff069|e7a021adf28dab5026a1587677ebe1b6|1549111466 http://127.0.0.1:8890/login
[debug] Start timer: timeout=6.3 sec
[debug] Executing complete callback.
[debug] REQUEST--CURL-CALLBACK event = finished

[debug] REQUEST--CURL-CALLBACK proc = #<process request curl>
[debug] REQUEST--CURL-CALLBACK buffer = #<buffer  *request curl*>
[debug] REQUEST--CURL-CALLBACK symbol-status = nil
[debug] REQUEST--CALLBACK
[debug] (buffer-string) =
HTTP/1.1 403 Forbidden
Server: squid
Mime-Version: 1.0
Date: Mon, 04 Feb 2019 19:08:53 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 4544
X-Squid-Error: ERR_ACCESS_DENIED 0
Vary: Accept-Language
Content-Language: en
X-Cache: MISS from www-cache.univ-foo.baz
X-Cache-Lookup: NONE from www-cache.univ-foo.baz:3128
Via: 1.1 www-cache.univ-foo.baz (squid)
Connection: keep-alive

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta type="copyright" content="Copyright (C) 1996-2015 The Squid Software Foundation and contributors">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ERROR: The requested URL could not be retrieved</title>
<style type="text/css"><!--
/*
* Copyright (C) 1996-2016 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
* Please see the COPYING and CONTRIBUTORS files for details.
*/

/*
Stylesheet for Squid Error pages
Adapted from design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
*/

/* Page basics */
* {
font-family: verdana, sans-serif;
}

html body {
margin: 0;
padding: 0;
background: #efefef;
font-size: 12px;
color: #1e1e1e;
}

/* Page displayed title area */
#titles {
margin-left: 15px;
padding: 10px;
padding-left: 100px;
background: url('/squid-internal-static/icons/SN.png') no-repeat left;
}

/* initial title */
#titles h1 {
color: #000000;
}
#titles h2 {
color: #000000;
}

/* special event: FTP success page titles */
#titles ftpsuccess {
background-color:#00ff00;
width:100%;
}

/* Page displayed body content area */
#content {
padding: 10px;
background: #ffffff;
}

/* General text */
p {
}

/* error brief description */
#error p {
}

/* some data which may have caused the problem */
#data {
}

/* the error message received from the system or other software */
#sysmsg {
}

pre {
font-family:sans-serif;
}

/* special event: FTP / Gopher directory listing */
#dirmsg {
font-family: courier;
color: black;
font-size: 10pt;
}
#dirlisting {
margin-left: 2%;
margin-right: 2%;
}
#dirlisting tr.entry td.icon,td.filename,td.size,td.date {
border-bottom: groove;
}
#dirlisting td.size {
width: 50px;
text-align: right;
padding-right: 5px;
}

/* horizontal lines */
hr {
margin: 0;
}

/* page displayed footer area */
#footer {
font-size: 9px;
padding-left: 10px;
}

body
:lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; }
:lang(he) { direction: rtl; }
--></style>
</head><body id=ERR_ACCESS_DENIED>
<div id="titles">
<h1>ERROR</h1>
<h2>The requested URL could not be retrieved</h2>
</div>
<hr>

<div id="content">
<p>The following error was encountered while trying to retrieve the URL: <a href="http://127.0.0.1:8890/login">http://127.0.0.1:8890/login</a></p>

<blockquote id="error">
<p><b>Access Denied.</b></p>
</blockquote>

<p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p>

<p>Your cache administrator is <a href="mailto:proxy@univ-foo.baz?subject=CacheErrorInfo%20-%20ERR_ACCESS_DENIED&amp;body=CacheHost%3A%20www-cache.univ-foo.baz%0D%0AErrPage%3A%20ERR_ACCESS_DENIED%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Mon,%2004%20Feb%202019%2019%3A08%3A53%20GMT%0D%0A%0D%0AClientIP%3A%20193.52.29.156%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Flogin%20HTTP%2F1.1%0AUser-Agent%3A%20curl%2F7.47.0%0D%0AAccept%3A%20*%2F*%0D%0AAccept-Encoding%3A%20deflate,%20gzip%0D%0AProxy-Connection%3A%20Keep-Alive%0D%0ACookie%3A%20_xsrf%3D2%7C3f4ff069%7Ce7a021adf28dab5026a1587677ebe1b6%7C1549111466%3B%20username-127-0-0-1-8888%3D%222%7C1%3A0%7C10%3A1549277469%7C23%3Ausername-127-0-0-1-8888%7C44%3ANWIzN2MzZWQ3ODYyNDRiMjgyNWRhYzhjMjcwYTJlZGM%3D%7C212d32710f5c59f6184de4ecc564480a462ee1c6af4bf197afdaa0121b020dee%22%3B%20username-127-0-0-1-8889%3D%222%7C1%3A0%7C10%3A1549271173%7C23%3Ausername-127-0-0-1-8889%7C44%3AMTJiZmVjMWE4Y2VhNDRjOGFhMWZiMWIwNDRlNDg0NWU%3D%7Cad43c0510a7161b350cc1e12625db592bdff8986cfccd5f05edb02459851517f%22%3B%20username-127-0-0-1-8890%3D%222%7C1%3A0%7C10%3A1549275834%7C23%3Ausername-127-0-0-1-8890%7C44%3AMTg0YTJjMzM5YTYwNGJiNjk3MGZjYzcwZjYzYTFlMGU%3D%7C2171c43dee151d291793a252c91967ac04594577a0ae578dff52eaae15a3e7f0%22%0D%0AX-XSRFTOKEN%3A%202%7C3f4ff069%7Ce7a021adf28dab5026a1587677ebe1b6%7C1549111466%0D%0AContent-Length%3A%2057%0D%0AContent-Type%3A%20application%2Fx-www-form-urlencoded%0D%0AHost%3A%20127.0.0.1%3A8890%0D%0A%0D%0A%0D%0A">proxy@univ-foo.baz</a>.</p>
<br>
</div>

<hr>
<div id="footer">
<p>Generated Mon, 04 Feb 2019 19:08:53 GMT by www-cache.univ-foo.baz (squid)</p>
<!-- ERR_ACCESS_DENIED -->
</div>
</body></html>

[debug] REQUEST-RESPONSE--CANCEL-TIMER
[debug] -CLEAN-HEADER
[debug] -CUT-HEADER
[debug] error-thrown = (error http 403)
[debug] -PARSE-DATA
[debug] parser = ein:notebooklist-login--parser
[debug] data = (:bad-page nil)
[debug] symbol-status = error
[debug] Executing error callback.
[debug] Executing complete callback.

I did not find the ein-dev-bug-report-template

dickmao commented 5 years ago

Sorry, ein:dev-bug-report-template not ein-dev-bug-report-template.

You should try to get curl http://127.0.0.1:8890 working from the terminal. I've little experience with proxies so google will know more than I. If the solution requires adding options to curl (maybe --proxy), you'd need to:

M-x customize-group RET request

and modify Request Curl Options.

maliky commented 5 years ago

I get the 403 error when I try to connect to localhost with curl in http or https. It works fine with outside websites. Something with the token and identification process.

dickmao commented 5 years ago

We are moving further away from the EIN project into separate and unrelated proxy issues. If you are using a UNIX-like system, I would try:

nc -lk 9989 (in one terminal)
curl -v http://127.0.0.1:9989 (in another terminal)

If I stop responding on this thread, it is not a slight but a feeling that EIN is not the issue.

maliky commented 5 years ago

Ok, Thank you dickmao... It helps me know where to look.. I'll get back to my sysadmin even so they said nothing changed in the proxy configurations.

cwitte commented 5 years ago

I was getting the same error when using a proxy. I determined the problem wasn't with curl by running nc and curl as suggested by @dickmao . I think the problem is actually on emacs side. As best as I can determine, in the process in which curl is being launched the http_proxy environment variable is correctly being set, but the NO_PROXY environment variable isn't. This is even with url-proxy-services variable set to (("no_proxy" . "^\\(localhost\\|10.*\\)") ("http" . "proxy.com:8080") ("https" . "proxy.com:8080")) This means that request to localhost are being passed to the proxy, which rejects them. It looks like this is across emacs and not just limited to curl. With url-proxy-services set as above, when I go into an eshell and run echo $NO_PROXY nothing is returned, but I get the correct result for echo $http_proxy.

I managed to get around it by setting request-curl-options to ("--noproxy" "127.0.0.1")

dickmao commented 5 years ago

Thanks for looking into this. You mentioned nc and curl work from the terminal. How does terminal curl know to bypass the proxy? If the reason is an environment variable e.g., NO_PROXY=127.0.0.1, I just verified that emacs should inherit it in the start-file-process of the curl call.

cwitte commented 5 years ago

You are right, eshell (and also curl from within emacs) inherit http_proxy and NO_PROXY. It looks like eshell ignores url-proxy-services (I was expecting eshell to set the http_proxy and NO_PROXY variable based on the contents of url-proxy-services, that would make sense to me but I guess that is arguable). When I launch emacs from the terminal, http_proxy and NO_PROXY are set correctly within eshell. The problem occurs when launched from the GUI or as a service. In these cases only the http_proxy environment variable is set, and I'm not sure how. I remember having lots of trouble getting spacemacs to work with the proxy when I first started using it at work (behind a proxy). I thought I has set it in the .desktop file for emacs, but I just checked that and it doesn't appear to be the case.