Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

[TapSwap] Error in auth: list index out of range & We ran into trouble with the get auth token! #22

Closed
xDaijobu opened this issue Jun 13, 2024 · 19 comments

Comments

@xDaijobu
Copy link

image

@K1ckMan
Copy link

K1ckMan commented Jun 13, 2024

Yes you can remove exit app.

def prepare_prerequisites(self):
    uph = self.update_headers()
    if not uph:
        self.logger.error("[!] We ran into trouble with the updates to the headers! 🚫 The script is not stopping, but this is an issue.")
        
    atk = self.get_auth_token()
    if not atk:
        self.logger.error("[!] We ran into trouble with the get auth token! 🚫 The script is not stopping, but this is an issue.")

@Poryaei
Copy link
Owner

Poryaei commented Jun 13, 2024

@K1ckMan Not good action

@matvei74
Copy link

same problem

@davletbaevtr
Copy link

same

@hybridvamp
Copy link

same issue

@Kolesnikov-R
Copy link

same problem

@K1ckMan
Copy link

K1ckMan commented Jun 13, 2024

@K1ckMan Not good action

Temporary workaround, skip auth check. But I can’t found how to fix error getting new key.

@THMaST3R
Copy link

same problem

@Poryaei
Copy link
Owner

Poryaei commented Jun 13, 2024

Wait pls

@Poryaei
Copy link
Owner

Poryaei commented Jun 13, 2024

image

Please test the update and let me know if it's correct, thank you 😊

@danazor
Copy link

danazor commented Jun 13, 2024

it works thanks^^ @Poryaei

@THMaST3R
Copy link

THMaST3R commented Jun 13, 2024

its not working for me on ubuntu 22.0

Making [chromedriver 126.0.6478.61] executable ...
[chromedriver 126.0.6478.61] is now ready for use!

Traceback (most recent call last):
  File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/core/browser_launcher.py", line 3862, in get_local_driver
    driver = webdriver.Chrome(options=chrome_options)
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 55, in __init__
    self.service.start()
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 102, in start
    self.assert_process_still_running()
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 115, in assert_process_still_running
    raise WebDriverException(f"Service {self._path} unexpectedly exited. Status code was: {return_code}")
selenium.common.exceptions.WebDriverException: Message: Service /root/.cache/selenium/chromedriver/linux64/126.0.6478.61/chromedriver unexpectedly exited. Status code was: 127

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/All-In-One/app.py", line 10, in <module>
    from scripts.bypass_js import driver_instance
  File "/root/All-In-One/scripts/bypass_js.py", line 66, in <module>
    driver_instance = SingletonDriver()
  File "/root/All-In-One/scripts/bypass_js.py", line 13, in __new__
    cls._instance.driver_context = DriverContext()
  File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/plugins/driver_manager.py", line 44, in __init__
    self.driver = Driver(*args, **kwargs)
  File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/plugins/driver_manager.py", line 529, in Driver
    driver = browser_launcher.get_driver(
  File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/core/browser_launcher.py", line 1657, in get_driver
    return get_local_driver(
  File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/core/browser_launcher.py", line 3944, in get_local_driver
    driver = webdriver.Chrome(
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 55, in __init__
    self.service.start()
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 102, in start
    self.assert_process_still_running()
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 115, in assert_process_still_running
    raise WebDriverException(f"Service {self._path} unexpectedly exited. Status code was: {return_code}")
selenium.common.exceptions.WebDriverException: Message: Service /root/.cache/selenium/chromedriver/linux64/126.0.6478.61/chromedriver unexpectedly exited. Status code was: 127
Exception ignored in: <function SingletonDriver.__del__ at 0x7f67f9d79cf0>
Traceback (most recent call last):
  File "/root/All-In-One/scripts/bypass_js.py", line 63, in __del__
AttributeError: 'SingletonDriver' object has no attribute 'driver_context'

@THMaST3R
Copy link

THMaST3R commented Jun 13, 2024

its not working for me on ubuntu 22.0

Making [chromedriver 126.0.6478.61] executable ...
[chromedriver 126.0.6478.61] is now ready for use!

Traceback (most recent call last):
  File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/core/browser_launcher.py", line 3862, in get_local_driver
    driver = webdriver.Chrome(options=chrome_options)
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 55, in __init__
    self.service.start()
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 102, in start
    self.assert_process_still_running()
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 115, in assert_process_still_running
    raise WebDriverException(f"Service {self._path} unexpectedly exited. Status code was: {return_code}")
selenium.common.exceptions.WebDriverException: Message: Service /root/.cache/selenium/chromedriver/linux64/126.0.6478.61/chromedriver unexpectedly exited. Status code was: 127

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/All-In-One/app.py", line 10, in <module>
    from scripts.bypass_js import driver_instance
  File "/root/All-In-One/scripts/bypass_js.py", line 66, in <module>
    driver_instance = SingletonDriver()
  File "/root/All-In-One/scripts/bypass_js.py", line 13, in __new__
    cls._instance.driver_context = DriverContext()
  File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/plugins/driver_manager.py", line 44, in __init__
    self.driver = Driver(*args, **kwargs)
  File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/plugins/driver_manager.py", line 529, in Driver
    driver = browser_launcher.get_driver(
  File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/core/browser_launcher.py", line 1657, in get_driver
    return get_local_driver(
  File "/root/All-In-One/venv/lib/python3.10/site-packages/seleniumbase/core/browser_launcher.py", line 3944, in get_local_driver
    driver = webdriver.Chrome(
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 55, in __init__
    self.service.start()
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 102, in start
    self.assert_process_still_running()
  File "/root/All-In-One/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 115, in assert_process_still_running
    raise WebDriverException(f"Service {self._path} unexpectedly exited. Status code was: {return_code}")
selenium.common.exceptions.WebDriverException: Message: Service /root/.cache/selenium/chromedriver/linux64/126.0.6478.61/chromedriver unexpectedly exited. Status code was: 127
Exception ignored in: <function SingletonDriver.__del__ at 0x7f67f9d79cf0>
Traceback (most recent call last):
  File "/root/All-In-One/scripts/bypass_js.py", line 63, in __del__
AttributeError: 'SingletonDriver' object has no attribute 'driver_context'

oh, I did not have the libnss3 package, it was fixed by installing it

@ElyasMoshirpanahi
Copy link

Amazing program for automation!
Thank you porya

For those who don't know , you need to install libness3 on ubuntu to make the script run smoothly:
https://askubuntu.com/questions/61931/how-to-install-libnss3-dev

Good luck!

@glushko
Copy link

glushko commented Jun 13, 2024

BW If you use Docker (like me) for fix it can be helpful (I can't say is the best choice, but it's working)

FROM python:3.10-slim

RUN apt-get update \
    && apt-get install -y \
    wget \
    unzip \
    curl \
    gnupg \
    libglib2.0-0 \
    libnss3 \
    libnss3-dev \
    libgconf-2-4 \
    libfontconfig1 \
    libxrender1 \
    libxtst6 \
    --no-install-recommends \
    && rm -rf /var/lib/apt/lists/*

# Install Google Chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
    && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
    && apt-get update \
    && apt-get install -y google-chrome-stable \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

COPY . .

CMD ["python", "main.py"] #use your main script 

image

@xDaijobu
Copy link
Author

it's working now

thanks

@Poryaei
Copy link
Owner

Poryaei commented Jun 14, 2024

@glushko Thanks

@Poryaei
Copy link
Owner

Poryaei commented Jun 14, 2024

I tried to remove Selenium! So if you can't run the code with Selenium, you can update it.

@glushko
Copy link

glushko commented Jun 15, 2024

thx, it's working 🥇

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

No branches or pull requests