Mekolaos / Aternos-On-Discord

A Discord Bot to manage a minecraft server on Aternos.
GNU General Public License v3.0
101 stars 91 forks source link

Bot stuck on logging into server #47

Closed SaharshDaNerd closed 2 years ago

SaharshDaNerd commented 3 years ago

It gives this error when I start the bot and the bot's status is stuck on Logging in.

DevTools listening on ws://127.0.0.1:52958/devtools/browser/f6be6125-88f9-4bae-a7df-77e77ca186b3
[WARNING] 2021-05-12 14:05:56,657 - PyNaCl is not installed, voice will NOT be supported
[INFO] 2021-05-12 14:05:56,657 - logging in using static token
[INFO] 2021-05-12 14:05:57,548 - Shard ID None has sent the IDENTIFY payload.
[INFO] 2021-05-12 14:05:57,996 - Shard ID None has connected to Gateway: ["gateway-prd-main-mp6n",{"micros":55180,"calls":["discord-sessions-prd-2-145",{"micros":52545,"calls":["start_session",{"micros":36046,"calls":["api-prd-main-mzxc",{"micros":32801,"calls":["get_user",{"micros":3217},"add_authorized_ip",{"micros":1724},"get_guilds",{"micros":9536},"coros_wait",{"micros":1}]}]},"guilds_connect",{"micros":2,"calls":[]},"presence_connect",{"micros":1698,"calls":[]}]}]}] (Session ID: 697c0b8bfb9bfef3ad7e7b4ea2f20cf5).
Ignoring exception in on_ready
Traceback (most recent call last):
  File "C:\Users\Lenovo-PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "D:\Downloads\Aternos-On-Discord-master\Aternos-On-Discord-master\Bot.py", line 51, in on_ready
    connect_account()  # logs into aternos
  File "D:\Downloads\Aternos-On-Discord-master\Aternos-On-Discord-master\connect_and_launch.py", line 124, in connect_account
    element = driver.find_element_by_css_selector('body > div > main > section'
  File "C:\Users\Lenovo-PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\remote\webdriver.py", line 598, in find_element_by_css_selector
    return self.find_element(by=By.CSS_SELECTOR, value=css_selector)
  File "C:\Users\Lenovo-PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\remote\webdriver.py", line 976, in find_element
    return self.execute(Command.FIND_ELEMENT, {
  File "C:\Users\Lenovo-PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Users\Lenovo-PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"body > div > main > section> div > div.servers.single > div > div.server-body"}
  (Session info: headless chrome=90.0.4430.212)
mcm2007 commented 3 years ago

Happen the same thing with me. And in the isseus the last one says than we have to put the aternos ip server somewere but it doesn´t show a solt for that. In discord some commans are ok but the bot says logging into aternos...

SaharshDaNerd commented 3 years ago

Happen the same thing with me. And in the isseus the last one says than we have to put the aternos ip server somewere but it doesn´t show a solt for that. In discord some commans are ok but the bot says logging into aternos...

Yes that's the same issue with me, do you have any fix as of now? Thank you

mcm2007 commented 3 years ago

image @Mekolaos I followed the #13 and this occoured.

mcm2007 commented 3 years ago

The aternos support regarding the error says: Error 403 is a Cloudflare block which can happen due to certain characters you try to save in a config file. This should be fixable by removing comments (#) in the file you are trying to save.

CaptainIK110 commented 3 years ago

I removed all the comments in the config (and other files that also had comments), didn't work.

pritam20ps05 commented 2 years ago

please once check my project on this https://github.com/pritam20ps05/mcscraper it works pretty well and works 98% of the time my server personally uses it.