add-ons / plugin.video.vrt.nu

Kodi add-on to watch content from VRT MAX
https://www.facebook.com/groups/kodivlaanderen
GNU General Public License v3.0
111 stars 20 forks source link

Crash after launch when using nakamori repo #664

Closed Undeadhunter closed 4 years ago

Undeadhunter commented 4 years ago

Describe the bug

When opening the plugin it crashes right away

To Reproduce

Steps to reproduce the behavior: Open Plugin

Expected behavior

Main menu appears

Additional context

Log (if available)

2020-01-04 09:57:51.453 T:139870114645760   ERROR: GetDirectory - Error getting plugin://plugin.video.vrt.nu/
2020-01-04 09:57:51.457 T:139871220858176   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.vrt.nu/) failed
2020-01-04 10:00:16.358 T:139870684141312  NOTICE: PulseAudio: Opened device Default in pcm mode with Buffersize 150 ms
2020-01-04 10:00:19.060 T:139870148216576  NOTICE: [plugin.video.vrt.nu] Access: plugin://plugin.video.vrt.nu/
2020-01-04 10:00:19.110 T:139870148216576   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: 'Plugin' object has no attribute 'path'
                                            Traceback (most recent call last):
                                              File "/home/kodi/.kodi/addons/plugin.video.vrt.nu/resources/lib/addon_entry.py", line 14, in <module>
                                                run(argv)
                                              File "/home/kodi/.kodi/addons/plugin.video.vrt.nu/resources/lib/addon.py", line 298, in run
                                                plugin.run(argv)
                                              File "/home/kodi/.kodi/addons/script.module.routing/lib/routing.py", line 175, in run
                                                self._dispatch(path)
                                              File "/home/kodi/.kodi/addons/script.module.routing/lib/routing.py", line 134, in _dispatch
                                                view_func()
                                              File "/home/kodi/.kodi/addons/plugin.video.vrt.nu/resources/lib/addon.py", line 23, in main_menu
                                                VRTPlayer().show_main_menu()
                                              File "/home/kodi/.kodi/addons/plugin.video.vrt.nu/resources/lib/vrtplayer.py", line 78, in show_main_menu
                                                show_listing(main_items, cache=False)  # No category
                                              File "/home/kodi/.kodi/addons/plugin.video.vrt.nu/resources/lib/kodiutils.py", line 129, in show_listing
                                                set_property('container.url', 'plugin://' + addon_id() + plugin.path)
                                            AttributeError: 'Plugin' object has no attribute 'path'
                                            -->End of Python script error report<--
2020-01-04 10:00:19.177 T:139869753845504   ERROR: GetDirectory - Error getting plugin://plugin.video.vrt.nu/
2020-01-04 10:00:19.194 T:139871220858176   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.vrt.nu/) failed
dagwieers commented 4 years ago

The cause for this problem appears to be an older script.module.routing add-on. For some reason you do not have the latest version (v0.2.3) installed. Even though it is a dependency for the VRT NU add-on.

~Maybe your Linux has a different version installed using pip that is being used instead? I can tell from PyPI that it appears there is another package called routing that could interfere with proper operation.~

Update: From the logs it seems to be using the Kodi library, so maybe you need to force update the script.module.routing add-on in Kodi because somehow you have older files in your tree. (Did you somehow transfer/migrate/restore files from another system?)

dagwieers commented 4 years ago

BTW there is a known issue in Kodi where it doesn't pick up newly installed libraries, maybe this also affects updated libraries. Restarting Kodi or rebooting the system usually fixes this issue?

Undeadhunter commented 4 years ago

Manually updated script.module.routing and it fixed the issue.

Strange it didn't update by itself.

dagwieers commented 4 years ago

Thanks for reporting back !

Manually installed add-ons tend to have auto-update disabled in Kodi (not sure if this is still the case). This might be the cause. But it is weird still that our add-on installed/updated successfully while it depends on script.module.routing v0.2.3 explicitly.

Undeadhunter commented 4 years ago

Righto, update on the issue. Module Routing 0.2.4 breaks VRT.Nu addon. As soon as it updates to 0.2.4 it will start causing issues, downgrade to 0.2.3 => Works!

dagwieers commented 4 years ago

There is no script.module.routing v0.2.4. The latest version is v0.2.3.

Undeadhunter commented 4 years ago

Strange! Looking where it's coming from since I get an update notice for the addon...

Edit: Found the source, was another addon repo that had forked the original and bumped the release, however it is causing issues with vrt.nu addon. Disabled auto updated and let the fork owner know.

dagwieers commented 4 years ago

This explains the original report much better :smile:. They probably had an issue with v0.2.3 and re-released v0.2.2 (without path support) as v0.2.4 for their own purpose. Best way to make a bad situation blow up later...

Can you send me the name/source of the add-on repository? You can do this by e-mail or via our facebook page if you like. I tried looking for such a release but Google was of no help.

Thanks for reporting back !

Undeadhunter commented 4 years ago

https://github.com/bigretromike/kodi-plugin-routing

dagwieers commented 4 years ago

Alright, I found the package in https://shokunin.monogatari.pl/repo/script.module.routing/ as part of the Kodi nakamori repository.

I started a conversation here: https://github.com/bigretromike/kodi-plugin-routing/commit/c76ea4bf7732d57c4b6377128b60d48df00303c1#comments

@bigretromike is a very active kodi developer who has helped us in the past with our add-on. so this is good news.

Update: I am going to reopen until this is fixed, as we got a second incident reported.

da3dsoul commented 4 years ago

My bad. That's an issue with two things that I wasn't aware of.

  1. if path is not defined, it usually follows a system path, breaking lots of things.
  2. Python inheritance is a bitch. The long version is that to reference path of a parent when an object is extended requires more effort than any sane language.

I thought I did things in such a way that it wouldn't break anything

dagwieers commented 4 years ago

I thought I did things in such a way that it wouldn't break anything

No worries, but releasing a newer version for an existing add-on is akin to break at some point (say, upstream release v0.3.0 without your needed changes), and it makes support problematic (i.e. when upstream also releases a v0.2.4 version).

dagwieers commented 4 years ago

@da3dsoul @bigretromike I haven't seen any updates yet. What is holding up a new fixed release?

da3dsoul commented 4 years ago

Working on it. I think I've almost got it. It's also only been 2 days (since I heard about it) on an issue that's likely been around for a good year now.

dagwieers commented 4 years ago

It's also only been 2 days (since I heard about it) on an issue that's likely been around for a good year now.

The issue was introduced when we released a new version of VRT NU last week that uses this new path functionality. The new version was developed for 4 months, but none of the testers were using the nakamori repo. Some of our users do. https://shokunin.monogatari.pl/repo/script.module.routing/

da3dsoul commented 4 years ago

I see. I was wondering why I didn't hear about it until now. I have a user testing for me, as I know nothing about this add-on. I think I fixed it. I'll release when I have a verification that it works.

da3dsoul commented 4 years ago

Okay should be good now

bigretromike commented 4 years ago

@Undeadhunter could you please check with latest routing-forked version, that is 0.2.4.2 from nakamori repo?

da3dsoul commented 4 years ago

He already did. I've been in contact

bigretromike commented 4 years ago

repository is updated. @Undeadhunter said he will check later but its same version that was provided and tested before so this shouldn't be an issue anymore

dagwieers commented 4 years ago

I will wait for feedback from @Undeadhunter before closing this issue. Thanks everyone! :1st_place_medal:

dagwieers commented 4 years ago

@Undeadhunter Can you confirm this is now fixed?

Undeadhunter commented 4 years ago

Confirmed working, was too busy till this morning