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

pip install tamper fails on windows (pip install works otherwise) #10

Closed
SgtPooki opened this issue Oct 15, 2014 · 23 comments
Closed

pip install tamper fails on windows (pip install works otherwise) #10

SgtPooki opened this issue Oct 15, 2014 · 23 comments

Comments

@SgtPooki
Copy link

Chrome: Version 38.0.2125.101 m
Windows OS: 8.1

pip.log:

c:\python\Scripts\pip3 run on 10/14/14 19:25:05
Downloading/unpacking tamper
Getting page https://pypi.python.org/simple/tamper/
URLs to search for versions for tamper:

SyntaxError: invalid syntax


Cleaning up...
Removing temporary dir C:\Users\RUSSEL1\AppData\Local\Temp\pip_build_Russell Dempsey...
Command python setup.py egg_info failed with error code 1 in C:\Users\RUSSEL
1\AppData\Local\Temp\pip_build_Russell Dempsey\tamper
Exception information:
Traceback (most recent call last):
File "C:\python\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\python\lib\site-packages\pip\commands\install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\python\lib\site-packages\pip\req.py", line 1229, in prepare_files
req_to_install.run_egg_info()
File "C:\python\lib\site-packages\pip\req.py", line 325, in run_egg_info
command_desc='python setup.py egg_info')
File "C:\python\lib\site-packages\pip\util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command python setup.py egg_info failed with error code 1 in C:\Users\RUSSEL~1\AppData\Local\Temp\pip_build_Russell Dempsey\tamper

@Ncage1974
Copy link

Add me to the list of people getting this error. I'm using Windows 7 x64. After getting this error i checked to see if tamper was working in chrome (38 x64 version) and i get the following error in tamper "Could not connect to proxy".

@dutzi
Copy link
Owner

dutzi commented Oct 15, 2014

Howdy! Thanks for the report. What version of Python are you using?

@grishanin
Copy link

@Ncage1974 I have the same.
@dutzi 2.7.8

@Ncage1974
Copy link

Hi dutzi.

Python Verison: Python 3.4.2
PIP Version: pip 1.5.6 from C:\python\lib\site-packages (python 3.4)

@Ridermansb
Copy link

+1 .. error on Windows 8 x64


C:\Python34\Scripts\pip run on 10/17/14 10:59:51
Downloading/unpacking tamper
Getting page https://pypi.python.org/simple/tamper/
URLs to search for versions for tamper:

SyntaxError: invalid syntax


Cleaning up...
Removing temporary dir C:\Users\RIDERM1\AppData\Local\Temp\pip_build_ridermanb...
Command python setup.py egg_info failed with error code 1 in C:\Users\RIDERM
1\AppData\Local\Temp\pip_build_ridermanb\tamper
Exception information:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Python34\lib\site-packages\pip\commands\install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\Python34\lib\site-packages\pip\req.py", line 1229, in prepare_files
req_to_install.run_egg_info()
File "C:\Python34\lib\site-packages\pip\req.py", line 325, in run_egg_info
command_desc='python setup.py egg_info')
File "C:\Python34\lib\site-packages\pip\util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command python setup.py egg_info failed with error code 1 in C:\Users\RIDERM~1\AppData\Local\Temp\pip_build_ridermanb\tamper

@dutzi
Copy link
Owner

dutzi commented Oct 17, 2014

@Ncage1974 and @Ridermansb, can you please try installing Tamper in Python 2.7x, I don't think it, or even Mitmproxy support Python 3x.

@Ncage1974
Copy link

@dutzi thanks for the help. Using python2 it installs with no errors (oh ya i had to install Microsoft Visual C++ Compiler Package for Python 2.7 too) but unfortunately i'm still getting the error "Could not connect to web proxy" at the top of the tamper console in the developer tools.

I can only thing of two things. We have websense for internet access. Maybe websense is doing some blocking? Is it compatible with the x64 version of chrome?

@dutzi
Copy link
Owner

dutzi commented Oct 17, 2014

I never heard of this but Tamper is a pretty new project so I guess it could be...

Can you try and:

  1. Browse to chrome://extensions/
  2. Look for "Tamper"
  3. Click on "Background Page" (make sure "Developer Mode checkbox on the top-right corner is checked first)
  4. Go to the Console tab
  5. Click Ctrl/Cmd+R (this will reload the proxy)
  6. Copy and paste the log here? :)

@dutzi dutzi closed this as completed Oct 17, 2014
@dutzi dutzi reopened this Oct 17, 2014
@luanvuvt
Copy link

Hi @dutzi,
I have tried the above solution but still failed.
Please recheck this problem.
Here is my console log:

connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
connecting to proxy
Disconnected
Port {sender: Object, disconnect: function, postMessage: function, name: (...), onDisconnect: (...)…}
hye
Sending message Object {method: "proxy-state-update", isProxyEnabled: false, proxyState: "proxy disconnected"} to port Port {sender: Object, disconnect: function, postMessage: function, name: (...), onDisconnect: (...)…}
sending proxy state update false proxy disconnected
connecting to proxy
Disconnected
Sending message Object {method: "proxy-state-update", isProxyEnabled: false, proxyState: "proxy disconnected"} to port Port {sender: Object, disconnect: function, postMessage: function, name: (...), onDisconnect: (...)…}

@dutzi
Copy link
Owner

dutzi commented Oct 18, 2014

Hi @luanvuvt, it looks like the extension can't get the proxy running.
What is your OS, Chrome and Python version?
Could you run $ pip freeze and paste the output here?

@luanvuvt
Copy link

Hi @dutzi,
I'm using Windows 8.1, Chrome 37 and Python 2.7.4.
Here is result after running pip freeze:

Flask==0.10.1
Jinja2==2.7.3
MarkupSafe==0.23
PyYAML==3.11
Werkzeug==0.9.6
backports.ssl-match-hostname==3.4.0.2
certifi==14.05.14
cffi==0.8.6
cov-core==1.14.0
coverage==3.7.1
coveralls==0.4.4
cryptography==0.6.1
docopt==0.6.2
gevent-websocket==0.9.3
itsdangerous==0.24
mitmproxy==0.11
mock==1.0.1
-e git+https://github.com/mitmproxy/netlib.git@29a4e9105053118aa8c0b458bcb8f10f0bc333d1#egg=netlib-master
nose==1.3.4
nose-cov==1.6
passlib==1.6.2
-e git+https://github.com/mitmproxy/pathod.git@60e3e0b898861804a475fc0f0e860ad5ec51fe13#egg=pathod-master
pyOpenSSL==0.14
pyasn1==0.1.7
pycparser==2.10
pydivert==0.0.6
requests==2.4.3
six==1.8.0
sortedcontainers==0.9.1
tamper==0.23
tornado==4.0.2
virtualenv==1.11.6

@dutzi
Copy link
Owner

dutzi commented Oct 19, 2014

Thanks @luanvuvt, @Ncage1974,

Everything looked ok so I thought it could be one of two things, either Tamper's python script can't run or the message passing (Chrome's feature that allows running and communicating with native apps) wasn't setup correctly.

I was going to ask you to search your registry for this key HKEY_CURRENT_USER\SOFTWARE\Google\Chrome\NativeMessagingHosts\com.dutzi.tamper. This key's value should be C:\Users\luanvuvt\tamper-manifest.json.

But then I looked at the setup code and found this dumb bug. I hardcoded my home folder into setup.py 😦.

I'll release a fix for this soon, but for now you can just edit this registry key HKEY_CURRENT_USER\SOFTWARE\Google\Chrome\NativeMessagingHosts\com.dutzi.tamper, change its value to C:\Users\<user>\tamper-manifest.json (replace <user> with your username).

@luanvuvt
Copy link

Hi @dutzi,
I have tried the solution:

HKEY_CURRENT_USER\SOFTWARE\Google\Chrome\NativeMessagingHosts\com.dutzi.tamper, change its value to C:\Users\tamper-manifest.json (replace with your username).

Now Tamper is working properly.
Hope the next version of Tamper will be released soon.
Thanks for your help.

@dutzi
Copy link
Owner

dutzi commented Oct 19, 2014

👍

@dutzi
Copy link
Owner

dutzi commented Oct 19, 2014

It's out in v0.24.1

@luanvuvt
Copy link

Thank you very much, @dutzi! :)
I have updated Tamper to version 0.24.1. It works properly.

@dutzi
Copy link
Owner

dutzi commented Oct 20, 2014

Great!

@dutzi dutzi closed this as completed Oct 20, 2014
@arianitu
Copy link

Proxy Error (100): Could not start proxy, port 8080 is in use

How do you change the port that tamper uses?

@dutzi
Copy link
Owner

dutzi commented Nov 13, 2014

Hi @arianitu, just click the cog icon (image), you can set the port there. Don't forget to restart the Proxy afterwards.

@SgtPooki
Copy link
Author

Whoohoo! it's been a crazy few weeks for me but i'm glad to see that this has been fixed. I will have to confirm for myself another time. Awesome work everyone.

@Nek
Copy link

Nek commented Dec 21, 2016

I have the same error including this loop:
'''
connecting to proxy
Disconnected
'''
Tried to run tamper.py from command line and this gives me:
'''
s {"msg": {"errorCode": 101, "errorDesc": "Could not start proxy, error loading libraries", "method": "proxy-error"}}
'''

@ailieff
Copy link

ailieff commented Feb 3, 2017

Try removing pydivert and install 1.0.2. I had the same issue
pip install pydivert==1.0.2

@ailieff
Copy link

ailieff commented Feb 3, 2017

btw, I'm having the same issue as luanvuvt. Cannot run Tamper. When I manually run temper.bat it runs OK.

Any ideas?

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

No branches or pull requests

9 participants