UltimaScraper icon indicating copy to clipboard operation
UltimaScraper copied to clipboard

No connection could be made because the target machine actively refused it.

Open Daironman78 opened this issue 5 years ago • 10 comments

Is there a fix that anyone knows of for this issue? I have been receiving the below message for the past few days. I have even downloaded the new version and all of my info (session, auth id, etc.) is correct but I get this message and then it says opening bowser and it opens another window. Can someone please tell me what I need to do to fix this and begin scraping again.

selenium.common.exceptions.TimeoutException: Message: No connection could be made because the target machine actively refused it. (os error 10061)

Daironman78 avatar Jul 27 '21 01:07 Daironman78

selenium.common.exceptions.TimeoutException: Message: No connection could be made because the target machine actively refused it. (os error 10061)

Is there any more log output where the line above came from? if so please provide it.

LunarPenguin avatar Jul 28 '21 12:07 LunarPenguin

File "C:\Users\Tony_\AppData\Local\Programs\Python\Python39-32\lib\asyncio\base_events.py", line 642, in run_until_complete return future.result() File "C:\Users\Tony_\Downloads\OnlyFans-7.4 -Daxxxxxxx\start_ofd.py", line 46, in main api = await main_datascraper.start_datascraper( File "C:\Users\Tony_\Downloads\OnlyFans-7.4 -Daxxxxxxxx\datascraper\main_datascraper.py", line 75, in start_datascraper setup, subscriptions = await module.account_setup( File "C:\Users\Tony_\Downloads\OnlyFans-7.4 -Daironman69\modules\onlyfans.py", line 122, in account_setup cookies = oflogin.login(auth, domain, auth.session_manager.get_proxy()) File "C:\Users\Tony_\Downloads\OnlyFans-7.4 -Daxxxxxxxx\extras\OFLogin\start_ofl.py", line 77, in login web_browser = launch_browser( File "C:\Users\Tony_\Downloads\OnlyFans-7.4 -Daxxxxxxx\extras\OFLogin\start_ofl.py", line 33, in launch_browser driver = webdriver.Firefox(firefox_profile=profile, executable_path=driver_path, File "C:\Users\Tony_\AppData\Local\Programs\Python\Python39-32\lib\site-packages\seleniumwire\webdriver\browser.py", line 45, in init super().init(*args, **kwargs) File "C:\Users\Tony_\AppData\Local\Programs\Python\Python39-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 170, in init RemoteWebDriver.init( File "C:\Users\Tony_\AppData\Local\Programs\Python\Python39-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in init self.start_session(capabilities, browser_profile) File "C:\Users\Tony_\AppData\Local\Programs\Python\Python39-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "C:\Users\Tony_\AppData\Local\Programs\Python\Python39-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Users\Tony_\AppData\Local\Programs\Python\Python39-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message: No connection could be made because the target machine actively refused it. (os error 10061)

Daironman78 avatar Jul 29 '21 01:07 Daironman78

Thanks, Just to confirm things:

  • do you use Firefox and have the correct webdriver installed (it looks you do, just for confirmation)?
  • Does the browser open at all before this error is given?

I myself do not use the selenium login option so i don't know what the logic is supposed to be but maybe @DIGITALCRIMINAL can have a look at what is going wrong

LunarPenguin avatar Jul 29 '21 09:07 LunarPenguin

Yes I use Firefox and use all of the requirements listed. It does say : opening browser and then will open up a window for me to log in again before these messages pop up though.

Daironman78 avatar Jul 29 '21 18:07 Daironman78

And now I am getting a different message when I tried again for the heck of it:

Auth (V1) Attempt 7/10 Access denied. Auth (V1) Attempt 8/10 Access denied. Auth (V1) Attempt 9/10 Access denied. Auth (V1) Attempt 10/10 Access denied. Opening Browser Traceback (most recent call last): File "C:\Users\Tony_\Downloads\OnlyFans-7.4 -Daxxxxxxx\start_ofd.py", line 62, in loop.run_until_complete(main()) File "C:\Users\Tony_\AppData\Local\Programs\Python\Python39-32\lib\asyncio\base_events.py", line 642, in run_until_complete return future.result() File "C:\Users\Tony_\Downloads\OnlyFans-7.4 -Daxxxxxxx\start_ofd.py", line 46, in main api = await main_datascraper.start_datascraper( File "C:\Users\Tony_\Downloads\OnlyFans-7.4 -Daxxxxxxx\datascraper\main_datascraper.py", line 75, in start_datascraper setup, subscriptions = await module.account_setup( File "C:\Users\Tony_\Downloads\OnlyFans-7.4 -Daxxxxxxx\modules\onlyfans.py", line 122, in account_setup cookies = oflogin.login(auth, domain, auth.session_manager.get_proxy()) File "C:\Users\Tony_\Downloads\OnlyFans-7.4 -Daxxxxxxx\extras\OFLogin\start_ofl.py", line 87, in login email_input = web_browser.find_element_by_id("input-71") File "C:\Users\Tony_\AppData\Local\Programs\Python\Python39-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 360, in find_element_by_id return self.find_element(by=By.ID, value=id_) File "C:\Users\Tony_\AppData\Local\Programs\Python\Python39-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 976, in find_element return self.execute(Command.FIND_ELEMENT, { File "C:\Users\Tony_\AppData\Local\Programs\Python\Python39-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Users\Tony_\AppData\Local\Programs\Python\Python39-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="input-71"]

Daironman78 avatar Jul 29 '21 19:07 Daironman78

You're not even using the latest version of the script.

UltimaHoarder avatar Jul 29 '21 20:07 UltimaHoarder

I was using the latest and was getting this message: File "C:\Users\Tony_\AppData\Local\Programs\Python\Python39-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.InvalidSessionIdException: Message: Tried to run command without establishing a connection

Daironman78 avatar Jul 29 '21 20:07 Daironman78

From what I am seeing from people that have had that issue before it is something to do with either Selenium trying to open before the site login can be established or something about driver close and driver quit.

Daironman78 avatar Jul 29 '21 20:07 Daironman78

selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities

Daironman78 avatar Jul 30 '21 02:07 Daironman78

Okay yall I figured it out. I removed all the old versions that I had stored and had to update my Firefox. I am back in business. Thanks.

Daironman78 avatar Jul 30 '21 02:07 Daironman78