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

Tizen driver available commands do not work for TV devices, exited with code 1'; Stderr: 'closed'; #10

Open
pkebets opened this issue Sep 6, 2018 · 8 comments
Labels
enhancement New feature or request

Comments

@pkebets
Copy link

pkebets commented Sep 6, 2018

The problem

The commands tizen driver offers us do not work for TV devices. Every connection to real tizen TV device is followed by "Getting install status for 'appPackage'" command. This and other available commands are executed over "sdb shell".
"sdb shell" is not supported neither by TV emulators nor by real TV devices, unless real TV device has "debug firmware installed".
According to what I see from Appium server log, tizen driver executes 'sdb shell' scripts directly against device and throws "sdb shell ... exited with code 1'; Stderr: 'closed';".
It will never work since it is blocked by TV firmware. The only way it could be done is over socket connection, I see some JS code related to socket connection but most likely the requests to the device are not going through the socket.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.9.0
  • Last Appium version that did not exhibit the issue (if applicable): -
  • Desktop OS/version used to run Appium: Windows 10
  • Node.js version (unless using Appium.app|exe): 5.6.0
  • Mobile platform/version under test: Tizen 3.0, same behavior for Tizen 2.3 and Tizen 4.0
  • Real device or emulator/simulator: Real Tizen TV Devices and Tizen TV emulators
  • Appium CLI or Appium.app|exe:

Link to Appium logs

GIST

Code To Reproduce Issue [ Good To Have ]

To repro the issue it is enough to start Appium server 1.9.0 with capabilities
{
"appPackage": "sample",
"deviceName": "Tizen",
"platformName": "Tizen"
}

@pkebets pkebets changed the title Tizen driver available commands do not work, exited with code 1'; Stderr: 'closed'; Tizen driver available commands do not work for TV devices, exited with code 1'; Stderr: 'closed'; Sep 6, 2018
@luhuangAccedo
Copy link

luhuangAccedo commented Sep 7, 2018

@pkebets I have also tried this driver on sTV devices but failed. Here is my finding please see if they are helpful.

Environment

  • Windows 10
  • Tizen IDE 2.4rev8 with Tizen TV partner extension

Because I don't have any real device with dev firmware so I tested on the emulator which sdb shell enabled. However, my blocker is the app_launcher command:

sdb shell
sh-3.2$ app_launcher --list | grep
sh: app_launcher: command not found

I can only find following info about this command:
https://wiki.tizen.org/Installing_Web_Applications_on_Tizen:Common_and_Tizen_IVI

As the driver lack of documentation I guess it only works on devices with Tizen IVI or another Tizen 3 profiles?

@pkebets
Copy link
Author

pkebets commented Sep 7, 2018

@luhuangAccedo the Tizen IDE 2.4rev8 you are using is the old one, it could only be used for Tizens 2.3-2.4
I have a suspicion that you are using tizen mobile emulator, rather than tizen TV emulator.
sdb shell is available on mobile emulators, but not on TV emulators, correct me I am I wrong regarding emulators.

@luhuangAccedo
Copy link

luhuangAccedo commented Sep 7, 2018

Hi @pkebets above mentioned IDE version and partner TV emulator is the last combination with sdb shell enabled, haven't seen any sdb shell enabled on Tizen studio TV emulators that's why I use the old one (Please let me know if ANY!!!). As I just want to check if this driver works on TV profile.

sdb capability
secure_protocol:enabled
intershell_support:enabled
filesync_support:pushpull
usbproto_support:disabled
sockproto_support:enabled
syncwinsz_support:enabled
rootonoff_support:enabled
zone_support:disabled
multiuser_support:disabled
cpu_arch:x86
profile_name:tv
vendor_name:Samsung
can_launch:tv-samsung-public_-_tv-samsung-partner
platform_version:2.4.0
product_version:2.0
sdbd_version:2.2.31
sdbd_plugin_version:1.0.0
sdbd_cap_version:1.0

My point is, even with sdb shell works, I strongly doubt this driver will work for TV profile.

@anirudh552
Copy link

@pkebets @luhuangAccedo My general observation after seeing this driver is, It might not support TV platforms. Very first thing SDB Shell is disabled for all the latest Tv emulators and Hardware Tv's other than those real Tv's which have dev firmware.
It is using Ui Automator tool for finding elements and i dont think that can be applicable for TV.
Other thing, if you look at the src folder you have classes for Hardware keys and keyboard keys but none of them have implementation for TV remote keys.

They are using websocket connection, which can be used to get TV remote connection and use the remote keys, but i have not seen that implementation anywhere in the project.

@luhuangAccedo
Copy link

Thanks @anirudh552 !

@rookiejava
Copy link
Contributor

Yes. As you already know, current Tizen TV is not support SDB shell due to internal security policy. Of course, there is also a shell-enabled partner emulator, but this project does not cover that part yet. I hope to be supported on TV soon, and I will open this issue until it is resolved. Thanks!

@rookiejava rookiejava added the enhancement New feature or request label Oct 11, 2018
@anushachavan
Copy link

@rookiejava could you please help us with some info here. We are still facing issue with sdb for Samsung Tizen TV 2015 "Tizen driver available commands do not work for TV devices, exited with code 1'; Stderr: 'closed'; " . Trying to do test automation using Appium but it pop up error "An unknown server-side error occurred while processing the command. Original error: Error finding if app is installed. Original error: Error executing sdbExec. Original error: 'Command 'C:\Tizen\tools\sdb.exe -s emulator-26101 shell 'app_launcher --list | grep tizen.Calendar'' exited with code 1'; Stderr: 'closed'; Code: '1'". Suspecting this error is because of SDB for working on TV.Some info here would be of great help.

@mohammadarif87
Copy link

I would also like to get help getting this up and running. I am seeing the same error:

ERR! SDB Error finding if app is installed. Original error: Error executing sdbExec. Original error: 'Command '/Users/mohammadarif/tizen-studio/tools/sdb -s 192.168.1.66:26101 shell 'app_launcher --list | grep 30bs8OivHb.CDTVSamsungTemplate'' exited with code 1'; Stderr: 'closed'; Code: '1'

What does the Stderr: 'closed' mean? I can't seem to find anything about how to change this

If I type sdb -s 192.168.1.66 shell 0 applist then I see a successful list of apps appear and 30bs8OivHb.CDTVSamsungTemplate is correctly on the list

If I type sdb -s 192.168.1.66:26101 shell 0 was_execute 30bs8OivHb.CDTVSamsungTemplate the TV successfully launches the installed app.

Anyone know if its possible for the driver to use the was_execute command or something? I'm having no luck at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants