Poryaei / All-In-One

Automatic clicker for the (Hamster ~ TapSwap ~ Cex IO) bots.
MIT License
119 stars 26 forks source link

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

Closed xDaijobu closed 3 months ago

xDaijobu commented 3 months ago

image

K1ckMan commented 3 months ago

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 commented 3 months ago

@K1ckMan Not good action

matvei74 commented 3 months ago

same problem

davletbaevtr commented 3 months ago

same

hybridvamp commented 3 months ago

same issue

Kolesnikov-R commented 3 months ago

same problem

K1ckMan commented 3 months ago

@K1ckMan Not good action

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

THMaST3R commented 3 months ago

same problem

Poryaei commented 3 months ago

Wait pls

Poryaei commented 3 months ago

image

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

danazor commented 3 months ago

it works thanks^^ @Poryaei

THMaST3R commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

it's working now

thanks

Poryaei commented 3 months ago

@glushko Thanks

Poryaei commented 3 months ago

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

glushko commented 3 months ago

thx, it's working πŸ₯‡