headspinio / appium-tizen-tv-driver

A Samsung Tizen TV driver for Appium
Apache License 2.0
11 stars 2 forks source link

Failed to launch my-app as debug mode. It might not be debuggable, or the device condition was weird. #685

Open mlopezuno opened 3 weeks ago

mlopezuno commented 3 weeks ago

Hi, I have started using the appium-tizen driver and I've been able to get unstuck on many issues I encountered, right now I am finally able to load my-app in the TV using the driver but my tests don't run, at the end I get a message like this:

Encountered internal error running command: SessionNotCreatedError: A new session could not be created. Details: Failed to launch my-app as debug mode. It might not be debuggable, or the device condition was weird. Original error: Command '/Users/user/tizen-studio/tools/sdb -s <my-ip>\:26101 shell 0 debug my-app' exited with code 1. Stdout was: ''. Stderr was: 'closed '
[0]     at TizenTVDriver.setupDebugger (/Users/user/path/repo/node_modules/appium/node_modules/appium-tizen-tv-driver/lib/driver.js:501:15)
[0]     at TizenTVDriver.createSession (/Users/user/path/repo/node_modules/appium/node_modules/appium-tizen-tv-driver/lib/driver.js:420:30)
[0]     at AppiumDriver.createSession (/Users/user/path/repo/node_modules/appium/lib/appium.js:739:35)

Does someone know how can I fix this? It looks like I have to run my app in debug mode.

KazuCocoa commented 3 weeks ago

Could you share the full appim server log? Also, could the app run with sdb -s <my-ip>\:26101 shell 0 debug my-app without this driver?

I observed the debug mode run could fail to start for some reason. (TV internal) If the error is kind of random failure, https://github.com/headspinio/appium-tizen-tv-driver/pull/676 will help to improve with retry logic. If your app was not debggable one, appium:rcMode as remote and appium:rcOnly will also help. They will not run chromedriver but it does not require debuggable app. https://github.com/headspinio/appium-tizen-tv-driver/tree/main/packages/appium-tizen-tv-driver#press-key is available for the mode. https://github.com/headspinio/appium-tizen-tv-driver/tree/main/packages/appium-tizen-tv-driver

mlopezuno commented 3 weeks ago

@KazuCocoa Thanks for answering, appreciate it! I am able to run the app with sdb -s <my-ip>\:26101 shell 0 debug my-app

The full logs are basically what I sent you, they are repeating that same part I sent earlier and after a time they timeout.

I see that adding appium:rcMode as remote and appium:rcOnly as true is giving me a new error which is expected because I don't have my tests written in a way that uses remote (I have js). However I do want to use chromedriver, the reason is I already have tests written in for the webos-appium-driver that I want to re-use here.