webosbrew / webos-homebrew-channel

Unofficial webOS TV homebrew store and root-related tooling
MIT License
862 stars 46 forks source link

Certificate error during download/installation: "certificate has expired" #167

Closed brianeng00 closed 3 months ago

brianeng00 commented 1 year ago

I’m getting an error when trying to install from the Homebrew Channel. It says “An error occurred during installation: request to https://mirrors.kodi.tv/releases/webos/org.xbmc.kodi-webos_21.0~b1.ipk failed, reason: certificate has expired

chronic081086 commented 1 year ago

Got the same error with my C1.

throwaway96 commented 1 year ago

This seems to happen because Node.js uses CA certificates built into its binary by default, and Node.js v8.12.0 (used on webOS 5/6) contains an outdated certificate for the Let's Encrypt CA (ISRG). Newer webOS versions have a newer Node.js version and therefore may not have this issue. (I'm not sure exactly which versions are affected because LG's documentation on the subject appears to contain errors.)

I have a prerelease test build that should fix the problem (on webOS 5+; older versions need a different workaround), although it also has a bunch of other changes that may break things. To install it, you need to manually download/install the IPK and elevate it before rebooting. If you are going to try it, you should probably have the Safe Updater app installed and elevated in case something goes wrong. Testing would be appreciated; let me know how it goes.

In this case, though, you could also just download and install Kodi manually.

Running the following commands on the TV should download and install Kodi:

curl -L -o /tmp/kodi.ipk 'https://mirrors.kodi.tv/releases/webos/org.xbmc.kodi-webos_21.0~b2.ipk'
luna-send-pub -w 10000 -i 'luna://com.webos.appInstallService/dev/install' '{"id":"com.ares.defaultName","ipkUrl":"/tmp/kodi.ipk","subscribe":true}'

This should work both in developer mode and when rooted. You can press control+C after luna-send-pub says the status is installed, or it will terminate automatically after 10 seconds. If for some reason the installation takes longer than 10 seconds (it shouldn't...), you can increase the timeout (10000).

If your system cert store is missing the relevant certificate, you may have to additionally pass -k to curl.

Niketin commented 11 months ago

I am facing the same problem on OLED55C8PLA webOS 4.4.0. I tried to download Kodi like @throwaway96 suggested but it also fails as you can see in the following log.

webOS TV 4.4.0 LGwebOSTV

/ # curl -L -o /tmp/kodi.ipk 'https://mirrors.kodi.tv/releases/webos/org.xbmc.kodi-webos_21.0~b1.ipk'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
/ # Connection closed by foreign host.

The system's older CA certificates seem to affect this too. Workaround is to download it in an insecure way; just add -k to the first command.

After I ran the second command, Kodi installed successfully.

Nikishek commented 11 months ago

Running the following commands on the TV should download and install Kodi:

curl -L -o /tmp/kodi.ipk 'https://mirrors.kodi.tv/releases/webos/org.xbmc.kodi-webos_21.0~b1.ipk'
luna-send-pub -w 10000 -i 'luna://com.webos.appInstallService/dev/install' '{"id":"com.ares.defaultName","ipkUrl":"/tmp/kodi.ipk","subscribe":true}'

This is the working solution for me. Kodi is running, videos are playing but I can't install add-on ("Installation failed"). Internet is working anyway.

When I take a look on log, there is probably badly defined path when installing the addon, for example skin: error <general>: Copy - Failed write to file special://home/addons/packages/skin.confluence-4.7.13.zip error <general>: CAddonInstallJob[skin.confluence]: failed to download special://home/addons/packages/skin.confluence-4.7.13.zip

Real path is /media/developer/apps/usr/palm/applications/org.xbmc.kodi/addons

Maybe update to the newer Kodi?

rapi3 commented 10 months ago

any idea why install it is not working for: LG 55UM7100PLB firmware 05.30.11 webOS v4.9.7 Homebew Channel v 0.6.3 webOS Dev manager v 1.12.1 on linux

luna-send-pub -w 10000 -i 'luna://com.webos.appInstallService/dev/install' '{" id":"com.ares.defaultName","ipkUrl":"/tmp/kodi.ipk","subscribe":true}' {"subscribed":true,"returnValue":true} {"id":"com.ares.defaultName","statusValue":35,"details":{"receivedSize":"0","packageId":"","modifiedTime":"","unpackFileSize":"0","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"ipk parsing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":36,"details":{"receivedSize":"0","packageId":"","modifiedTime":"","unpackFileSize":"0","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"ipk parsing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":37,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"ipk parsing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":262,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"download","state":"ipk parsing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":263,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"download","state":"ipk parsing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":264,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"download","state":"ipk parsing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":32,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"app closing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":33,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"app closing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":34,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"app closing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":11,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"installing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":12,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"installing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":13,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"installing : start","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":24,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"errorCode":-5,"installBasePath":"/media/developer","reason":"FAILED_IPKG_INSTALL","downgrade":true,"paused":false,"simpleStatus":"install","state":"install failed","update":false,"ipkFile":"/tmp/kodi.ipk"}}

throwaway96 commented 10 months ago

@rapi3

Do you have enough space to install it?

joaco05 commented 10 months ago

any idea why install it is not working for: LG 55UM7100PLB firmware 05.30.11 webOS v4.9.7 Homebew Channel v 0.6.3 webOS Dev manager v 1.12.1 on linux

luna-send-pub -w 10000 -i 'luna://com.webos.appInstallService/dev/install' '{" id":"com.ares.defaultName","ipkUrl":"/tmp/kodi.ipk","subscribe":true}' {"subscribed":true,"returnValue":true} {"id":"com.ares.defaultName","statusValue":35,"details":{"receivedSize":"0","packageId":"","modifiedTime":"","unpackFileSize":"0","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"ipk parsing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":36,"details":{"receivedSize":"0","packageId":"","modifiedTime":"","unpackFileSize":"0","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"ipk parsing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":37,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"ipk parsing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":262,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"download","state":"ipk parsing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":263,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"download","state":"ipk parsing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":264,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"download","state":"ipk parsing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":32,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"app closing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":33,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"app closing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":34,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"app closing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":11,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"installing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":12,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"installing","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":13,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"installing : start","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":24,"details":{"receivedSize":"0","packageId":"org.xbmc.kodi","modifiedTime":"","unpackFileSize":"240455691","client":"com.webos.lunasendpub-3143","totalSize":"0","verified":false,"progress":100,"errorCode":-5,"installBasePath":"/media/developer","reason":"FAILED_IPKG_INSTALL","downgrade":true,"paused":false,"simpleStatus":"install","state":"install failed","update":false,"ipkFile":"/tmp/kodi.ipk"}}

same error and i have like 93mb of available space

joaco05 commented 10 months ago

UPDATE: Leaving even more space free worked

throwaway96 commented 10 months ago

Kodi is well over 200 MB.

rapi3 commented 10 months ago

@rapi3

Do you have enough space to install it?

If I check from LG app installed on tv I have ~510Mb free.

I have nothing installed in /media/developer 158MB / 617MB, not sure how I can free more space. image

in /media I have 413MB / 525MB image

rapi3 commented 10 months ago

this is the space used/free: image

romerotsvk commented 10 months ago

I have the same problem. I don't have any application on the TV. I don't know how to make room anymore. I have about 600MB of total memory in the TV. Is there any possibility?

rapi3 commented 9 months ago

I don't think this will be solved so you are better to look for an external device that support fully Kodi like RPI, Android box or x64...

I just wanted to test kodi to access my media files from local LAN, I have to look for another media player, no idea if exist one that can access samba share from LAM for webos...

haganebr commented 9 months ago

I don't think this will be solved so you are better to look for an external device that support fully Kodi like RPI, Android box or x64...

I just wanted to test kodi to access my media files from local LAN, I have to look for another media player, no idea if exist one that can access samba share from LAM for webos...

I had that same problem (-5 Error). What I did was I reset my TV to factory settings and then installed Kodi before anything else. I'm now down to 11MB free on my dev folder but the app store still shows 331MB free, so I'm golden.

Also, I didn't even have to do any of the steps in this issue on WebOS 4.10, I just clicked "Install" on Kodi on the Dev Manager and it simply worked.

dawidteo commented 9 months ago

I don't think this will be solved so you are better to look for an external device that support fully Kodi like RPI, Android box or x64...

I just wanted to test kodi to access my media files from local LAN, I have to look for another media player, no idea if exist one that can access samba share from LAM for webos...

You should try install minidla on NAS but haganebr advice help me to install KODI.

lolreese commented 9 months ago

This seems to happen because Node.js uses CA certificates built into its binary by default, and Node.js v8.12.0 (used on webOS 5/6) contains an outdated certificate for the Let's Encrypt CA (ISRG). Newer webOS versions have a newer Node.js version and therefore may not have this issue. (I'm not sure exactly which versions are affected because LG's documentation on the subject appears to contain errors.)

I have a prerelease test build that should fix the problem (on webOS 5+; older versions need a different workaround), although it also has a bunch of other changes that may break things. To install it, you need to manually download/install the IPK and elevate it before rebooting. If you are going to try it, you should probably have the Safe Updater app installed and elevated in case something goes wrong. Testing would be appreciated; let me know how it goes.

In this case, though, you could also just download and install Kodi manually.

Running the following commands on the TV should download and install Kodi:

curl -L -o /tmp/kodi.ipk 'https://mirrors.kodi.tv/releases/webos/org.xbmc.kodi-webos_21.0~b2.ipk'
luna-send-pub -w 10000 -i 'luna://com.webos.appInstallService/dev/install' '{"id":"com.ares.defaultName","ipkUrl":"/tmp/kodi.ipk","subscribe":true}'

This should work both in developer mode and when rooted. You can press control+C after luna-send-pub says the status is installed, or it will terminate automatically after 10 seconds. If for some reason the installation takes longer than 10 seconds (it shouldn't...), you can increase the timeout (10000).

If your system cert store is missing the relevant certificate, you may have to additionally pass -k to curl.

How exactly do you "Run the commands on the tv"?

New to this trying to get kodi back on my tv. Running into same issue. cert expired

Edit:

think i got it.

got webos dev manager connected to me tv got same issue as rapi3/jaocoa

i reset tv to factory settings. Rooted again. Could not download on homebrew channel.

Connected through webos dev manager again and got the same error pretty sure my tv should have enough space but not sure how to check

lolreese commented 9 months ago

curl -k -o /tmp/kodi.ipk 'https://mirrors.kodi.tv/releases/webos /org.xbmc.kodi-webos_21.0~b2.ipk' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 root@LGwebOSTV:~# luna-send-pub -w 10000 -i 'luna://com.webos.appInstallService/de v/install' '{"id":"com.ares.defaultName","ipkUrl":"/tmp/kodi.ipk","subscribe":true }' {"subscribed":true,"returnValue":true} {"id":"com.ares.defaultName","statusValue":268,"details":{"receivedSize":"0","packageId":"","modifiedTime":"","unpackFileSize":"0","client":"com.webos.lunasendpub-6205","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"permissionLevel":"","simpleStatus":"install","state":"ipk verifying","pkgType":"","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":269,"details":{"receivedSize":"0","packageId":"","modifiedTime":"","unpackFileSize":"0","client":"com.webos.lunasendpub-6205","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"permissionLevel":"","simpleStatus":"install","state":"ipk verifying","pkgType":"","update":false,"ipkFile":"/tmp/kodi.ipk"}} {"id":"com.ares.defaultName","statusValue":24,"details":{"receivedSize":"0","packageId":"","modifiedTime":"","unpackFileSize":"0","client":"com.webos.lunasendpub-6205","totalSize":"0","verified":false,"progress":100,"errorCode":-5,"installBasePath":"/media/developer","reason":"ipk verified failed","downgrade":true,"paused":false,"permissionLevel":"","simpleStatus":"install","state":"install failed","pkgType":"","update":false,"ipkFile":"/tmp/kodi.ipk"}}

lolreese commented 9 months ago

After closing and opening webos devmanager it showed 1/2gb space available

i downloaded kodi through devmanager app and it worked

throwaway96 commented 9 months ago

@lolreese

It looks like you had a space in the URL, causing the download to fail. That's why the sizes were all reported as 0 and verification failed.

lolreese commented 9 months ago

@throwaway96 ahhh. I ended up getting to work regularly installing it. Thanks for the quick response

romerotsvk commented 9 months ago

@lolreese

It looks like you had a space in the URL, causing the download to fail. That's why the sizes were all reported as 0 and verification failed.

I don't quite understand. where exactly ? Space in the URL.

throwaway96 commented 9 months ago

@romerotsvk

That comment was not about you. But if you really want to know anyway, the space was between webos and /org in the first line of this comment.