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

closeApp not working (403) when app not started via lgtv (this app) #102

Open
balumba123 opened this issue May 3, 2022 · 4 comments
Open

Comments

@balumba123
Copy link

You can't use "lgtv myTV closeApp " to close an app that's not opened by "lgtv myTV startApp ".
It returns a 403Access denied error.

root@pc:~# lgtv "192.168.11.218" closeApp com.my.app
DEBUG:root:Initiating handshake
DEBUG:root:Received response
DEBUG:root:{"type":"registered","id":"register_0","payload":{"client-key":"*****"}}
DEBUG:root:Handshake complete
DEBUG:root:{'id': '0', 'type': 'request', 'uri': 'ssap://system.launcher/close', 'payload': '{"id": "com.my.app"}'}
DEBUG:root:Received response
DEBUG:root:{"type":"error","id":"0","error":"403 access denied","payload":{}}
DEBUG:root:{'type': 'error', 'id': '0', 'error': '403 access denied', 'payload': {}}
{"type": "error", "id": "0", "error": "403 access denied", "payload": {}}
{"type": "error", "id": "0", "error": "403 access denied", "payload": {}}
DEBUG:ws4py:Closing message received (1000) 'b'''
{"closing": {"code": 1000, "reason": ""}}

@klattimer
Copy link
Owner

I think you need to pair it again, I've had this happen after an update on the tv firmware.

@balumba123
Copy link
Author

balumba123 commented May 3, 2022

Unfortunately a new pairing didn't help.
This was the first I did.
Deleted file ~/.lgtv/config.json and started new pairing. Or is there any further step needed to "cleanup" than to remove this file?

Steps to reproduce in detail:
Pair TV with lgtv (this app)
Start any app on TV but NOT using lgtv command (using remote hardware directly), for example developer mode
Use lgtv myTV closeApp "com.palmdts.devmode"

The 403 error comes up.

@klattimer
Copy link
Owner

you could try deleting the files, not sure how it deals with over-riding tbh, it's a long time since I looked at the code.

Have you tried with other apps?

@DarkCeptor44
Copy link
Contributor

It's not an actual solution but you can start the livetv "app" to switch, the app will still be open in the background but shouldn't interfere that much in terms of performance.

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

3 participants