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

sdb shell 0 debug fails on TizenTV 2017 #584

Open
Jiyvn opened this issue Mar 20, 2024 · 3 comments
Open

sdb shell 0 debug fails on TizenTV 2017 #584

Jiyvn opened this issue Mar 20, 2024 · 3 comments

Comments

@Jiyvn
Copy link

Jiyvn commented Mar 20, 2024

Problem

command sdb shell 0 debug works on Tizen 5.5 (TizenTV 2020) but fails for Tizen 3.0 (TizenTV 2017) with same wgt
2020
image
2017
image

sdb capability
image

the install/uninstall command is fine. Is it possible to skip debug command

appium server log

�[38;5;16m[AppiumDriver@60fb]�[0m Appium v2.5.1 creating new TizenTVDriver (v0.10.0) session
�[38;5;16m[AppiumDriver@60fb]�[0m Checking BaseDriver versions for Appium and TizenTVDriver
�[38;5;16m[AppiumDriver@60fb]�[0m Appium's BaseDriver version is 9.5.2
�[38;5;16m[AppiumDriver@60fb]�[0m TizenTVDriver's BaseDriver version is 8.7.3
�[38;5;16m[AppiumDriver@60fb]�[0m Explicitly enabling use of insecure features:
�[38;5;16m[AppiumDriver@60fb]�[0m chromedriver_autodownload
�[38;5;32m[TizenTVDriver@e01f]�[0m Creating session with W3C capabilities: {
�[38;5;32m[TizenTVDriver@e01f]�[0m "alwaysMatch": {
�[38;5;32m[TizenTVDriver@e01f]�[0m "platformName": "TizenTV",
�[38;5;32m[TizenTVDriver@e01f]�[0m "appium:deviceAddress": "192.168.10.181:26101",
�[38;5;32m[TizenTVDriver@e01f]�[0m "appium:udid": "192.168.10.181:26101",
�[38;5;32m[TizenTVDriver@e01f]�[0m "appium:automationName": "TizenTV",
�[38;5;32m[TizenTVDriver@e01f]�[0m "appium:rcMode": "remote",
�[38;5;32m[TizenTVDriver@e01f]�[0m "appium:chromedriverExecutableDir": "/Users/jiyvn/aviu/apps/tv/chromedriver/",
�[38;5;32m[TizenTVDriver@e01f]�[0m "appium:appPackage": "TXSXgdzhCp.Viu",
�[38;5;32m[TizenTVDriver@e01f]�[0m "appium:deviceName": "Tizen3.0 2020",
�[38;5;32m[TizenTVDriver@e01f]�[0m "appium:noReset": false,
�[38;5;32m[TizenTVDriver@e01f]�[0m "appium:app": "/Users/jiyvn/aviu/apps/Viu_dev.wgt",
�[38;5;32m[TizenTVDriver@e01f]�[0m "appium:rcToken": "15773870"
�[38;5;32m[TizenTVDriver@e01f]�[0m },
�[38;5;32m[TizenTVDriver@e01f]�[0m "firstMatch": [
�[38;5;32m[TizenTVDriver@e01f]�[0m {}
�[38;5;32m[TizenTVDriver@e01f]�[0m ]
�[38;5;32m[TizenTVDriver@e01f]�[0m }
�[38;5;32m[TizenTVDriver@e01f (012ab4c6)]�[0m Session created with session id: 012ab4c6-e55d-43d7-b6fe-ddd7de58928f
�[38;5;48m[TizenTVDriver]�[0m Received rcKeypressCooldown of type undefined
�[38;5;48m[TizenTVDriver]�[0m Uninstalling tizen app 'TXSXgdzhCp.Viu' on device '192.168.10.181:26101'
�[38;5;48m[TizenTVDriver]�[0m Running command: /Users/jiyvn/tizen-studio/tools/ide/bin/tizen uninstall -p TXSXgdzhCp.Viu -s 192.168.10.181:26101
�[38;5;48m[TizenTVDriver]�[0m Installing tizen app '/Users/jiyvn/aviu/apps/Viu_dev.wgt' on device '192.168.10.181:26101'
�[38;5;48m[TizenTVDriver]�[0m Running command: /Users/jiyvn/tizen-studio/tools/ide/bin/tizen install -n /Users/jiyvn/aviu/apps/Viu_dev.wgt -s 192.168.10.181:26101
�[38;5;48m[TizenTVDriver]�[0m Listing apps installed on '192.168.10.181:26101'
�[38;5;48m[TizenTVDriver]�[0m Running command: /Users/jiyvn/tizen-studio/tools/sdb -s 192.168.10.181:26101 shell 0 applist
�[38;5;48m[TizenTVDriver]�[0m There are 152 apps installed
�[38;5;48m[TizenTVDriver]�[0m Starting TXSXgdzhCp.Viu in debug mode on 192.168.10.181:26101
�[38;5;48m[TizenTVDriver]�[0m Running command: /Users/jiyvn/tizen-studio/tools/sdb -s 192.168.10.181:26101 shell 0 debug TXSXgdzhCp.Viu
�[38;5;48m[TizenTVDriver]�[0m Cleaning up any ports which have been forwarded
�[38;5;16m[AppiumDriver@60fb]�[0m Event 'newSessionStarted' logged at 1710915243869 (14:14:03 GMT+0800 (China Standard Time))
�[38;5;16m[AppiumDriver@60fb]�[0m Encountered internal error running command: Command '/Users/jiyvn/tizen-studio/tools/sdb -s 192.168.10.181:26101 shell 0 debug TXSXgdzhCp.Viu' exited with code 1. Stdout was: ''. Stderr was: 'closed '
�[38;5;16m[AppiumDriver@60fb]�[0m Error: Command '/Users/jiyvn/tizen-studio/tools/sdb -s 192.168.10.181:26101 shell 0 debug TXSXgdzhCp.Viu' exited with code 1
�[38;5;16m[AppiumDriver@60fb]�[0m at ChildProcess. (/Users/jiyvn/.appium/node_modules/appium-tizen-tv-driver/node_modules/teen_process/lib/exec.js:128:19)
�[38;5;16m[AppiumDriver@60fb]�[0m at ChildProcess.emit (node:events:518:28)
�[38;5;16m[AppiumDriver@60fb]�[0m at maybeClose (node:internal/child_process:1105:16)
�[38;5;16m[AppiumDriver@60fb]�[0m at Process.ChildProcess._handle.onexit (node:internal/child_process:305:5)
�[38;5;0m[HTTP]�[0m �[37m<-- POST /session �[39m�[31m500�[39m �[90m15122 ms - 876�[39m
�[38;5;0m[HTTP]�[0m �[90m�[39m

the app should be debuggable as using the same wgt
https://github.com/headspinio/appium-tizen-tv-driver/blob/main/packages/appium-tizen-tv-driver/README.md#troubleshooting

A similar issue was reported before in repo Samsung/appium-tizen-driver, so that's why I report here
Samsung/appium-tizen-driver#10

@KazuCocoa
Copy link
Contributor

appium:rcOnly caps would help. Then it skips

const localDebugPort = await this.setupDebugger(caps);

@Jiyvn
Copy link
Author

Jiyvn commented Mar 21, 2024

thank you @KazuCocoa. I am able to connect to the tv after setting appium:rcOnly to true, but unfortunately, our app is web-based.
image

@KazuCocoa
Copy link
Contributor

KazuCocoa commented Mar 21, 2024

Then, so far, it looks like the debug command is used to get debug port by the test target to attach to a chromedriver session. Perhaps... if we have a way to detect a method to get the app's debug port somehow, it will be able to skip.
For example useOpenDebugPort capability is it. If you already know the debug port on the tv device, it will let you skip the debug command

caps.useOpenDebugPort ||
(await debugApp(
/** @type {import('type-fest').SetRequired<typeof caps, 'appPackage'>} */ (caps)
));

If no, this driver would not work in such environment unfortunately

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

2 participants