kodi-pvr / pvr.hdhomerun

Kodi's HDHomeRun client addon
GNU General Public License v2.0
20 stars 24 forks source link

PVR: HDHomeRum #126

Closed cheffdoggy closed 2 years ago

cheffdoggy commented 2 years ago

Kodi 19 PVR HDHomeRun add on couldn't be loaded. An unknownd erro has occurred

UpdateAddons: Failed to create add-on PVR HDHomeRun Client, status = 5

Fire TV - 2nd Gen (2015) | AFTS | Android Level 22 (Android 5.1) | Fire OS 5

phunkyfish commented 2 years ago

Full debug log please.

cheffdoggy commented 2 years ago

don't worry about the other error. main issue is the PVR HDhomerum from kodi repo. I try the other that requires a subscription to hdhomerum which I don't have so I wasn't getting the guide list.

phunkyfish commented 2 years ago

That’s not a debug log I’m afraid. Also can you use a paste site? Otherwise the issue gets cluttered with log entries.

e.g. https://kodi.wiki/view/Log_file/Easy

cheffdoggy commented 2 years ago

Sorry.

https://paste.kodi.tv/ivowapaxes.kodi

phunkyfish commented 2 years ago

First please remove all the banned addons (the ones in orange on the paste site) and also remove the other hdhomerun addon.

Then produce another full debug log so we can see the wood from the trees. If I had to hazard a guess maybe you have install an addon for the wrong platform, an addon source zip (not compiled) or an addon for another version of kodi.

cheffdoggy commented 2 years ago

This was an upgrade from 18.9 to 19.3 just see if it would work since it worked on 18.9

Fire TV - 2nd Gen (2015) AFTS Android Level 22 (Android 5.1) Fire OS 5 Fresh install of Kodi 18.9 Steps followed settings add-ons select Kodi Add-on repository PVR client PVR HDHomeRun Client Install add-on client installed https://paste.kodi.tv/jadebuqoxa.kodi

Fresh install of Kodi 19.3 Steps followed settings add-ons select Kodi Add-on repository PVR client PVR HDHomeRun Client Install add-on client installed, followed by Add-on couldn't be loaded. An unknown error has occurred https://paste.kodi.tv/epajuwukoq.kodi

cheffdoggy commented 2 years ago

Sorry all of the log for 18.9 didn't copy over so here it is https://paste.kodi.tv/buxaqijigi.kodi

fuzzard commented 2 years ago

at a glance, looks like libhdhomerun is using getifaddrs, which isnt available in android until NDK 24.

Change was https://github.com/kodi-pvr/pvr.hdhomerun/commit/e168238349c034eec9fcbc24edf1b613b2f99270#diff-20d276b9dd21ba657efd828c56b55d21a90dafb0bd5749c5e2c46f4bd95d319d which includes https://github.com/Silicondust/libhdhomerun/commit/d2de03dc0f3520cbdc18be19b666a6bf55970994 in libhdhomerun

Not sure of an easy way to handle it globally. Could try build with -DLIBHDHOMERUN_USE_SIOCGIFCONF and fall back to the old behaviour for all android clients i guess.

cheffdoggy commented 2 years ago

Any help would be appreciated. Would like to upgrade to 19 but no TV wife will be pissed

phunkyfish commented 2 years ago

@fuzzard which NDK are we using currently?

EDIT: nevermind. 24 not out yet.

@djp952 is this something you can look into? Looks like all Android users will broken by this change.

fuzzard commented 2 years ago

Sorry, my terminology is probably wrong with Android, always get it confused.

Kodi supported SDK 21+. The libhdhomerun getifaddrs usage requires 24+, but it's compiletime, not runtime testing. There's a define to use the legacy codepath that doesn't need SDK 24+. Without a bunch of patching, probably just best to set that define and call it a day

djp952 commented 2 years ago

I agree that setting -DLIBHDHOMERUN_USE_SIOCGIFCONF is likely the best way to go. I ran into the same problem when I updated to the libhdhomerun version 20190625 (or later) for my Android builds. No runtime problems using the legacy path on Android at all.

cheffdoggy commented 2 years ago

Thanks guys for taking your time to look into this for me.

phunkyfish commented 2 years ago

I agree that setting -DLIBHDHOMERUN_USE_SIOCGIFCONF is likely the best way to go. I ran into the same problem when I updated to the libhdhomerun version 20190625 (or later) for my Android builds. No runtime problems using the legacy path on Android at all.

Where did you add it? Got a reference commit?

djp952 commented 2 years ago

I do: https://github.com/djp952/pvr.hdhomerundvr/commit/09e17cb53b31e846bc1c8099204f10f99c4588fb#diff-8d88eb632967032ab70dc52ece6ec958fb13d818e22d3513130ae177993b2fd7

"Fix incompatibility with libhdhomerun 20190607 and legacy Android NDK"

I don't use cmake for my projects, though, no idea where you would add that and make it only apply to Android's LOCAL_CFLAGS. My Android.mk is static and I call ndk_build manually via an msbuild task on Windows.

fuzzard commented 2 years ago

https://github.com/kodi-pvr/pvr.hdhomerun/blob/7edf4161b3ded5c1fd017cf20003b4279996897b/depends/common/hdhomerun/CMakeLists.txt#L41

You would add a definition like above. However this is in an if msvc block, you would want to add a new block checking if build is for Android, then adding the definition

phunkyfish commented 2 years ago

Would that just be if(ANDROID)?

fuzzard commented 2 years ago

Tbh I don't know, but I doubt it. Might need to rope Alwin in for advice. I just don't know the add-on cmake system at all.

At a worst case, you could just copy the common libhdhomerun dependency into an android specific one, strip the msvc/apple checks and just add the definition. But that sounds heavy handed. I'm sure there will be some way to know the build platform

phunkyfish commented 2 years ago

I can dig about a bit and see him what I can figure out.

fuzzard commented 2 years ago

https://github.com/xbmc/xbmc/blob/a80d1293b0579bbed7dd7d20304ba34a20519f78/xbmc/addons/kodi-dev-kit/cmake/test/abi-interface-test.cmake#L20

Looks like that may be doable from an add-on build

phunkyfish commented 2 years ago

@cheffdoggy can you test with a testbuild from here: https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.hdhomerun/detail/PR-127/2/artifacts

Hopefully it works

cheffdoggy commented 2 years ago

Fresh install of Kodi 19.3 Steps followed settings add-ons install from zip file pvr.hdhomerun-19.0.1.zip add-on client installed, followed by Add-on couldn't be loaded. An unknown error has occurred https://paste.kodi.tv/italaraqeg.kodi

phunkyfish commented 2 years ago

Looks like the same:

ERROR <general>: Unable to load /data/data/org.xbmc.kodi/cache/lib/libpvr.hdhomerun.so, reason: dlopen failed: cannot locate symbol "getifaddrs" referenced by "libpvr.hdhomerun.so"...
ERROR <general>: IAddonInstanceHandler::CreateInstance: pvr.hdhomerun returned bad status "Permanent failure" during instance creation
ERROR <general>: UpdateAddons: Failed to create add-on PVR HDHomeRun Client, status = 5

Maybe it needs the define in both places. I will try again tomorrow.

cheffdoggy commented 2 years ago

Thank you and everyone else for your help.

phunkyfish commented 2 years ago

Ok, please try: https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.hdhomerun/detail/PR-127/3/artifacts

If that does not work I have a few other options to try.

cheffdoggy commented 2 years ago

Hey so so sorry for the late reply. Crazy Sunday. And way I think we're business. https://paste.kodi.tv/atafonomag.kodi

installed, no errors and all my channels are working with the guide. Thank you so much for your help

phunkyfish commented 2 years ago

Ok, I’ll need you to check one final build.

cheffdoggy commented 2 years ago

ok

phunkyfish commented 2 years ago

Here you go. Please test this build: https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.hdhomerun/detail/PR-127/4/artifacts

Thanks!

cheffdoggy commented 2 years ago

Fresh install of kodi https://paste.kodi.tv/evaculawab.kodi

phunkyfish commented 2 years ago

Fresh install of kodi https://paste.kodi.tv/evaculawab.kodi

So did it work like the previous build?

cheffdoggy commented 2 years ago

Yes it did, I am sorry should of said that.

phunkyfish commented 2 years ago

Brilliant, thanks for testing. Will release it shortly.

cheffdoggy commented 2 years ago

Perfect and thanks again. Should I continue using this one or wait for your release?

phunkyfish commented 2 years ago

Fine to use what you have. Just remember to click update in a couple of days for the addon in a few days to install the repo version again (cause with that you get auto updates).

cheffdoggy commented 2 years ago

I just got the update on my desktop pc. Thank you once again for all your help.

phunkyfish commented 2 years ago

No problem. Happy to help.