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

piccap cant get root status after update #61

Open
menotuu opened this issue Oct 24, 2022 · 37 comments
Open

piccap cant get root status after update #61

menotuu opened this issue Oct 24, 2022 · 37 comments

Comments

@menotuu
Copy link

menotuu commented Oct 24, 2022

I had a running system and it was so boring that I tried to update homebrew channel from 0.5.0 to 0.5.1 and piccap from 0.2.3 to 0.4.2 (argh)
now piccap cant get root status and service cant be started. hbchannel exec failed!
I removed piccap and homebrew channel and rooted tv again. I never made an tv firmware update.
its still the same. homebrew channel says root status: ok.
ssh is working, so I think piccap have a big problem with my tv. I dont know how to solve the problem.

the problem is old, i read here about a same thing, but it should be fixed in 0.4.1.

I removed piccap 0.4.2 and installed 0.2.3 - all working fine!
I updated to 0.4.1 - same fault: calling Piccap-Service to get root-status

Board type | M19_DVB
Hardware ID | HE_DTV_W19H_AFADABAA
Product ID | OLED65B97LA
webOS TV version | 05.20.06
Software Version | 4.9.5-6

20221024_153815_HDR
20221024_144214_HDR
20221024_145413_HDR

@kopiro
Copy link

kopiro commented Oct 28, 2022

Hey, try to reset your config.json file by either deleting it or echoing a good one:

echo '{"priority":150,"backend":"auto","address":"127.0.0.1","port":19400,"width":320
,"height":180,"quirks":0,"fps":0,"vsync":false,"autostart":true,"nogui":false,"novideo":false,"uibackend":"auto"}' > /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/config.json

@socratesprime
Copy link

Hi there, I am experiencing the same issue. Can you provide me with the steps to delete the json file ?

@ZeBriD
Copy link

ZeBriD commented Nov 12, 2022

Got the same promlem.
Removing config file - no changes.

@matiaspirovanovarela
Copy link

matiaspirovanovarela commented Nov 13, 2022

Hello, got the same error here, but found an answer.

There is a typo here:

command: '/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/elevate-service org.webosbrew.piccap; /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/elevate-service org.webosbrew.piccap.service',

According to the source from webosbrew, instead of elevate-service, it should be elevateService

Ref code: https://github.com/webosbrew/webos-homebrew-channel/blob/0ae4696721f27bf6d0790cefe14506dfea7a2b50/services/service.ts#L95

I was able to change the file through the terminal, rebooted the tv and it worked.

EDIT: If someone wants to live change it, there are 2 instances to replace in the same line.

@socratesprime
Copy link

this sounds

Hello, got the same error here, but found an answer.

There is a typo here:

command: '/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/elevate-service org.webosbrew.piccap; /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/elevate-service org.webosbrew.piccap.service',

According to the source from webosbrew, instead of elevate-service, it should be elevateService

Ref code: https://github.com/webosbrew/webos-homebrew-channel/blob/0ae4696721f27bf6d0790cefe14506dfea7a2b50/services/service.ts#L95

I was able to change the file through the terminal, rebooted the tv and it worked.

EDIT: If someone wants to live change it, there are 2 instances to replace in the same line.

This sounds interesting, man.

can you specify which files need to be changed, and where to find them?

or you can also share the line of code that makes the changes.

Also, are you saying that if the changes are made whiles piccap is not running, only 1 file needs to be changed, and that becomes 2 files whiles piccap is running?

@matiaspirovanovarela
Copy link

can you specify which files need to be changed, and where to find them?

or you can also share the line of code that makes the changes.

Sure, it's the one located in /media/developer/apps/usr/palm/applications/org.webosbrew.piccap/js/servicecalls.js. It's all in one line, but here is mine with the edit (rename from txt to js): servicecalls.txt

Also, are you saying that if the changes are made whiles piccap is not running, only 1 file needs to be changed, and that becomes 2 files whiles piccap is running?

I wasn't that smart, I just updated the servicecalls.js and restarted. Piccap doesn't seem to be autorestarting on mi tv, nor picking up the saved config, but it's working after a manual restart. It's progress, I guess.

@mksy
Copy link

mksy commented Nov 14, 2022

There is a typo here

you're wrong. Everything is correct in the program code. Here is a similar one for you in another project
https://github.com/webosbrew/hyperion.ng-webos-loader/blob/master/frontend/views/MainPanel.js#L19

@matiaspirovanovarela
Copy link

you're wrong

Yeah, probably. I just posted what I found and what worked for me. Do you know what the root cause of this issue is? I'm happy to help testing any new fix.

@juanMontanez
Copy link

I have the same problem

@N8Falke78
Copy link

N8Falke78 commented Nov 26, 2022

solved (I uninstalled 4.2>>reboot TV>>reinstalled 4.2 and piccap was able to get root. see post under this)

Same there. Calling PicCap Service zu get root status HBChannel exec failed! Code: undefined
How to install older Version piccap?
Info:
Piccap 0.4.2
"board_type": "O18_DVB",
"hardware_id": "HE_DTV_W19O_AFABABAA",
"product_id": "OLED55C97LA",
"core_os_release": "4.9.7-11",
"webos_manufacturing_version": "05.30.11",
/ # "board_type": "O18_DVB",
/bin/sh: board_type:: not found
/ # "hardware_id": "HE_DTV_W19O_AFABABAA",
/bin/sh: hardware_id:: not found
/ # "product_id": "OLED55C97LA",
/bin/sh: product_id:: not found
/ # "core_os_release": "4.9.7-11",
/bin/sh: core_os_release:: not found
/ # "webos_manufacturing_version": "05.30.11",
/bin/sh: webos_manufacturing_version:: not found

@silfa718
Copy link

silfa718 commented Dec 2, 2022

I had the same issue, unable to get root.

I uninstalled 4.2>>reboot TV>>reinstalled 4.2 and piccap was able to get root.

@TBSniller
Copy link
Owner

Hey guys,
yeah this issue can come up when updating from an very old version up to newest. Uninstalling PicCap will clean up all old files. So reinstalling should fix this issue.

@matiaspirovanovarela
Copy link

@TBSniller may I ask the list of old files that we need to delete? Because I tried that and the issue is still present, there is an eternal loop trying to get root status.

@TBSniller TBSniller reopened this Dec 17, 2022
@silfa718
Copy link

Did you uninstall them reboot TV?

@TBSniller
Copy link
Owner

TBSniller commented Dec 17, 2022

@matiaspirovanovarela
I'm aware of these locations:

/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/
/var/luna-service2-dev/services.d/org.webosbrew.piccap.service.service
/var/luna-service2-dev/client-permissions.d/org.webosbrew.piccap.*
/var/luna-service2-dev/api-permissions.d/org.webosbrew.piccap.*
/var/luna-service2-dev/manifests.d/org.webosbrew.piccap.json
/var/luna-service2-dev/roles.d/org.webosbrew.piccap.*
/var/lib/webosbrew/init.d/piccapautostart

But you should not delete them manually before uninstalling your app. I don't know which sideaffect this would have.

@matiaspirovanovarela
Copy link

@silfa718 yes, I even tried installing 0.4.2, rebooting, uninstalling, rebooting and installing 0.4.2 again.

@TBSniller I found the following with everything uninstalled. Should I delete them just in case?

root@LGwebOSTV:/var/luna-service2-dev/api-permissions.d# ls -lt
total 28
-rw-r--r--    1 root     root            57 Nov 12 10:09 org.webosbrew.hyperhdr.tv.loader.service.api.public.json
-rw-r--r--    1 root     root            80 Nov 11 09:53 org.webosbrew.hbchannel.service.api.json
-rw-r--r--    1 root     root            54 Nov 10 21:25 org.webosbrew.hyperhdr.loader.service.api.public.json
-rw-r--r--    1 root     root            57 Nov 10 21:07 org.webosbrew.hyperion.ng.loader.service.api.public.json
-rw-r--r--    1 root     root            45 Nov 10 20:54 org.webosbrew.piccap.service.api.public.json
-rw-r--r--    1 root     root            37 Nov 10 20:54 org.webosbrew.piccap.api.public.json
-rw-r--r--    1 root     root            48 Oct 30 22:54 org.webosbrew.hbchannel.service.api.public.json


root@LGwebOSTV:/var/luna-service2-dev/client-permissions.d# ls -lt
total 44
-rw-r--r--    1 root     root            24 Nov 15 18:30 amazon.app.json
-rw-r--r--    1 root     root            53 Nov 12 10:09 org.webosbrew.hyperhdr.tv.loader.service.root.json
-rw-r--r--    1 root     root            37 Nov 11 18:50 youtube.leanback.v4.app.json
-rw-r--r--    1 root     root            81 Nov 11 09:53 org.webosbrew.hbchannel.app.json
-rw-r--r--    1 root     root            48 Nov 11 09:53 org.webosbrew.hbchannel.service.service.json
-rw-r--r--    1 root     root            50 Nov 10 21:25 org.webosbrew.hyperhdr.loader.service.root.json
-rw-r--r--    1 root     root            22 Nov 10 21:21 ui30.app.json
-rw-r--r--    1 root     root            53 Nov 10 21:07 org.webosbrew.hyperion.ng.loader.service.root.json
-rw-r--r--    1 root     root            41 Nov 10 20:54 org.webosbrew.piccap.service.root.json
-rw-r--r--    1 root     root            33 Nov 10 20:54 org.webosbrew.piccap.root.json
-rw-r--r--    1 root     root            44 Oct 30 22:54 org.webosbrew.hbchannel.service.root.json


root@LGwebOSTV:/var/lib/webosbrew/init.d# ls -lt
total 12
lrwxrwxrwx    1 root     root            93 Dec  7 10:10 90-start_hyperhdrd -> /media/developer/apps/usr/palm/services/org.webosbrew.hyperhdr.tv.loader.service/autostart.sh
lrwxrwxrwx    1 root     root            84 Dec  7 09:42 piccapautostart -> /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/piccapautostart
-rw-r--r--    1 root     root           190 Oct 30 22:54 README.txt

Just in case, these are my specs:

TV model | LG TV UJ6560
webOS version | 03.60.20
Homebrew version | 0.5.1

@TBSniller
Copy link
Owner

TBSniller commented Dec 17, 2022

@matiaspirovanovarela: You can definitely try it. Think you know it, but just in case: Keep in mind to only delete piccap related files. Deleting the ones from other apps might destroy their permissions.
These files will be regenerated when PicCap installs and should be edited when it starts using elevate-service from HBChannel.

@TBSniller
Copy link
Owner

And if this also doesn't helped try the following:
Install PicCap as normal.
Completly reboot your TV and don't start PicCap after starting TV
Run these commands in terminal:

/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/elevate-service org.webosbrew.piccap
/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/elevate-service org.webosbrew.piccap.service

These will giving PicCap root permissions
Just reboot again
Try to use PicCap

@matiaspirovanovarela
Copy link

Thank you both. I just did this:

  1. Deleted extra files and rebooted.
  2. Installed PicCap 0.4.2 from Homebrew. Didn't lunched it, just rebooted.
  3. Ran the commands from a console (log below). Rebooted.
  4. Opened PicCap, Seems to work, at least it's not in a root loop (State: status info refreshed).
  5. Activated Autostart, changed the video capture backend (as my tv is old) and the advanced config (same reason). Saved the config. Rebooted the tv.
  6. Opened PicCap to check if the settings saved, got the Checking root status loop.

Should I try editing the config file instead of step 5?

root@LGwebOSTV:~# /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/elevate-service org.webosbrew.piccap
[ ] Creating client permissions file: /var/luna-service2-dev/client-permissions.d/org.webosbrew.piccap.root.json
[ ] Creating API permissions file: /var/luna-service2-dev/api-permissions.d/org.webosbrew.piccap.api.public.json
[+] Refreshing services...
telling hub to reload setting and rescan all directories

root@LGwebOSTV:~# /media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service/elevate-service org.webosbrew.piccap.service
[ ] Creating client permissions file: /var/luna-service2-dev/client-permissions.d/org.webosbrew.piccap.service.root.json
[ ] Creating API permissions file: /var/luna-service2-dev/api-permissions.d/org.webosbrew.piccap.service.api.public.json
[~] Found legacy webOS <3.x service file: /var/palm/ls2-dev/services/pub/org.webosbrew.piccap.service.service
[ ] /var/palm/ls2-dev/services/pub/org.webosbrew.piccap.service.service is a native service
[ ] Updating service definition: /var/palm/ls2-dev/services/pub/org.webosbrew.piccap.service.service
- [D-BUS Service]
Name=org.webosbrew.piccap.service
Exec=/usr/bin/jailer -t native_devmode -i org.webosbrew.piccap -p /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos
Type=dynamic

+ [D-BUS Service]
Name=org.webosbrew.piccap.service
Exec=/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos
Type=dynamic

[ ] /var/palm/ls2-dev/services/prv/org.webosbrew.piccap.service.service is a native service
[ ] Updating service definition: /var/palm/ls2-dev/services/prv/org.webosbrew.piccap.service.service
- [D-BUS Service]
Name=org.webosbrew.piccap.service
Exec=/usr/bin/jailer -t native_devmode -i org.webosbrew.piccap -p /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos
Type=dynamic

+ [D-BUS Service]
Name=org.webosbrew.piccap.service
Exec=/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos
Type=dynamic

[ ] Adding permission for name: *
[ ] Adding permission for name: com.webos.service.capture.client*
[ ] Updating roles definition: /var/palm/ls2-dev/roles/pub/org.webosbrew.piccap.service.json
- {"permissions":[{"outbound":["*"],"service":"org.webosbrew.piccap.service","inbound":["*"]}],"role":{"allowedNames":["org.webosbrew.piccap.service"],"exeName":"/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos","type":"regular"}}

+ {"permissions":[{"outbound":["*"],"service":"org.webosbrew.piccap.service","inbound":["*"]},{"service":"*","inbound":["*"],"outbound":["*"]},{"service":"com.webos.service.capture.client*","inbound":["*"],"outbound":["*"]}],"role":{"allowedNames":["org.webosbrew.piccap.service","*","com.webos.service.capture.client*"],"exeName":"/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos","type":"regular"}}
[ ] Adding permission for name: *
[ ] Adding permission for name: com.webos.service.capture.client*
[ ] Updating roles definition: /var/palm/ls2-dev/roles/prv/org.webosbrew.piccap.service.json
- {"permissions":[{"outbound":[],"service":"org.webosbrew.piccap.service","inbound":["*"]}],"role":{"allowedNames":["org.webosbrew.piccap.service"],"exeName":"/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos","type":"regular"}}

+ {"permissions":[{"outbound":["*"],"service":"org.webosbrew.piccap.service","inbound":["*"]},{"service":"*","inbound":["*"],"outbound":["*"]},{"service":"com.webos.service.capture.client*","inbound":["*"],"outbound":["*"]}],"role":{"allowedNames":["org.webosbrew.piccap.service","*","com.webos.service.capture.client*"],"exeName":"/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos","type":"regular"}}
[+] Refreshing services...
telling hub to reload setting and rescan all directories

root@LGwebOSTV:~#

@TBSniller
Copy link
Owner

Intresting, sounds like service is crashing due to autostart. Can you redo your steps to get a working PicCap again. After that don't activate autostart, more do another reboot and check if PicCap is running after this reboot without autostart
If so we will have to check why it's crashing during autostart feature.
A bit to explain: If service crashes it can't handle any new input actions, what would explain your loop, as it is never answered

@matiaspirovanovarela
Copy link

Of course. Here are the steps:

  1. Deleted extra files and rebooted.
  2. Installed PicCap 0.4.2 from Homebrew. Didn't lunched it, just rebooted.
  3. Ran the commands from a console (same log) and rebooted.
  4. Opened PicCap, got the status info refreshed.
  5. Changed the config, but this time I noticed an error when saving on the Advance tab:
    document.getElementById('txtInfoState').innerHTML = 'Sace settings failed!';
  6. After restarting, got the loop.

I tried again but this time without changing any quirk. This time it seems to avoid the loop. Even activating the autostart works.

@TBSniller
Copy link
Owner

Does PicCap work for you without autostart feature? Is your capture working?

@matiaspirovanovarela
Copy link

Yes, I need the quirks but at least it's capturing.

@TBSniller
Copy link
Owner

Alright, then it might be related to this: webosbrew/hyperion-webos#99
Can you please try to disable QuickStart+?

@matiaspirovanovarela
Copy link

I don't have it enable (I disabled it some time ago to test if that could help)

@matiaspirovanovarela
Copy link

Small update, I changed the config to have "quirks":7 and got the loop back after a reboot. Reverting it to "quirks":0 and rebooting was enough to rollback.

@TBSniller
Copy link
Owner

If you are using wrong quirks, that aren't suitable for your TV you can expect crashes.
Can you please check logging, disable autostart and reboot your tv. after that:
Run luna-send -n 1 -f 'luna://com.webos.pmlogd/setdevlogstatus' '{"recordDevLogs":true}'
PmLogCtl set '*' debug
tail -F /var/log/messages | grep hyperion-webos
and then start piccap

@matiaspirovanovarela
Copy link

Here you are: piccap_log.txt

@TBSniller
Copy link
Owner

I think you will have to enable QUIRK_DILE_VT_NO_FREEZE_CAPTURE. Can you enable, save and try again? Make sure you are saving while PicCap was working, as saving function calls hyperion-webos, which should not have crashed beforehand

@matiaspirovanovarela
Copy link

I was able to enable the option, save and reboot just fine. Still need to start it manually.

@TBSniller
Copy link
Owner

Can you provide logs please?

@matiaspirovanovarela
Copy link

Sure. When I started it again today, it stopped working, it was all black. I had to rollback the quirk by editing the config file.

So, I started with PicCap working, without autostart and no quirks. I just activated QUIRK_DILE_VT_NO_FREEZE_CAPTURE and then clicked save.

piccap_log_20221218.txt

@kelsinni
Copy link

kelsinni commented Jan 7, 2023

I had the same issue, unable to get root.

I uninstalled 4.2>>reboot TV>>reinstalled 4.2 and piccap was able to get root.

Hi there... Im having the same issue with piccap. Can you please tell me how did you unistall piccap and them installed it again? Did you use Telnet or SSH command line? Thanks!

@vinagrepuro
Copy link

same issue here, anybody can help us? Thanks!

@chrizzzzy
Copy link

@silfa718 can you please tell us how to uninstall Piccap?

@menotuu
Copy link
Author

menotuu commented Mar 16, 2023

uninstall piccap:
click home button on remote, go to the right, click edit und click on piccap, click the ross and remove it.
and after that you can remove with a ftp browser like flashfxp the following files
#61 (comment)

@chrizzzzy
Copy link

@menotuu: This worked for me. Thank you!

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