Sublime Forum

Please Help Test Package Control

#5

Just got one of these in the console after attempting an “Upgrade/Overwrite All Packages” following your Package Control upgrade:

Reloading /C/Users/GGatchel/AppData/Roaming/Sublime Text 2/Packages/User/Package Control.sublime-settings
Exception in thread Thread-13:
Traceback (most recent call last):
  File ".\threading.py", line 532, in __bootstrap_inner
  File ".\Package Control.py", line 2043, in run
  File ".\Package Control.py", line 1893, in disable_package
RuntimeError: Must call on main thread, consider using sublime.set_timeout(function, timeout)
0 Likes

#6

Removed ExportHTML and then reinstalled it. Now I have two entries for each menu option

0 Likes

#7

Disregard - duplicate entries were not caused by new version of Package Control

0 Likes

#8

I just attempted to disable a package and got the following error:

Traceback (most recent call last): File ".\sublime_plugin.py", line 339, in run_ File ".\Package Control.py", line 2240, in run Boost.Python.ArgumentError: Python argument types in sublime.load_settings(function) did not match C++ signature: load_settings(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >)

0 Likes

#9

Everything has worked fine for me here :smile:

0 Likes

#10

There is a new version in the testing repository. There is new proxy functionality, especially for Windows, so if you have a proxy please take a minute and help testing it.

The new version should fix all of the bugs reported here.

@jbjornson I added code that should allow NTLM authentication with a proxy. There are two new settings also, the proxy_username and proxy_password, which I am guessing you may need to set.

0 Likes

#11

Reloading plugin C:\Documents and Settings\sysadmin\Application Data\Sublime Text 2\Packages\Package Control\Package Control.py Traceback (most recent call last): File ".\sublime_plugin.py", line 62, in reload_plugin File ".\Package Control.py", line 28, in <module> from ntlm import HTTPNtlmAuthHandler ImportError: No module named ntlm reloading /C/Documents and Settings/sysadmin/Application Data/Sublime Text 2/Packages/Package Control/Package Control.sublime-settings found 2 files for base name Main.sublime-menu Traceback (most recent call last): File ".\Package Control.py", line 131, in <lambda> if hasattr(self.thread, 'result') and not self.thread.result: File ".\Package Control.py", line 124, in run self.success_message = success_message AttributeError: 'NoneType' object has no attribute 'status_message' Exception in thread Thread-11: Traceback (most recent call last): File ".\threading.py", line 532, in __bootstrap_inner File ".\Package Control.py", line 1871, in run vcs = 'hg' File ".\Package Control.py", line 1402, in install_package extracted_paths = ] AttributeError: 'NoneType' object has no attribute 'name'

0 Likes

#12

[quote=“MikeC”]Reloading plugin C:\Documents and Settings\sysadmin\Application Data\Sublime Text 2\Packages\Package Control\Package Control.py Traceback (most recent call last): File ".\sublime_plugin.py", line 62, in reload_plugin File ".\Package Control.py", line 28, in <module> from ntlm import HTTPNtlmAuthHandler ImportError: No module named ntlm reloading /C/Documents and Settings/sysadmin/Application Data/Sublime Text 2/Packages/Package Control/Package Control.sublime-settings found 2 files for base name Main.sublime-menu Traceback (most recent call last): File ".\Package Control.py", line 131, in <lambda> if hasattr(self.thread, 'result') and not self.thread.result: File ".\Package Control.py", line 124, in run self.success_message = success_message AttributeError: 'NoneType' object has no attribute 'status_message' Exception in thread Thread-11: Traceback (most recent call last): File ".\threading.py", line 532, in __bootstrap_inner File ".\Package Control.py", line 1871, in run vcs = 'hg' File ".\Package Control.py", line 1402, in install_package extracted_paths = ] AttributeError: 'NoneType' object has no attribute 'name' [/quote]

Is this error shown again if you restart Sublime Text?

0 Likes

#13

Hmm, no. After restarting, restoring my “http_proxy” setting and retrying “Package Control: Install Package” I still get the usual

Package Control: Error downloading channel. URL error [Errno 10065] A socket operation was attempted to an unreachable host downloading https://sublime.wbond.net/repositories.json.

but it does offer SFTP and SVN packages. Nothing else, though.

0 Likes

#14

[quote=“MikeC”]Hmm, no. After restarting, restoring my “http_proxy” setting and retrying “Package Control: Install Package” I still get the usual

Package Control: Error downloading channel. URL error [Errno 10065] A socket operation was attempted to an unreachable host downloading https://sublime.wbond.net/repositories.json.

but it does offer SFTP and SVN packages. Nothing else, though.[/quote]

Did you add your authentication info to the proxy_username and proxy_password settings?

0 Likes

#15

No. We don’t have separate usernames/passwords for the proxy so I assume it’s using the desktop session credentials, and I’d imagine that leaving those in a plaintext file would be grounds for dismissal.

0 Likes

#16

Would you be dismissed if you tried to see if it worked?

0 Likes

#17

Well, if it can be our little secret…

After setting those (and restarting ST2 for good measure) an Install attempt now gives me

Package Control: Error downloading channel. URL error [Errno 10061] No connection could be made because the target machine actively refused it downloading https://sublime.wbond.net/repositories.json.

which at least is different. Then offers the same SFTP and SVN packages as before.

0 Likes

#18

I’m in a similar boat to MikeC, except the error I’m getting is:

Package Control: Error downloading channel. URL error Tunnel connection failed: 407 Proxy Authentication Required downloading https://sublime.wbond.net/repositories.json.

That’s with both http_proxy and https_proxy set to a value like:

http://mycompany.com:8080

(same value for both, since AFAIK we’ve only got the one proxy).

I’ve tried setting proxy_username both to “rpardee” and “mydomain\rpardee”–no difference.

HTH,

-Roy

0 Likes

#19

Looks like the issue is specific to the HTTPS protocol–if I edit my repository_channels entry (just have the one) to pull that json file over plain HTTP it all works fine.

I’ve had similar behavior out of other tools–plain HTTP can work if I feed the tool the proxy server & give it my windows username/pwd in plain text, but HTTPS barfs.

Our proxy settings are set via a proxy.pac script, which I’m not totally confident I’m reading properly, but it looks to me like it sets the same value regardless of protocol, so I’m a tad baffled.

At any rate–would it be possible to have the proxy_password property accept some magic value that would cause PC to prompt the user to enter the pwd interactively rather than write it into this plain-text file?

Thanks!

-Roy

0 Likes

#20

Unfortunately GitHub and BitBucket only offer downloads via HTTPS, so even if you switch the channel file to HTTP, you won’t be able to install anything buy my packages. Plus, you’ll be vulnerable to man-in-the-middle attacks where a user could run arbitrary python code on your machine with your credentials.

I find it very odd that people seem not to have much trouble with proxying HTTP requests, but HTTPS offers lots of trouble. It makes me think something else is going on. Do HTTPS connections not normally go through a proxy or something? Is it an error that Package Control uses the http_proxy settings for HTTPS connections if the user does not specify an HTTPS proxy?

0 Likes

#21

Anything else you need testing with for this version? Got it installed.

0 Likes

#22

I’m getting the following error trying to update ZenCoding. I tried removing and reinstalling, but the same error persists.

error: Package Control: An error occurred while trying to unzip the package file for ZenCoding. Please try installing the package again.

Edit: ZenCoding through Package Control is now working.

0 Likes

#23

[quote=“wbond”]Unfortunately GitHub and BitBucket only offer downloads via HTTPS, so even if you switch the channel file to HTTP, you won’t be able to install anything buy my packages. Plus, you’ll be vulnerable to man-in-the-middle attacks where a user could run arbitrary python code on your machine with your credentials.

I find it very odd that people seem not to have much trouble with proxying HTTP requests, but HTTPS offers lots of trouble. It makes me think something else is going on. Do HTTPS connections not normally go through a proxy or something? Is it an error that Package Control uses the http_proxy settings for HTTPS connections if the user does not specify an HTTPS proxy?[/quote]

I don’t think that’s an error. If I use an NTLM-enabled version of curl I can grab that file via https w/this command:

$ curl -v --proxy-ntlm --proxy-user mydomain\\myusername --url https://sublime.wbond.net/repositories.json  --proxy proxy.mycompany.com:8080 > bubba.txt

Looking at the verbose output, I think it’s definitely using the proxy–dig it:

[code]Enter proxy password for user ‘mydomain\myusername’:

CONNECT sublime.wbond.net:443 HTTP/1.1
Host: sublime.wbond.net:443
Proxy-Authorization: NTLM TlRMTVNTUAABAAAAt4II4gAAAAAAAAAAAAAAAAAAAAAFASgKAAAADw==
User-Agent: curl/7.21.1 (i686-pc-mingw32) libcurl/7.21.1 OpenSSL/0.9.8k zlib/1.2.3
Proxy-Connection: Keep-Alive

< HTTP/1.1 407 Proxy Authentication Required
< Proxy-Authenticate: NTLM <>
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Type: text/html; charset=utf-8
< Proxy-Connection: Keep-Alive
< Set-Cookie: BCSI-CS-8cf82f2954c8f17f=2; Path=/
< Connection: Keep-Alive
< Content-Length: 874
<

  • Ignore 874 bytes of response-body
  • Establish HTTP proxy tunnel to sublime.wbond.net:443
  • Proxy auth using NTLM with user ‘mydomain\myusername’

CONNECT sublime.wbond.net:443 HTTP/1.1
Host: sublime.wbond.net:443
Proxy-Authorization: NTLM <>
User-Agent: curl/7.21.1 (i686-pc-mingw32) libcurl/7.21.1 OpenSSL/0.9.8k zlib/1.2.3
Proxy-Connection: Keep-Alive

< HTTP/1.1 200 Connection established
<

  • Proxy replied OK to CONNECT request[/code]

Now, why curl can do this but whatever python(?) bits you’re exercising cannot is unclear to me. But like I say, PC is not the only tool that I’ve had this difficulty with.

One thing I discovered playing w/curl is that our proxy will also do basic auth (again, requiring username/pwd). I think there’s a way to get curl to use NTLM w/out specifying my username/pwd (just like browsers don’t require it) but I don’t know what it is. That would be the magic that I wish PC had of course.

0 Likes

#24

You can make every software without NTLM support working by a Proxy-Proxy connection with a local proxy supporting NTLM.

0 Likes