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] [Chromedriver@8584] 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] [Chromedriver@8584] (Session info: content shell=)
[debug] [Chromedriver@8584] at errorFromW3CJsonCode (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:923:25)
[debug] [Chromedriver@8584] at ProxyRequestError.getActualError (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:798:14)
[debug] [Chromedriver@8584] at JWProxy.command (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:340:19)
[debug] [Chromedriver@8584] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [Chromedriver@8584] at Chromedriver.startSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:597:5)
[debug] [Chromedriver@8584] at Chromedriver.start (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:528:7)
[debug] [Chromedriver@8584] at WebOSDriver.startChromedriver (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:182:5)
[debug] [Chromedriver@8584] at WebOSDriver.createSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:153:5)
[debug] [Chromedriver@8584] at AppiumDriver.createSession (/opt/homebrew/lib/node_modules/appium/lib/appium.js:336:35)
[Chromedriver@8584] Chromedriver exited unexpectedly with code null, signal SIGTERM
[debug] [Chromedriver@8584] Changed state to ‘stopped’
[Chromedriver@8584] 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”}
[Chromedriver@8584] (Session info: content shell=)
[debug] [AppiumDriver@09a1] Event ‘newSessionStarted’ logged at 1669295967998 (18:49:27 GMT+0530 (India Standard Time))
[debug] [AppiumDriver@09a1] 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] [AppiumDriver@09a1] (Session info: content shell=)
[debug] [AppiumDriver@09a1] at Object.errorAndThrow (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/support/lib/logging.js:115:34)
[debug] [AppiumDriver@09a1] at Chromedriver.start (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:553:16)
[debug] [AppiumDriver@09a1] at WebOSDriver.startChromedriver (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:182:5)
[debug] [AppiumDriver@09a1] at WebOSDriver.createSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:153:5)
[debug] [AppiumDriver@09a1] 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] [Chromedriver@0cab] UnknownError: An unknown server-side error occurred while processing the command. Original error: unknown error: unexpected command response
[debug] [Chromedriver@0cab] (Session info: content shell=)
[debug] [Chromedriver@0cab] at errorFromW3CJsonCode (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:923:25)
[debug] [Chromedriver@0cab] at ProxyRequestError.getActualError (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:798:14)
[debug] [Chromedriver@0cab] at JWProxy.command (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:340:19)
[debug] [Chromedriver@0cab] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [Chromedriver@0cab] at Chromedriver.startSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:597:5)
[debug] [Chromedriver@0cab] at Chromedriver.start (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:528:7)
[debug] [Chromedriver@0cab] at WebOSDriver.startChromedriver (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:182:5)
[debug] [Chromedriver@0cab] at WebOSDriver.createSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:153:5)
[debug] [Chromedriver@0cab] at AppiumDriver.createSession (/opt/homebrew/lib/node_modules/appium/lib/appium.js:336:35)
[Chromedriver@0cab] Chromedriver exited unexpectedly with code null, signal SIGTERM
[debug] [Chromedriver@0cab] Changed state to ‘stopped’
[Chromedriver@0cab] An unknown server-side error occurred while processing the command. Original error: unknown error: unexpected command response
[Chromedriver@0cab] (Session info: content shell=)
[debug] [AppiumDriver@09a1] Event ‘newSessionStarted’ logged at 1669294206097 (18:20:06 GMT+0530 (India Standard Time))
[debug] [AppiumDriver@09a1] Encountered internal error running command: Error: An unknown server-side error occurred while processing the command. Original error: unknown error: unexpected command response
[debug] [AppiumDriver@09a1] (Session info: content shell=)
[debug] [AppiumDriver@09a1] at Object.errorAndThrow (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/support/lib/logging.js:115:34)
[debug] [AppiumDriver@09a1] at Chromedriver.start (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:553:16)
[debug] [AppiumDriver@09a1] at WebOSDriver.startChromedriver (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:182:5)
[debug] [AppiumDriver@09a1] at WebOSDriver.createSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:153:5)
[debug] [AppiumDriver@09a1] 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] [AppiumDriver@2850] Event ‘newSessionStarted’ logged at 1669201630292 (16:37:10 GMT+0530 (India Standard Time))
[debug] [AppiumDriver@2850] Encountered internal error running command: Error: Could not authenticate, please accept prompt
[debug] [AppiumDriver@2850] at LGWSClient.authenticate (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/remote/lg-socket-client.js:190:15)
[debug] [AppiumDriver@2850] at LGWSClient.initialize (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/remote/lg-socket-client.js:241:12)
[debug] [AppiumDriver@2850] at WebOSDriver.createSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:135:5)
[debug] [AppiumDriver@2850] 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] [Chromedriver@8584] Matched ‘/session’ to command name ‘createSession’
[debug] [Chromedriver@8584] 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] [Chromedriver@8584] Webview version: ‘’
[Chromedriver@8584] 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] [Chromedriver@8584] 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] [Chromedriver@8584] (Session info: content shell=)
[debug] [Chromedriver@8584] at errorFromW3CJsonCode (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:923:25)
[debug] [Chromedriver@8584] at ProxyRequestError.getActualError (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:798:14)
[debug] [Chromedriver@8584] at JWProxy.command (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:340:19)
[debug] [Chromedriver@8584] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [Chromedriver@8584] at Chromedriver.startSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:597:5)
[debug] [Chromedriver@8584] at Chromedriver.start (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:528:7)
[debug] [Chromedriver@8584] at WebOSDriver.startChromedriver (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:182:5)
[debug] [Chromedriver@8584] at WebOSDriver.createSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:153:5)
[debug] [Chromedriver@8584] at AppiumDriver.createSession (/opt/homebrew/lib/node_modules/appium/lib/appium.js:336:35)
[Chromedriver@8584] Chromedriver exited unexpectedly with code null, signal SIGTERM
[debug] [Chromedriver@8584] Changed state to ‘stopped’
[Chromedriver@8584] 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”}
[Chromedriver@8584] (Session info: content shell=)
[debug] [AppiumDriver@09a1] Event ‘newSessionStarted’ logged at 1669295967998 (18:49:27 GMT+0530 (India Standard Time))
[debug] [AppiumDriver@09a1] 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] [AppiumDriver@09a1] (Session info: content shell=)
[debug] [AppiumDriver@09a1] at Object.errorAndThrow (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/support/lib/logging.js:115:34)
[debug] [AppiumDriver@09a1] at Chromedriver.start (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/node_modules/appium-chromedriver/lib/chromedriver.js:553:16)
[debug] [AppiumDriver@09a1] at WebOSDriver.startChromedriver (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:182:5)
[debug] [AppiumDriver@09a1] at WebOSDriver.createSession (/Users/raja.subudhi/.appium/node_modules/appium-lg-webos-driver/lib/driver.js:153:5)
[debug] [AppiumDriver@09a1] 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.

2 Likes

@Raja_Subudhi Please post the any document how to Automate the Web os Tv’s

Hi Raja_S

Could please update here code snippet to connect lg web oS tv using appium .