vicwomg / pikaraoke

Youtube-based Karaoke machine for Raspberry Pi, OSX, Windows, and Linux
494 stars 129 forks source link

[BUG] RaspberryPi 4 - Getting selenium error on ./pikaraoke.sh execution #313

Closed Altheran88 closed 9 months ago

Altheran88 commented 9 months ago

Fresh Pi 4 installation, I went with the full 64 bit installation to be sure.

Here are the exact steps I took logged-in via SSH under the user "pi" on first boot :

sudo apt update && sudo apt upgrade -y reboot git clone https://github.com/vicwomg/pikaraoke.git cd pikaraoke ./setup.sh ./pikaraoke.sh

Here is what I am getting from the .sh execution


pi@pikaraoke:~/pikaraoke $ ./pikaraoke.sh [2024-01-05 16:33:29] INFO: Fetching available songs in: /home/pi/pikaraoke-songs/ [05/Jan/2024:16:33:29] ENGINE Bus STARTING [2024-01-05 16:33:29] INFO: [05/Jan/2024:16:33:29] ENGINE Bus STARTING [05/Jan/2024:16:33:30] ENGINE Serving on http://0.0.0.0:5555 [2024-01-05 16:33:30] INFO: [05/Jan/2024:16:33:30] ENGINE Serving on http://0.0.0.0:5555 [05/Jan/2024:16:33:30] ENGINE Bus STARTED [2024-01-05 16:33:30] INFO: [05/Jan/2024:16:33:30] ENGINE Bus STARTED Traceback (most recent call last): File "/home/pi/pikaraoke/app.py", line 863, in driver = webdriver.Chrome(service=service, options=options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pi/pikaraoke/.venv/lib/python3.11/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in init super().init( File "/home/pi/pikaraoke/.venv/lib/python3.11/site-packages/selenium/webdriver/chromium/webdriver.py", line 61, in init super().init(command_executor=executor, options=options) File "/home/pi/pikaraoke/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 209, in init self.start_session(capabilities) File "/home/pi/pikaraoke/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 293, in start_session response = self.execute(Command.NEW_SESSION, caps)["value"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pi/pikaraoke/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 348, in execute self.error_handler.check_response(response) File "/home/pi/pikaraoke/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.SessionNotCreatedException: Message: session not created: Chrome failed to start: exited normally. (session not created: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace:

0 0x00556bbb75f4

1 0x00556b8a7264

2 0x00556b8d9304

3 0x00556b8d57cc

4 0x00556b91badc

5 0x00556b8e0a2c

6 0x00556b8e1c44

7 0x00556bb8160c

8 0x00556bb849c0

9 0x00556bb71aec

10 0x00556bb8537c

11 0x00556bb59ea0

12 0x00556bba53f0

13 0x00556bba55bc

14 0x00556bbb67a8

15 0x007fae34ee18

16 0x007fae3b7e9c


Then I can CTRL+C to end the execution


^CException ignored in: <module 'threading' from '/usr/lib/python3.11/threading.py'> Traceback (most recent call last): File "/usr/lib/python3.11/threading.py", line 1583, in _shutdown lock.acquire() KeyboardInterrupt: /home/pi/pikaraoke/.venv/lib/python3.11/site-packages/cherrypy/process/wspbus.py:254: RuntimeWarning: The main thread is exiting, but the Bus is in the states.STARTED state; shutting it down automatically now. You must either call bus.block() after start(), or call bus.exit() before the main thread exits. warnings.warn( [05/Jan/2024:16:40:07] ENGINE Bus STOPPING [2024-01-05 16:40:07] INFO: [05/Jan/2024:16:40:07] ENGINE Bus STOPPING [05/Jan/2024:16:40:07] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 5555)) shut down [2024-01-05 16:40:07] INFO: [05/Jan/2024:16:40:07] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 5555)) shut down [05/Jan/2024:16:40:07] ENGINE Bus STOPPED [2024-01-05 16:40:07] INFO: [05/Jan/2024:16:40:07] ENGINE Bus STOPPED [05/Jan/2024:16:40:07] ENGINE Bus EXITING [2024-01-05 16:40:07] INFO: [05/Jan/2024:16:40:07] ENGINE Bus EXITING [05/Jan/2024:16:40:07] ENGINE Bus EXITED [2024-01-05 16:40:07] INFO: [05/Jan/2024:16:40:07] ENGINE Bus EXITED

vicwomg commented 9 months ago

You probably can’t run over SSH unless you run with the —headless option. Reason being by default PiKaraoke will try to launch a browser with the splash screen UI

On Fri, Jan 5, 2024 at 4:41 PM Altheran88 @.***> wrote:

Fresh Pi 4 installation, I went with the full 64 bit installation to be sure.

Here are the exact steps I took logged-in via SSH under the user "pi" on first boot :

sudo apt update && sudo apt upgrade -y reboot git clone https://github.com/vicwomg/pikaraoke.git cd pikaraoke ./setup.sh ./pikaraoke.sh

Here is what I am getting from the .sh execution

@.**:~/pikaraoke $ ./pikaraoke.sh [2024-01-05 16:33:29] INFO: Fetching available songs in: /home/pi/pikaraoke-songs/ [05/Jan/2024:16:33:29] ENGINE Bus STARTING [2024-01-05 16:33:29] INFO: [05/Jan/2024:16:33:29] ENGINE Bus STARTING [05/Jan/2024:16:33:30] ENGINE Serving on http://0.0.0.0:5555 [2024-01-05 16:33:30] INFO: [05/Jan/2024:16:33:30] ENGINE Serving on http://0.0.0.0:5555 [05/Jan/2024:16:33:30] ENGINE Bus STARTED [2024-01-05 16:33:30] INFO: [05/Jan/2024:16:33:30] ENGINE Bus STARTED Traceback (most recent call last): File "/home/pi/pikaraoke/app.py", line 863, in driver = webdriver.Chrome(service=service, options=options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pi/pikaraoke/.venv/lib/python3.11/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in init super().init( File "/home/pi/pikaraoke/.venv/lib/python3.11/site-packages/selenium/webdriver/chromium/webdriver.py", line 61, in init super().init(command_executor=executor, options=options) File "/home/pi/pikaraoke/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 209, in init* self.start_session(capabilities) File "/home/pi/pikaraoke/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 293, in start_session response = self.execute(Command.NEW_SESSION, caps)["value"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pi/pikaraoke/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 348, in execute self.error_handler.check_response(response) File "/home/pi/pikaraoke/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.SessionNotCreatedException: Message: session not created: Chrome failed to start: exited normally. (session not created: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace:

0 0x00556bbb75f4

1 https://github.com/vicwomg/pikaraoke/issues/1 0x00556b8a7264

2 https://github.com/vicwomg/pikaraoke/issues/2 0x00556b8d9304

3 https://github.com/vicwomg/pikaraoke/issues/3 0x00556b8d57cc

4 https://github.com/vicwomg/pikaraoke/issues/4 0x00556b91badc

5 https://github.com/vicwomg/pikaraoke/issues/5 0x00556b8e0a2c

6 https://github.com/vicwomg/pikaraoke/issues/6 0x00556b8e1c44

7 https://github.com/vicwomg/pikaraoke/issues/7 0x00556bb8160c

8 https://github.com/vicwomg/pikaraoke/pull/8 0x00556bb849c0

9 https://github.com/vicwomg/pikaraoke/pull/9 0x00556bb71aec

10 https://github.com/vicwomg/pikaraoke/pull/10 0x00556bb8537c

11 https://github.com/vicwomg/pikaraoke/issues/11 0x00556bb59ea0

12 https://github.com/vicwomg/pikaraoke/issues/12 0x00556bba53f0

13 https://github.com/vicwomg/pikaraoke/issues/13 0x00556bba55bc

14 https://github.com/vicwomg/pikaraoke/issues/14 0x00556bbb67a8

15 https://github.com/vicwomg/pikaraoke/issues/15 0x007fae34ee18

16 https://github.com/vicwomg/pikaraoke/issues/16 0x007fae3b7e9c


Then I can CTRL+C to end the execution

^CException ignored in: <module 'threading' from '/usr/lib/python3.11/threading.py'> Traceback (most recent call last): File "/usr/lib/python3.11/threading.py", line 1583, in _shutdown lock.acquire() KeyboardInterrupt: /home/pi/pikaraoke/.venv/lib/python3.11/site-packages/cherrypy/process/wspbus.py:254: RuntimeWarning: The main thread is exiting, but the Bus is in the states.STARTED state; shutting it down automatically now. You must either call bus.block() after start(), or call bus.exit() before the main thread exits. warnings.warn( [05/Jan/2024:16:40:07] ENGINE Bus STOPPING [2024-01-05 16:40:07] INFO: [05/Jan/2024:16:40:07] ENGINE Bus STOPPING [05/Jan/2024:16:40:07] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 5555)) shut down [2024-01-05 16:40:07] INFO: [05/Jan/2024:16:40:07] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 5555)) shut down [05/Jan/2024:16:40:07] ENGINE Bus STOPPED [2024-01-05 16:40:07] INFO: [05/Jan/2024:16:40:07] ENGINE Bus STOPPED [05/Jan/2024:16:40:07] ENGINE Bus EXITING [2024-01-05 16:40:07] INFO: [05/Jan/2024:16:40:07] ENGINE Bus EXITING [05/Jan/2024:16:40:07] ENGINE Bus EXITED [2024-01-05 16:40:07] INFO: [05/Jan/2024:16:40:07] ENGINE Bus EXITED

— Reply to this email directly, view it on GitHub https://github.com/vicwomg/pikaraoke/issues/313, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7KXNVXOVVQOFDP7HEOSOLYNBXQNAVCNFSM6AAAAABBO7Z5TOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA3DQMBXGAZTOMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Altheran88 commented 9 months ago

That's it, Ive configured the autostart and at reboot, it all worked, thanks !