'Undetectable chromedriver with ppadb crushing after conerting .py file to .exe

This is begging of my code:

import time

import undetected_chromedriver as uc

def add_options():

    options = uc.ChromeOptions()
    options.add_argument('--disable-infobars')
    options.add_argument("--disable-notifications")
    options.add_argument('--no-first-run --no-service-autorun --password-store=basic')
    options.add_argument('--disable-gpu')
    options.add_argument('--no-sandbox')
    options.add_argument("--window-size=1440,1080")

    return options

driver = uc.Chrome(options=add_options())

time.sleep(1)

driver.get('LINK')

Internet is estabilished with usb-tethering and ip is changed 10sec earlier using ppadb and those commands (using subcprocess.call instead of os): https://blog.actorsfit.com/a?ID=00850-1acd456e-9f60-4ca0-b34b-1143a3df4225

While running as .py code everything goes smooth, but after converting it to .exe with pyarmor afert getting to the 'LINK' I am getting this error:

*

DevTools Listening on us://127.0.0.1:54429/devtools/browser/af4aba7b-d735-484aa74b-71eb85b3d325 ERROR:device_event_log_impl.cc(214)] [12:43:12.925) Bluetooth: bluetooth adapter_winrt.cc 107 5 Getting Default Adapter failed. HTTPConnectionPool (host- 127.0.0.1', port-54423): Max retries exceeded with url: /session/a2a29104 FSeb357d93a98a2c09d257 6e/elements (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at exaeeee27e45@bеp³8>: Failed to e stablish a new connection: [WinError 18061] Nie można nawiązać połączenia

*

I can see that ports for some reason are different. Any solution?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source