veldenb / plugin.program.moonlight-qt

A launcher and updater for running Moonlight-qt on LibreELEC.
GNU General Public License v3.0
86 stars 11 forks source link

Crash on start with LibreELEC12 on Pi4 #41

Closed witchent closed 8 months ago

witchent commented 8 months ago

I tried to install this on my Raspberry Pi 4, latest nightly of LibreELEC 12. Installing seems to work, but if I start moonlight after "install latest version" it crashes with the following log: cat /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt.log:

Platform 'rpi' running 'libreelec' detected...
Loading LibreELEC profile for setting up environment...
Using custom libraries from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib...
Using Qt library from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5...
Running without window manager...
Detected resolution 1920,1080...
Using Qt scale factor 0.64...
Using Kodi hooks for libreelec...
--- Starting Moonlight ---
bootstrap_moonlight-qt.sh: line 148: ./moonlight-qt: not found

I looked in the folder and got: ls -lah /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/bin/ -rwxr-xr-x 1 root root 5.8M Oct 27 13:06 moonlight-qt

I entered echo $PWD before the aforementioned line, and now the output reads

--- Starting Moonlight ---
/storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/bin
bootstrap_moonlight-qt.sh: line 149: ./moonlight-qt: not found

That does not make any sense to me, it seems that the addon is in the correct directory, the file is there, but the bootstrap does not find it. Any idea how to further debug/fix this? I think it might be related to the switch to Aarch64 for the pi4 build of LibreELEC, but I am sadly not experienced enough to confirm this.

veldenb commented 8 months ago

I think it might be related to the switch to Aarch64 for the pi4 build of LibreELEC, but I am sadly not experienced enough to confirm this.

That's indeed the case why moonlight-qt doesn't work with the plugin at this moment. I still need to figure out if and how to get this running on LibreELEC 12.

cgutman commented 8 months ago

Assuming LibreELEC 12 is based on Debian Bookworm, I think you'll need to use the Moonlight packages for Bookworm. I know at least OpenSSL 1.1 -> 3.0 is binary incompatible, so the older Buster/Bullseye packages won't work on Bookworm.

witchent commented 8 months ago

Sad news, but at least it is expected. So your guess is one would need to create a raspberian-bookworm docker image (basically follow https://github.com/navikey/raspbian-bullseye/blob/main/Dockerfile), switch to that in https://github.com/veldenb/plugin.program.moonlight-qt/blob/main/resources/build/rpi/Dockerfile and everything else should then work?

Edit:// I tried to see if anything changed regarding a base image version, but was not able to find anything. So not sure if this is indeed the problem. Also, I would be hoping that a wrong binary would give an appropriate error and not just "not found", though again this is out of my expertise.

veldenb commented 8 months ago

Also, I would be hoping that a wrong binary would give an appropriate error and not just "not found", though again this is out of my expertise.

That's indeed somewhat odd, but I noticed that's the message you get when the architecture of the binary is different. I'm currently sorting out a different issue to get moonlight-qt 5 running on x86, so this one will be second to that.

I do this in my spare time, so it will eventually get solved but it may take some time. I'll try to fix it before the official release of LibreELEC 12 :)

witchent commented 8 months ago

Alright, if I can be of any help let me know, and thanks for doing all this work :)

veldenb commented 8 months ago

@witchent could you try this build: plugin.program.moonlight-qt-0.4.0.zip?

witchent commented 8 months ago

It ends with "update failed: moving 'tmp'->'moonlight-qt'" or something similar, but it seems to work fine in my very limited tests so far. If you got an idea why this happens it might still be nice to fix this. If something else pops up I will create a new issue as this issue has been fixed.

If I can send you a beer/coffee somehow let me know. In any case, thanks a ton for your work.

veldenb commented 8 months ago

It ends with "update failed: moving 'tmp'->'moonlight-qt'" or something similar, but it seems to work fine in my very limited tests so far. If you got an idea why this happens it might still be nice to fix this.

If you see that line everything went well and the update failed message shouldn't be displayed, I'll see if my pi does that.

If something else pops up I will create a new issue as this issue has been fixed.

Feel free to do so

If I can send you a beer/coffee somehow let me know. In any case, thanks a ton for your work.

Others testing new releases helps me a lot :)