Unable to invoke the app in Inspector for various LG TV'S

Seeing the below error on trying to launch the app in appium insperor.
App Launched the TV but not in the inspector to interact with the locator and perform more operation to write the scripts

LG Model 2022 Observation:

[debug] [W3C] Matched W3C error code ‘unknown error’ to UnknownError
[debug] [[email protected]] UnknownError: An unknown server-side error occurred while processing the command. Original error: unknown error: Runtime.executionContextCreated has invalid ‘context’: {“auxData”:{“frameId”:“FBC10E0C81A80ED6FAFD1503358A3256”,“isDefault”:true,“type”:“default”},“id”:1,“name”:"",“origin”:“file://com.movenetworks.app.sling-tv-sling-production-webos”}
[debug] [[email protected]] (Session info: content shell=)
[debug] [[email protected]] at errorFromW3CJsonCode (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:923:25)
[debug] [[email protected]] at ProxyRequestError.getActualError (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:798:14)
[debug] [[email protected]] at JWProxy.command (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:340:19)
[debug] [[email protected]] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [[email protected]] at Chromedriver.startSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:597:5)
[debug] [[email protected]] at Chromedriver.start (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:528:7)
[debug] [[email protected]] at WebOSDriver.startChromedriver (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:182:5)
[debug] [[email protected]] at WebOSDriver.createSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:153:5)
[debug] [[email protected]] at AppiumDriver.createSession (/opt/homebrew/lib/node_modules/appium/lib/appium.js:336:35)
[[email protected]] Chromedriver exited unexpectedly with code null, signal SIGTERM
[debug] [[email protected]] Changed state to ‘stopped’
[[email protected]] An unknown server-side error occurred while processing the command. Original error: unknown error: Runtime.executionContextCreated has invalid ‘context’: {“auxData”:{“frameId”:“FBC10E0C81A80ED6FAFD1503358A3256”,“isDefault”:true,“type”:“default”},“id”:1,“name”:"",“origin”:“file://com.movenetworks.app.sling-tv-sling-production-webos”}
[[email protected]] (Session info: content shell=)
[debug] [[email protected]] Event ‘newSessionStarted’ logged at 1669295967998 (18:49:27 GMT+0530 (India Standard Time))
[debug] [[email protected]] Encountered internal error running command: Error: An unknown server-side error occurred while processing the command. Original error: unknown error: Runtime.executionContextCreated has invalid ‘context’: {“auxData”:{“frameId”:“FBC10E0C81A80ED6FAFD1503358A3256”,“isDefault”:true,“type”:“default”},“id”:1,“name”:"",“origin”:“file://com.movenetworks.app.sling-tv-sling-production-webos”}
[debug] [[email protected]] (Session info: content shell=)
[debug] [[email protected]] at Object.errorAndThrow (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/support/lib/logging.js:115:34)
[debug] [[email protected]] at Chromedriver.start (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:553:16)
[debug] [[email protected]] at WebOSDriver.startChromedriver (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:182:5)
[debug] [[email protected]] at WebOSDriver.createSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:153:5)
[debug] [[email protected]] at AppiumDriver.createSession (/opt/homebrew/lib/node_modules/appium/lib/appium.js:336:35)
[HTTP] <-- POST /session 500 14622 ms - 1285
[HTTP]

LG Model 2020 Observation:

Original error: unknown error: unexpected command response (Session info: content shell=)

[debug] [W3C] Matched W3C error code ‘unknown error’ to UnknownError
[debug] [[email protected]] UnknownError: An unknown server-side error occurred while processing the command. Original error: unknown error: unexpected command response
[debug] [[email protected]] (Session info: content shell=)
[debug] [[email protected]] at errorFromW3CJsonCode (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:923:25)
[debug] [[email protected]] at ProxyRequestError.getActualError (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:798:14)
[debug] [[email protected]] at JWProxy.command (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:340:19)
[debug] [[email protected]] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [[email protected]] at Chromedriver.startSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:597:5)
[debug] [[email protected]] at Chromedriver.start (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:528:7)
[debug] [[email protected]] at WebOSDriver.startChromedriver (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:182:5)
[debug] [[email protected]] at WebOSDriver.createSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:153:5)
[debug] [[email protected]] at AppiumDriver.createSession (/opt/homebrew/lib/node_modules/appium/lib/appium.js:336:35)
[[email protected]] Chromedriver exited unexpectedly with code null, signal SIGTERM
[debug] [[email protected]] Changed state to ‘stopped’
[[email protected]] An unknown server-side error occurred while processing the command. Original error: unknown error: unexpected command response
[[email protected]] (Session info: content shell=)
[debug] [[email protected]] Event ‘newSessionStarted’ logged at 1669294206097 (18:20:06 GMT+0530 (India Standard Time))
[debug] [[email protected]] Encountered internal error running command: Error: An unknown server-side error occurred while processing the command. Original error: unknown error: unexpected command response
[debug] [[email protected]] (Session info: content shell=)
[debug] [[email protected]] at Object.errorAndThrow (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/support/lib/logging.js:115:34)
[debug] [[email protected]] at Chromedriver.start (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:553:16)
[debug] [[email protected]] at WebOSDriver.startChromedriver (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:182:5)
[debug] [[email protected]] at WebOSDriver.createSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:153:5)
[debug] [[email protected]] at AppiumDriver.createSession (/opt/homebrew/lib/node_modules/appium/lib/appium.js:336:35)
[HTTP] <-- POST /session 500 10342 ms - 825

LG Model 2018 Observation:

Getting the below error on trying to launch the app.

Also please help i am using “appium:appId”: “AppPackage” which is the app package for my application
[debug] [LGWsClient] Got response: {“type”:“response”,“id”:“register_1”,“payload”:{“pairingType”:“PROMPT”,“returnValue”:true}}
[debug] [[email protected]] Event ‘newSessionStarted’ logged at 1669201630292 (16:37:10 GMT+0530 (India Standard Time))
[debug] [[email protected]] Encountered internal error running command: Error: Could not authenticate, please accept prompt
[debug] [[email protected]] at LGWSClient.authenticate (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/remote/lg-socket-client.js:190:15)
[debug] [[email protected]] at LGWSClient.initialize (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/remote/lg-socket-client.js:241:12)
[debug] [[email protected]] at WebOSDriver.createSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:135:5)
[debug] [[email protected]] at AppiumDriver.createSession (/opt/homebrew/lib/node_modules/appium/lib/appium.js:336:35)
[HTTP] <-- POST /session 500 62414 ms - 593
[HTTP]

@Aleksei @mykola-mokhnach It is an important topic.Please note 3 issues are present in 3 TV’s of LG.
Drivers are able to launch the app in TV with the Desired capabilities,But to inspect the app i am not able to launch in appium inspetor the 3 error mentioned above.
Let me know if full logs are needed.
@wreed

appium-lg-webos-driver is not maintained by Appium team. Try asking about your issue at some dedicated forums from LG.

Did you install lg sdk?
Also from lg sdk it looks like it works in emulator of WebOs

@Aleksei Yes i installed the LG SDK.

I am able to launch the application in TV’s.But to inspect the app its not launching in inspector and shows below error.

[debug] [[email protected]] Matched ‘/session’ to command name ‘createSession’
[debug] [[email protected]] Proxying [POST /session] to [POST http://127.0.0.1:55748/session] with body: {“capabilities”:{“alwaysMatch”:{“goog:chromeOptions”:{“debuggerAddress”:“192.168.2.81:9998”},“goog:loggingPrefs”:{“browser”:“ALL”}}}}
[debug] [[email protected]] Webview version: ‘’
[[email protected]] Got response with status 500: {“value”:{“error”:“unknown error”,“message”:“unknown error: Runtime.executionContextCreated has invalid ‘context’: {“auxData”:{“frameId”:“FBC10E0C81A80ED6FAFD1503358A3256”,“isDefault”:true,“type”:“default”},“id”:1,“name”:”",“origin”:“file://com.movenetworks.app.sling-tv-sling-production-webos”}\n (Session info: content shell=)",“stacktrace”:“0 chromedriver_mac64_v107.0.5304.62 0x0000000100e732c8 chromedriver_mac64_v107.0.5304.62 + 4752072\n1 chromedriver_mac64_v107.0.5304.62 0x0000000100df3463 chromedriver_mac64_v107.0.5304.62 + 4228195\n2 chromedriver_mac64_v107.0.5304.62 0x0000000100a56b18 chromedriver_mac64_v107.0.5304.62 + 441112\n3 chromedriver_mac64_v107.0.5304.62 0x0000000100a47407 chromedriver_mac64_v107.0.5304.62 + 377863\n4 chromedriver_mac64_v107.0.5304.62 0x0000000100a41746 chromedriver_mac64_v107.0.5304.62 + 354118\n5 chromedriver_mac64_v107.0.5304.62 0x0000000100a41fa5 chromedriver_mac64_v107.0.5304.62 + 356261\n6 chromedriver_mac64_v107.0.5304…
[debug] [W3C] Matched W3C error code ‘unknown error’ to UnknownError
[debug] [[email protected]] UnknownError: An unknown server-side error occurred while processing the command. Original error: unknown error: Runtime.executionContextCreated has invalid ‘context’: {“auxData”:{“frameId”:“FBC10E0C81A80ED6FAFD1503358A3256”,“isDefault”:true,“type”:“default”},“id”:1,“name”:”",“origin”:“file://com.movenetworks.app.sling-tv-sling-production-webos”}
[debug] [[email protected]] (Session info: content shell=)
[debug] [[email protected]] at errorFromW3CJsonCode (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:923:25)
[debug] [[email protected]] at ProxyRequestError.getActualError (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:798:14)
[debug] [[email protected]] at JWProxy.command (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:340:19)
[debug] [[email protected]] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [[email protected]] at Chromedriver.startSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:597:5)
[debug] [[email protected]] at Chromedriver.start (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:528:7)
[debug] [[email protected]] at WebOSDriver.startChromedriver (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:182:5)
[debug] [[email protected]] at WebOSDriver.createSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:153:5)
[debug] [[email protected]] at AppiumDriver.createSession (/opt/homebrew/lib/node_modules/appium/lib/appium.js:336:35)
[[email protected]] Chromedriver exited unexpectedly with code null, signal SIGTERM
[debug] [[email protected]] Changed state to ‘stopped’
[[email protected]] An unknown server-side error occurred while processing the command. Original error: unknown error: Runtime.executionContextCreated has invalid ‘context’: {“auxData”:{“frameId”:“FBC10E0C81A80ED6FAFD1503358A3256”,“isDefault”:true,“type”:“default”},“id”:1,“name”:"",“origin”:“file://com.movenetworks.app.sling-tv-sling-production-webos”}
[[email protected]] (Session info: content shell=)
[debug] [[email protected]] Event ‘newSessionStarted’ logged at 1669295967998 (18:49:27 GMT+0530 (India Standard Time))
[debug] [[email protected]] Encountered internal error running command: Error: An unknown server-side error occurred while processing the command. Original error: unknown error: Runtime.executionContextCreated has invalid ‘context’: {“auxData”:{“frameId”:“FBC10E0C81A80ED6FAFD1503358A3256”,“isDefault”:true,“type”:“default”},“id”:1,“name”:"",“origin”:“file://com.movenetworks.app.sling-tv-sling-production-webos”}
[debug] [[email protected]] (Session info: content shell=)
[debug] [[email protected]] at Object.errorAndThrow (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/support/lib/logging.js:115:34)
[debug] [[email protected]] at Chromedriver.start (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:553:16)
[debug] [[email protected]] at WebOSDriver.startChromedriver (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:182:5)
[debug] [[email protected]] at WebOSDriver.createSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:153:5)
[debug] [[email protected]] at AppiumDriver.createSession (/opt/homebrew/lib/node_modules/appium/lib/appium.js:336:35)
[HTTP] <-- POST /session 500 14622 ms - 1285
[HTTP]

@Aleksei Please expedite this issue ,Its blocking to us to proceed further.
We need to test the app in real devices, emulator is not helpful for us,so we barely use it

we are not LG Appium driver developers :slight_smile:
but can only advice something e.g. can you inspect app with chome? https://webostv.developer.lge.com/develop/getting-started/app-debugging

@Aleksei Thanks its resolved now.

@Raja_Subudhi Please post the resolution so that other users of LG TV’s can benefit. That’s the whole point of this forum.

Sure @wreed Below is the solution.

WebOS for LG tv uses very old chrome drivers.We need to use the additional capability “chromedriverExecutable”: “driver exe path” to invoke the appp in inspector.

By using the driver https://chromedriver.storage.googleapis.com/index.html?path=2.36/ i am able to resolve the same.

1 Like