Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pair and settings not working on RPi & ArchARM #113

Closed
Roboron3042 opened this issue Dec 15, 2016 · 17 comments
Closed

Pair and settings not working on RPi & ArchARM #113

Roboron3042 opened this issue Dec 15, 2016 · 17 comments

Comments

@Roboron3042
Copy link

  • Luna Version: 0.7.0-rc2
  • nVidia GeForce Experience Version: 3.2.0.96
  • Moonlight Embedded Version: 2.2.2
  • OSMC Version: 16.1

Expected Behaviour: The settings, pair host and game list work within Luna.

Actual Behaviour: Only system sound settings and map controller works.

I'm trying to use Luma on a Raspberry Pi B+ with Arch Linux ARM and Kodi Jarvis 16.1. Howewer, while I can use moonlight and pair with no problems, that doesn't work in Luna. I can enter Luna and select pairing, but nothing happens. Not even a error, anything. When i select settings, settings window opens, but it doesn't work, and i can only exit that setting window exiting Kodi.

Since i am not a deb user, I installed m2crypto using pacman -S python2-m2crypto (could it be the problem? I don't think so, since both use the same source). But for the rest of dependecies I used pip.

Also, pairing the host before entering Luna has no effect. No host or games list are displayed. And i can change the settings of Luna from Kodi menu.

I have trying re-installing erasing the data. The last reinstall i test all the functions and saw the log (you can see full log here), I found this error (not notified in Kodi):

22:25:48 T:2809389968 NOTICE: [script.luna.core]: Category added: Experimental
22:25:48 T:2809389968 WARNING: CSkinInfo: failed to load skin settings
22:25:49 T:2809389968 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.AttributeError'>
Error Contents: 'NoneType' object has no attribute 'getId'
Traceback (most recent call last):
File "/home/roberpi/.kodi/addons/script.luna/resources/lib/views/settings.py", line 45, in onInit
self.build_list()
File "/home/roberpi/.kodi/addons/script.luna/resources/lib/views/settings.py", line 65, in build_list
self.build_settings_list(category, category.settings)
File "/home/roberpi/.kodi/addons/script.luna/resources/lib/views/settings.py", line 140, in build_settings_list
current_control.append_enable_condition(target_control, target_value)
File "/home/roberpi/.kodi/addons/script.luna/resources/lib/model/kodi_gui_workarounds/settinggroup.py", line 98, in append_enable_condition
self.enable_target_controls[condition_control.getId()] = condition_control
AttributeError: 'NoneType' object has no attribute 'getId'
-->End of Python script error report<--
22:25:53 T:2809389968 ERROR: EXCEPTION: Non-Existent Control 0
22:27:00 T:3022213120 ERROR: Previous line repeats 25 times.

@wackerl91
Copy link
Owner

Heya @Roboron3042,

that's a pretty detailed description of things going wrong, and I'd like to explain some of the behaviour you're seeing.

Also, pairing the host before entering Luna has no effect. No host or games list are displayed. And i can change the settings of Luna from Kodi menu.

That's because of two reasons: I have to put the keys into different directories based on the host ID to enable the multi-host support. By default, moonlight-embedded places all keys into .cache/moonlight while Luna is looking for sub-dirs.
Additionally the host information is stored in Luna's storage dir (usually .kodi/userdata/addon_data/script.luna/.storage) which is read upon starting the add-on, so you have to pair from within Luna to get hosts to actually show up.

I can enter Luna and select pairing, but nothing happens. Not even a error, anything.

Could you please post a log from when attempting to do that? Since you installed all of the other dependencies the internal pairing should be used, but if this fails (e.g. due to import errors) it will always fall back to using moonlight's binary, which may simply be at another location in your case.

When i select settings, settings window opens, but it doesn't work, and i can only exit that setting window exiting Kodi.

I've removed a setting which has been the "root" for a condition of other settings, obviously without removing the conditions as well - which is why it's still expected in the settings (the fact that you can change the settings from Kodi's menu is simply due to the fact that Luna's settings are using a custom window instead of the built-in settings window). Either ignore them for now and access them from the Kodi menu or edit Luna's settings.xml and remove the enable conditions for enabled_omdb, enable_tgdb and enable_igdb.

@heydude1337
Copy link

heydude1337 commented Dec 18, 2016

Same behavior as the OP with osmc and RC2 on my rpi3. The add host button does nothing. The settings button shows the settings menu. However none of the items is highlighted yellow, so I can't navigate. Even the back button doesn't bring me back to the menu. I have to restart kodi after opening the settings menu.

Logs:
After starting Luna:

16:06:58 1829395.625000 T:1750373360 DEBUG: Skin Widgets: Total time needed to request recommended queries: 0:00:00.129194
16:06:58 1829395.625000 T:1750373360 DEBUG: RunQuery took 1 ms for 0 items query: select * from movie_view WHERE ((movie_view.playCount IS NULL OR movie_view.playCount = 0))
16:06:58 1829395.625000 T:1750373360 DEBUG: RunQuery took 1 ms for 0 items query: select * from episode_view WHERE ((episode_view.playCount IS NULL OR episode_view.playCount < 1))
16:06:58 1829395.625000 T:1750373360 DEBUG: RunQuery took 1 ms for 0 items query: select * from musicvideo_view
16:06:58 1829395.625000 T:1750373360 DEBUG: GetAlbumsByWhere query: SELECT albumview., albumartistview. FROM albumview LEFT JOIN albumartistview on albumartistview.idalbum = albumview.idalbum WHERE albumview.strReleaseType = 'album'
16:06:58 1829395.625000 T:1750373360 DEBUG: GetAlbumsByWhere - query took 22 ms
16:06:58 1829395.750000 T:1750373360 DEBUG: Skin Widgets: Total time needed to request recent items queries: 0:00:00.121705
16:06:58 1829395.750000 T:1750373360 DEBUG: Skin Widgets: Total time needed for all queries: 0:00:05.433242
16:07:01 1829398.500000 T:1420817392 DEBUG: CFavourites::Load - no system favourites found, skipping
16:07:01 1829398.500000 T:1420817392 DEBUG: RunQuery took 1 ms for 0 items query: select * from movie_view JOIN sets ON movie_view.idSet = sets.idSet ORDER BY sets.idSet

After selecting +Host:

16:08:34 1829491.375000 T:1792578544 DEBUG: script.module.osmcsetting.updates : - blurp 41 - /home/osmc/.kodi/addons/script.luna/resources/skins/Default/720p/main$
16:09:15 1829532.750000 T:1853838320 DEBUG: PushCecKeypress - received key a9 duration 0 (rep:0 size:0)
16:09:15 1829532.750000 T:1853838320 DEBUG: PushCecKeypress - added key a9
16:09:15 1829532.750000 T:1956381616 DEBUG: OnKey: 169 (0xa9) pressed, action is Left
16:09:15 1829532.875000 T:1853838320 DEBUG: PushCecKeypress - received key a9 duration 166 (rep:0 size:0)
16:09:15 1829532.875000 T:1853838320 DEBUG: PushCecKeypress - ignored key a9
16:09:16 1829533.750000 T:1853838320 DEBUG: PushCecKeypress - received key a8 duration 0 (rep:0 size:0)
16:09:16 1829533.750000 T:1853838320 DEBUG: PushCecKeypress - added key a8
16:09:16 1829533.750000 T:1956381616 DEBUG: OnKey: 168 (0xa8) pressed, action is Right
16:09:16 1829533.875000 T:1853838320 DEBUG: PushCecKeypress - received key a8 duration 167 (rep:0 size:0)
16:09:16 1829533.875000 T:1853838320 DEBUG: PushCecKeypress - ignored key a8
16:09:17 1829534.625000 T:1853838320 DEBUG: PushCecKeypress - received key b duration 0 (rep:0 size:0)
16:09:17 1829534.625000 T:1853838320 DEBUG: PushCecKeypress - added key b
16:09:17 1829534.625000 T:1956381616 DEBUG: OnKey: 11 (0x0b) pressed, action is Select
16:09:17 1829534.750000 T:1853838320 DEBUG: PushCecKeypress - received key b duration 215 (rep:0 size:0)
16:09:17 1829534.750000 T:1853838320 DEBUG: PushCecKeypress - ignored key b<

After pressing settings menu:

16:10:41 1829619.125000 T:1853838320 DEBUG: PushCecKeypress - received key b duration 0 (rep:0 size:0)
16:10:41 1829619.125000 T:1853838320 DEBUG: PushCecKeypress - added key b
16:10:41 1829619.125000 T:1956381616 DEBUG: OnKey: 11 (0x0b) pressed, action is Select
16:10:41 1829619.125000 T:1429206000 DEBUG: LocalizeStrings: no translation available in currently set gui language, at path /home/osmc/.kodi/addons/script.luna/resources/language/English (US)
16:10:41 1829619.125000 T:1429206000 DEBUG: LocalizeStrings: no strings.po file exist at /home/osmc/.kodi/addons/script.luna/resources/language/English, fallback to strings.xml
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Streaming -> Framerate
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Streaming -> Selected Audio Device
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Streaming -> Enable Surround Sound
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Streaming -> Override Default Resolution
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Streaming -> Resolution
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Streaming -> Enable Custom Resolution
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Streaming -> Horizontal Resolution
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Streaming -> Vertical Resolution
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Category added: Streaming
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Input -> Enable Custom Input
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Category added: Input
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Advanced -> Enable Custom Bitrate
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Advanced -> Bitrate (Mbps)
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Advanced -> Packetsize (bytes)
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Advanced -> Enable Remote Connection Opimizations
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Advanced -> Enable GFE Graphics Optimization
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Advanced -> Play Audio on Host
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Advanced -> Enable Pre-Release Updates
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Advanced -> Enable Moonlight Debug Output
16:10:41 1829619.125000 T:1429206000 NOTICE: [script.luna.core]: Category added: Advanced
16:10:41 1829619.250000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Scraper -> Enable OMDB as Game Information Provider
16:10:41 1829619.250000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Scraper -> Enable TheGamesDB as Game Information Provider
16:10:41 1829619.250000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Scraper -> Enable IGDB as Game Information Provider
16:10:41 1829619.250000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Scraper -> Select API Key File
16:10:41 1829619.250000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Scraper -> Clear Game Cache
16:10:41 1829619.250000 T:1429206000 NOTICE: [script.luna.core]: Category added: Scraper
16:10:41 1829619.250000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Init Scripts -> Enable pre / post scripts
16:10:41 1829619.250000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Init Scripts -> Pre Script
16:10:41 1829619.250000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Init Scripts -> Post Script
16:10:41 1829619.250000 T:1429206000 NOTICE: [script.luna.core]: Category added: Init Scripts
16:10:41 1829619.250000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Experimental -> Enable Luna Widget
16:10:41 1829619.250000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Experimental -> Force Enable Fanart (Movies and Luna)
16:10:41 1829619.250000 T:1429206000 NOTICE: [script.luna.core]: Setting added: Experimental -> Enable Luna Widget
16:10:41 1829619.250000 T:1429206000 NOTICE: [script.luna.core]: Category added: Experimental
16:10:41 1829619.250000 T:1429206000 WARNING: CSkinInfo: failed to load skin settings
16:10:41 1829619.250000 T:1956381616 DEBUG: ------ Window Init (/home/osmc/.kodi/addons/script.luna/resources/skins/Default/720p/settings.xml) ------
16:10:41 1829619.250000 T:1956381616 INFO: Loading skin file: /home/osmc/.kodi/addons/script.luna/resources/skins/Default/720p/settings.xml, load type: LOAD_ON_GUI_INIT
16:10:41 1829619.250000 T:1956381616 DEBUG: CGUIMediaWindow::GetDirectory ()
16:10:41 1829619.250000 T:1956381616 DEBUG: ParentPath = []
16:10:41 1829619.375000 T:1853838320 DEBUG: PushCecKeypress - received key b duration 167 (rep:0 size:0)
16:10:41 1829619.375000 T:1853838320 DEBUG: PushCecKeypress - ignored key b
16:10:42 1829620.250000 T:1429206000 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.AttributeError'>
Error Contents: 'NoneType' object has no attribute 'getId'
Traceback (most recent call last):
File "/home/osmc/.kodi/addons/script.luna/resources/lib/views/settings.py", line 45, in onInit
self.build_list()
File "/home/osmc/.kodi/addons/script.luna/resources/lib/views/settings.py", line 65, in build_list
self.build_settings_list(category, category.settings)
File "/home/osmc/.kodi/addons/script.luna/resources/lib/views/settings.py", line 140, in build_settings_list
current_control.append_enable_condition(target_control, target_value)
File "/home/osmc/.kodi/addons/script.luna/resources/lib/model/kodi_gui_workarounds/settinggroup.py", line 98, in append_enable_condition
self.enable_target_controls[condition_control.getId()] = condition_control
AttributeError: 'NoneType' object has no attribute 'getId'
-->End of Python script error report<--
<

@knives49
Copy link

knives49 commented Dec 18, 2016

Luna Version: 0.7.0-rc2
nVidia GeForce Experience Version: 3.2.0.96
Moonlight Embedded Version: 2.2.2
OSMC Version: VERSION_ID="2016.11-1" up to date

same here, luna 0.6.3 works fine, pair and option.
where is the log for luna ?

@wackerl91
Copy link
Owner

@heydude1337

When i select settings, settings window opens, but it doesn't work, and i can only exit that setting window exiting Kodi.

As I've said above:

Either ignore them for now and access them from the Kodi menu or edit Luna's settings.xml and remove the enable conditions for enabled_omdb, enable_tgdb and enable_igdb.

I'm sorry to say that, but the other two log snippets (after starting and after click the Add Host button) do not help as they don't contain a single log entry produced by Luna (the only reference is the XML being loaded for the main menu, and that's logged by Kodi).

Generally, enabling Kodi's debug mode when posting logs for Luna does nothing other than spam the log file with Kodi's messages - Luna has no debug level logs right now. If you disable the debug mode and start up / click the add host button, there should be something in the log which should give me a clue about what's wrong (might be simple stuff, e.g. which pairing manager is loaded, if zeroconf is supposed to be used, ...).
Without having a complete log from Luna (it starts with Bootstrapping DI ... and is always prefixed with [script.luna.X]:, where X is the name of the module) the only thing I can tell you right now is that the pairing is working for me but not for you ... which doesn't really help anyone :/
Before I released RC2 (RC1 had some issues with storage folder creation) I did a clean re-install of Luna myself (as in cleaning any leftover files) which also required me to re-pair my two hosts. Both worked fine, so I'm a bit baffled that it's obviously not working for you guys, but then again I got no idea why that might be the case (especially since I know that it is working for others as well).

@knives49
Luna's log is part of Kodi's log and - as I've said above - accordingly prefixed. You should be able to find the log at /home/osmc/.kodi/temp/kodi.log in your case.

You can copy the log to pastebin and simply paste the link here, that always adds to the readability of an issue :)

Thank you both for confirming the issues itself and that they do exist on OSMC as well!

@heydude1337
Copy link

heydude1337 commented Dec 18, 2016

I did a clean re-install of Luna myself (as in cleaning any leftover files) which also required me to re-pair my two hosts. Both worked fine, so I'm a bit baffled that it's obviously not working for you guys, but then again I got no idea why that might be the case (especially since I know that it is working for others as well)

I did a clean install, I uninstalled luna from within kodi and then removed the script.luna directory in de user_data/addons folder. Is there something else to remove maybe?

Don't have much time now (and back on the alpha version). I ll try to get a better log entry this week.

@knives49
Copy link

knives49 commented Dec 18, 2016

this is my log, when update luna to the end.

http://pastebin.com/S9YTqvSV

@wackerl91
Copy link
Owner

@knives49
Thanks for the log. If I'm not mistaken, you had to start the add-on twice, right?
The first attempt was line 1 to 84 in those logs, where literally nothing should have happened (that's a DI issue, should be unrelated to what you're seeing now).
And the second time you clicked the "Settings" button. Again, I do know why you can't open the settings and I've said so since me very first reply to the OP. Did you also press the "Add Host" button? Because that's the part I'm really interested in. From the logs I can tell that in your case an IP input field should show up (that's determined at startup, not when the button is actually pressed) which is called using the Kodi API. That shouldn't fail unless you're using a beta skin as well...

@knives49
Copy link

knives49 commented Dec 18, 2016

yes, the first start, I had an error message.
the second time, luna start well.
I press the add host 4 time but nothing happen, just the sound of the selection, nothing else...
after, I go to the settings and locked here, I must restart kodi.

@wackerl91
Copy link
Owner

Thanks for clarifying that! Kinda strange that the selection sound played ...
Can you also tell me which skin you're using right now? (If your immediate answer would be "How would I know?" it's likely the default skin ;) )
I suspect that either one of my method calls is absolutely bonkers or it's a a strange interaction with some skins. I'd just love to try and reproduce this under the exact same conditions as you're trying to use it :)

@knives49
Copy link

aeon nox, but the default skin have the same bug.
For information before update Luna yesterday, I update osmc with sudo apt-get update and sudo apt-get dist-upgrade

@wackerl91
Copy link
Owner

The next RC (will probably be released sometime tonight) should resolve both the mentioned problems. If it doesn't please let me know by reopening this issue.

@Roboron3042
Since you're using ALARM, you'll have to change the launch scripts according to your installation (service name for Kodi, binary path, ...), otherwise they will just fail (most likely silently).
Possible solutions for this have been discussed in #61, but there hasn't been feedback to my latest proposals.

@heydude1337
Copy link

heydude1337 commented Dec 23, 2016

Performed a clean install of osmc (new SD card). Downloaded the RC3 zip and installed. Installation is ok, but the +host button is still not working for me. Here is the log:

http://pastebin.com/DfiW0TGE

@knives49
Copy link

knives49 commented Dec 23, 2016

can you enter an IP address ?
if yes, this is another bug.
I report this bug here and it is already debug :)
#117
Just wait for a RC4

@wackerl91
Copy link
Owner

wackerl91 commented Dec 23, 2016

This log looks like Luna didn't even start properly (or at least shouldn't). The router component died while building its cache, so pretty much no button should work in a case like this.
Please try again, if the addon is starting up properly all the buttons should work (I.e. if there's no error in the log before you reach the main menu).
Still the log might be helpful in finding out why the DI crashes on some occasions (especially after new installations when all the files aren't cached yet) - I've already tried to build around this behavior, but that stuff is really hard to debug.

@heydude1337
Can you please send me the entire log of that try (i.e. what happened before 15:25:22, during the bootstrap)? The error in this log (while unrelated to the title of this issue) is probably just a symptom of something else.
It looks like a service got "partially" initialised: whenever a service is requested, the DI is looking for all of the parameters which are services as well and gets them from the container, replacing their name on the feature definition with the actual object - this happens one-by-one. Usually that's fine because all services can be properly instantiated and the "parent" instance is obviously cached, so the part where the dependencies get resolved is never touched twice for the same service. That is unless something bad has happened before, which causes the arguments of the parent to be only partially replaced, which again causes the parent to not get instantiated at all, thus causing the DI to resolve its dependencies again when it's requested.
Of course I could just check if we got an object already, but this would just mask the real problem and provide no real benefit whatsoever.

@wackerl91
Copy link
Owner

@knives49
You're really fast :D
His issue is a different one right now though, which should be resolved by just restarting the addon. He might run into the one you discovered later on :)

I hope I can get RC4 out today. Need to debug some of the views first :-/

@heydude1337
Copy link

heydude1337 commented Dec 23, 2016

here is the entire log

http://pastebin.com/9XED0Zdv

edit: moonlight is not properly working need to fix that first I guess.

@wackerl91
Copy link
Owner

wackerl91 commented Dec 23, 2016

Thank you so much!

And there's your real problem:
raise ValueError('Moonlight binary could not be found.')

Since I'm still somewhat expecting that Luna is installed on OSMC only, the binary locations are currently hardcoded here:
'/usr/bin/moonlight', '/usr/local/bin/moonlight'

You'll need to edit that file on your own and add the path to your actual location (though I'd wait until RC4 is out, otherwise your change will be overwritten again).

I'll take not of that issue however, since letting the entire addon crash only because the binary could not be found is ... well, not something one should do. In general, I'm looking into broadening the supported systems, but such things take time.

Right now you'll sadly need to help yourself - same with the launch scripts I mentioned earlier. That's kinda the price you pay for running ALARM instead of OSMC (which - don't get me wrong - is a good thing, but it's way more 'hands-on'), at least at the moment.

Just realised that you stated you installed OSMC this time (sorry, I really shouldn't do two things at once). The underlying issue remains, the moonlight binary isn't found. If it is somewhere else than the paths specified above, you'd still need to move either the binary or append the actual location to the list linked above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants