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

tbselenium not working with Tor Browser 8.0 #105

Closed
alexgonca opened this issue Sep 12, 2018 · 10 comments
Closed

tbselenium not working with Tor Browser 8.0 #105

alexgonca opened this issue Sep 12, 2018 · 10 comments

Comments

@alexgonca
Copy link

I have tried running my scripts with Tor Browser version 8.0 on Lubuntu 16.04:
https://www.torproject.org/dist/torbrowser/8.0/tor-browser-linux64-8.0_en-US.tar.xz

The browser is working fine when I start it from command line.
When I start it via tbselenium, it does not connect to the Tor process and issues the following error message:
"The proxy server is refusing connections".

The script works fine when I downgrade Tor Browser to version 7.5.6.

@gunesacar
Copy link
Collaborator

Thanks for reporting. Indeed, upgrading to v8 broke many tests.

In the meantime, please update geckodriver and seleniumto latest if you happen to have out of date versions. As you can see from the Travis test results, a lot of tests actually pass.

@alexgonca
Copy link
Author

I am using the latest selenium version... but I thought we had to use geckodriver v0.17.0 according to the installation instructions. Is that not the case anymore?

@gunesacar
Copy link
Collaborator

I am using the latest selenium version... but I thought we had to use geckodriver v0.17.0 according to the installation instructions. Is that not the case anymore?

It won't be the case any more with TB 8.0. Will be updated to the latest geckodriver version.

I just checked: tbselenium & TB 8.0 work together nicely if you use external tor process, such as 1) system tor via tor_cfg=cm.USE_RUNNING_TOR or 2) stem (see example/stem_simple.py example).

@gunesacar
Copy link
Collaborator

This example works for me with Tor Browser v8.0, geckodriver v0.21.0 and selenium v3.12.0

@elfelround
Copy link

8.0.4 tor & recommended gecko 0.17 also gives me this issue

@gunesacar gunesacar changed the title not working with Tor Browser 8.0 tbselenium not working with Tor Browser 8.0 Jan 1, 2019
@redshiftzero
Copy link

Given the test failures, we should expect limited functionality (e.g. JSDisableTest.test_disable_js is failing) using an external tor process no?

@gunesacar
Copy link
Collaborator

Given the test failures, we should expect limited functionality (e.g. JSDisableTest.test_disable_js is failing) using an external tor process no?

Sorry for the delayed response. Short answer is, after the pull request I just merged , disabling JavaScript and adjusting security slider became impossible so I removed those tests.

The main issue is that we disable JavaScript or adjust security slider by flipping some prefs. It looks like Tor Browser extensions are not being notified of these pref changes and act indifferently. If you need to disable JavaScript, that can be done by emulating a use visiting about: config:
https://github.com/citp/email_tracking/blob/79c78b2de09b79639776fb576ae1497d2f3184fc/crawler_emails/automation/DeployBrowsers/deploy_firefox.py#L144-L152

Other than the removed tests, removed core functionality is pretty reliable.

@gunesacar
Copy link
Collaborator

8.0.4 tor & recommended gecko 0.17 also gives me this issue

Please update tbselenium from PyPI or from this repo. Either case you should upgrade to gecko 0.23.

@gunesacar
Copy link
Collaborator

This is fixed by #110

@blackdolphin65
Copy link

I am facing the same problem, I also tried to install Selenium 3.3 as you have in the requirements but it says that selenium 3.3 is incompatible with tbselenium. Here you have the log from the installation of selenium 3.3: https://0bin.net/paste/ykQ0JFwr-qO+L6xR#Wx+h6tebNX+V-Wu/+dNOx55IiLIEyHkyp9f3l9T2pFP Let me know if I can do something else to fix this issue for me and other people who may face the same problem

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

5 participants