scakemyer / plugin.video.quasar

Quasar add-on for Kodi
https://quasar.surge.sh/
346 stars 94 forks source link

Doesn't work on S905X using LibreELEC #570

Closed fabioneves closed 7 years ago

fabioneves commented 7 years ago

I've used the linux_arm64 release. Any idea what could it be?

23:28:46.817 T:3707982752   DEBUG: -->Python Interpreter Initialized<--
23:28:46.818 T:3707982752   DEBUG: CPythonInvoker(13, /storage/.kodi/addons/plugin.video.quasar/service.py): the source file to load is "/storage/.kodi/addons/plugin.video.quasar/service.py"
23:28:46.818 T:3707982752   DEBUG: CPythonInvoker(13, /storage/.kodi/addons/plugin.video.quasar/service.py): setting the Python path to /storage/.kodi/addons/plugin.video.quasar:/usr/lib/python27.zip:/usr/lib/python2.7:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages/gtk-2.0
23:28:46.818 T:3707982752   DEBUG: CPythonInvoker(13, /storage/.kodi/addons/plugin.video.quasar/service.py): entering source directory /storage/.kodi/addons/plugin.video.quasar
23:28:46.818 T:3707982752   DEBUG: CPythonInvoker(13, /storage/.kodi/addons/plugin.video.quasar/service.py): instantiating addon using automatically obtained id of "plugin.video.quasar" dependent on version 2.1.0 of the xbmc.python api
23:28:46.875 T:4122357760   DEBUG: CGUIMediaWindow::GetDirectory (addons://)
23:28:46.875 T:4122357760   DEBUG:   ParentPath = [addons://]
23:28:46.909 T:3667141536   DEBUG: CAddonMgr::GetAvailableUpdates took 33 ms
23:28:46.935 T:3616809888   DEBUG: Thread BackgroundLoader start, auto delete: false
23:28:46.938 T:3616809888   DEBUG: Thread BackgroundLoader 3616809888 terminating
23:28:47.357 T:3616809888   ERROR: [plugin.video.quasar] Traceback (most recent call last):
23:28:47.357 T:3616809888   ERROR: [plugin.video.quasar]   File "/storage/.kodi/addons/plugin.video.quasar/resources/site-packages/quasar/rpc.py", line 280, in server_thread
23:28:47.357 T:3616809888   ERROR: [plugin.video.quasar]     s = bjsonrpc.createserver(port=JSONRPC_EXT_PORT, handler_factory=QuasarRPCServer)
23:28:47.358 T:3616809888   ERROR: [plugin.video.quasar]   File "/storage/.kodi/addons/plugin.video.quasar/resources/site-packages/bjsonrpc/main.py", line 55, in createserver
23:28:47.358 T:3616809888   ERROR: [plugin.video.quasar]     sck.bind((host, port))
23:28:47.358 T:3616809888   ERROR: [plugin.video.quasar]   File "/usr/lib/python2.7/socket.py", line 228, in meth
23:28:47.358 T:3616809888   ERROR: [plugin.video.quasar] error: [Errno 98] Address already in use
23:28:47.359 T:3616809888   ERROR: [plugin.video.quasar]
23:28:47.359 T:3616809888   ERROR: Exception in thread Thread-1:
                                            Traceback (most recent call last):
                                              File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
                                              File "/usr/lib/python2.7/threading.py", line 754, in run
                                              File "/storage/.kodi/addons/plugin.video.quasar/resources/site-packages/quasar/rpc.py", line 280, in server_thread
                                                s = bjsonrpc.createserver(port=JSONRPC_EXT_PORT, handler_factory=QuasarRPCServer)
                                              File "/storage/.kodi/addons/plugin.video.quasar/resources/site-packages/bjsonrpc/main.py", line 55, in createserver
                                                sck.bind((host, port))
                                              File "/usr/lib/python2.7/socket.py", line 228, in meth
                                            error: [Errno 98] Address already in use
23:28:47.360 T:3650364320  NOTICE: [plugin.video.quasar] quasard: starting quasard
23:28:47.370 T:3650364320  NOTICE: [plugin.video.quasar] Deleting stale files set([])
23:28:47.406 T:3650364320   ERROR: [plugin.video.quasar] Traceback (most recent call last):
23:28:47.406 T:3650364320   ERROR: [plugin.video.quasar]   File "/storage/.kodi/addons/plugin.video.quasar/resources/site-packages/quasar/daemon.py", line 157, in quasard_thread
23:28:47.407 T:3650364320   ERROR: [plugin.video.quasar]     proc = start_quasard(stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
23:28:47.407 T:3650364320   ERROR: [plugin.video.quasar]   File "/storage/.kodi/addons/plugin.video.quasar/resources/site-packages/quasar/daemon.py", line 135, in start_quasard
23:28:47.407 T:3650364320   ERROR: [plugin.video.quasar]     return subprocess.Popen(args, **kwargs)
23:28:47.407 T:3650364320   ERROR: [plugin.video.quasar]   File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
23:28:47.408 T:3650364320   ERROR: [plugin.video.quasar]   File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
23:28:47.408 T:3650364320   ERROR: [plugin.video.quasar] OSError: [Errno 2] No such file or directory
23:28:47.408 T:3650364320   ERROR: [plugin.video.quasar]
23:28:47.409 T:3650364320   ERROR: Exception in thread Thread-2:
                                            Traceback (most recent call last):
                                              File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
                                              File "/usr/lib/python2.7/threading.py", line 754, in run
                                              File "/storage/.kodi/addons/plugin.video.quasar/resources/site-packages/quasar/daemon.py", line 157, in quasard_thread
                                                proc = start_quasard(stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
                                              File "/storage/.kodi/addons/plugin.video.quasar/resources/site-packages/quasar/daemon.py", line 135, in start_quasard
                                                return subprocess.Popen(args, **kwargs)
                                              File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
                                              File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
                                            OSError: [Errno 2] No such file or directory
23:28:53.597 T:4122357760   DEBUG: ------ Window Deinit (DialogNotification.xml) ------
23:29:16.876 T:3926922144   DEBUG: Thread JobWorker 3926922144 terminating (autodelete)
23:29:16.876 T:3633587104   DEBUG: Thread JobWorker 3633587104 terminating (autodelete)
23:29:16.929 T:3667141536   DEBUG: Thread JobWorker 3667141536 terminating (autodelete)
fabioneves commented 7 years ago

More details into this, it's an Amlogic S905X build of LibreELEC, it works fine if the platform is S905.aarch64, but it doesn't if I use a 32bit userspace build, which the reported platform is S905.arm.

I think we have a binary that works on 32bit, I think it's just the addon that's not detecting the platform properly?

vsterev commented 7 years ago

I have S905 libreELEC 8.0 and have the same problem.

kostaboxon commented 7 years ago

LibreElec OS with the issues are the Versions using 32-bit userspace with a 64-bit kernel I used a LibreELEC Backup with a working Quasar from an S805 32bit box and restored my S905X running the 32-bit userspace with a 64-bit kernel LibreELEC version. Again failed to locate Binary Files. I'm not qualified to identify where Quasar is tripping up in identifying the platform. Is it maybe from the Kernel ?

scakemyer commented 7 years ago

Seems there are two issues here, error: [Errno 98] Address already in use for the RPC server and platform detection. For the former, there's either something using port 65252 or two instances of the add-on running (an old Pulsar maybe?) For the latter we need the logs of the add-on installation, not just when starting it afterwards. Platform detection is in osarch.py in case one of you want to try a few things out.

kostaboxon commented 7 years ago

Clean install nothing but Quasar. Installed from Zip File plugin.video.quasar-0.9.41.linux_armv7 All Logs inside the attached zip. In sepearate folders folders. All Quasar Logs.zip

Clean Install LibreELEC log (Nothing installed) After Quasar Install log (Log taken after install from zip) After Reboot Log (Log taken after reboot)

scakemyer commented 7 years ago

Ok thanks but no more zips inside zips inside folders inside other zips, that's really wasting my time. Just the kodi.log with debug enabled. There's still nothing I can use in there, sorry.

kostaboxon commented 7 years ago

Sorry about that. Hope this will help, Debug enabled. Fresh install again. Quasar only. 01_KODI.log.zip

scakemyer commented 7 years ago

You're installing linux_armv7 while it's detecting the platform as linux_arm64, have you tried that one instead? The first post had other errors which might have prevented installation. And please no more zip files altogether, just logs.

kostaboxon commented 7 years ago

plugin.video.quasar-0.9.42.linux_arm64.zip Differerent error

01_KODI.log.zip

scakemyer commented 7 years ago

Thanks but for the third time stop zipping files :hammer:

kostaboxon commented 7 years ago

Mate i tried with just the kodi log file and the system would not accept the format to upload. I'm using a Mac so that is probably the issue. I use finder and console. I had to ZIP it. Then it worked.

kostaboxon commented 7 years ago

Looking at osarch.py i see the use of xbmc.getCondVisibility and issues associated with its use when detecting platforms in the links below.

The below links may or may not be useful as i am a noob when it comes to code. I'm just trying to help get us on the right course. This 32-bit userspace with a 64-bit kernel OS will be flashed in a lot of boxes due to memory leaks using 64-bit userspace. It is relatively new but it will be the norm in future Amlogic boxes.

http://forum.kodi.tv/showthread.php?tid=219745

http://forum.kodi.tv/showthread.php?tid=125005

heartlogic commented 7 years ago

Hello...

I have tried also to install plugin.video.quasar-0.9.42.linux_arm.zip or plugin.video.quasar-0.9.42.linux_arm64.zip in LibreELEC 32bit and i got the "Binary not found error"...

In LibreELEC 64bit everything works just fine... Please tell me if you need additional logs for this issue...

I too agree that 32bit LibreELEC will be used more in the future due to memory leaks in 64bit installations...

paulsmid commented 7 years ago

Hi I have the same issue on my Wetek Hub where I installed on SD Libreelec 7 but also tries the 7.9 build. All same error: unable to find binary after install Quasar. I tries all the different Linux versions of Quasar.

paulsmid commented 7 years ago

Ok, maybe other question, which version Quasar OS do I need to install for LibreELEC?? Thanks!

heartlogic commented 7 years ago

Hello...

Do we have anything new on this issue? :-)

I tried yesterday to watch a movie and Kodi froze 2 times :-(

Of course this not Quasar's fault at all... It is the LibreELEC 64 bit version along with Kodi which has memory leaks... 32 bit versions are more stable but i cannot use them without Quasar, it is a must have add-on for me...

Thank you in advance for all your help and efforts in this project...

kostaboxon commented 7 years ago

@scakemyer I received a solution from the Dev of LE 64Bit 32Bit userspace builds regarding a fix for the detection , Quote "If they detect platform by running platform.machine() in Python this will be solved. I made Spotify for Kodi work that way."

scakemyer commented 7 years ago

See anything familiar in here? I'm open to a more detailed suggestion ;)

paulsmid commented 7 years ago

That would be great. If you have more details for the help, please. Thank you!!

Paul

On 6 jan. 2017 18:50 +0100, scakemyer notifications@github.com, wrote:

See anything familiar in here (https://github.com/scakemyer/plugin.video.quasar/blob/master/resources/site-packages/quasar/osarch.py#L15-L25)? I'm open to a more detailed suggestion ;)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub (https://github.com/scakemyer/plugin.video.quasar/issues/570#issuecomment-270961263), or mute the thread (https://github.com/notifications/unsubscribe-auth/AXlgMq7SDUC3baMyXFwURZZnKlYRxtIJks5rPn8AgaJpZM4LGBM_).

kostaboxon commented 7 years ago

LibreELEC 7.0.3.012 build for S905/S905X 64Bit 32Bit Userspace Detection FIXED. Changelog: Added a Python hack to improve 32-bit userspace detection in addons using platform.machine() Note: I used Arm7 Linux 0.9.50 Manual Install via zip file.

scakemyer commented 7 years ago

Great, can you share your patch or make a pull request?

kostaboxon commented 7 years ago

Not my Patch. I edited my comment above that it is in the LibreELEC 7.0.3.012 build for S905/S905X It is in the Changelog for this brand new version. I only made the issue a bug on previous versions of LibreELEC and the detection issues using 32bit userspace. The Developer added the hack after what you replied with regarding your osarch.py. I hope this clears up my involvement. Thanks again. See https://github.com/kszaq/LibreELEC.tv/tree/7.0.3.012

scakemyer commented 7 years ago

Ha, that is clever, kind of a good way to force all third-party add-ons to detect the right platform without every one of them having to implement workarounds...

heartlogic commented 7 years ago

I confirm that Quasar works alright with 32bit version of LibreELEC...