Samsung / Wits

Wits for Your Tizen web application development.It will saved your development times and bring pleasure of developing out. Using Wits, You can instantly RELOAD your app's JavaScript/CSS code instead of reinstalling your app every time you make a change.
Apache License 2.0
114 stars 25 forks source link

Failed to install WITs #90

Closed DavidCrandall-charter closed 3 years ago

DavidCrandall-charter commented 3 years ago

So, I think I have everything set up right in my permissions per this and I can make a 'wgt' file independently with the 'tizen command. So, certificates look right.

https://developer.samsung.com/smarttv/develop/getting-started/using-sdk/command-line-interface.html

However, I try to do

wits -s

...and with a little bit of enhanced logging magic (setting {silent: false} where needed in the library), I get this.

Start running Wits............

[@tizentv/tools]tools.getToolPath: toolName = sdb

      > [ Stored Information ]

      > baseAppPath  : /Users/p2713850/samsung-tv/samsung-tizen-wrapper
      > width        : 1280
      > deviceIp     : 192.168.2.3
      > isDebugMode  : false

      > profile path : /Users/p2713850/profiles.xml
      > hostIp       : 192.168.2.1

connect to....192.168.2.3
Success to connect 192.168.2.3
content src is : index.html

Start packaging Samsung Tizen TV Platform......

[webide-common-tizentv]projectHelper.buildWidget() profilePath = /Users/p2713850/profiles.xml, excludeFiles = undefined
After build package, signature tempory files were removed
[webide-common-tizentv]projectHelper.widget.on(): Build Package completed!
============================== Build Package completed!

============================== Start to install the package

[warning] Failed to uninstall Wits, yo. /Users/p2713850/tizentv-tools/sdb/sdb -s 192.168.2.3:26101 shell 0 vd_appuninstall TizenWrapperWITs 
uninstall TizenWrapperWITs
app_id[TizenWrapperWITs] uninstall start
app_id[TizenWrapperWITs] uninstall failed[132]
spend time for wascmd is [8]ms
cmd_ret:0

Failed to install Wits /Users/p2713850/tizentv-tools/sdb/sdb -s 192.168.2.3:26101 shell 0 vd_appinstall TizenWrapperWITs /home/owner/share/tmp/sdk_tools/WITs.wgt 
install TizenWrapperWITs
package_path /home/owner/share/tmp/sdk_tools/WITs.wgt
was_install_app return WAS_TRUE
app_id[TizenWrapperWITs] install start
app_id[TizenWrapperWITs] installing[10]
app_id[TizenWrapperWITs] installing[12]
app_id[TizenWrapperWITs] installing[15]
app_id[TizenWrapperWITs] installing[17]
app_id[TizenWrapperWITs] installing[20]
app_id[TizenWrapperWITs] installing[22]
app_id[TizenWrapperWITs] installing[25]
app_id[TizenWrapperWITs] install failed[118, -12], reason: Check certificate error : :Invalid certificate chain with certificate in signature.:<-3>
spend time for wascmd is [765]ms
cmd_ret:0
➜  samsung-tizen-wrapper git:(master) ✗ 

Now, my one concern is that I may not have this connected, however if I do:

sdb devices

I show connected to my TV.

So that can't be. Certificate looks right. Connection to the TV looks right (checked IP pairing).

prozanne commented 3 years ago

Hi,

Even though packaging is done and connection is good, the certification can be a matter. (When certification is created, it needs a DUID information. So unknown can't install an application to your device.) Could you please check you pushed your certification to your target device?

You can refer below guide of Tizen Studio. (Search "Permit to install applications") https://developer.samsung.com/smarttv/develop/getting-started/using-sdk/command-line-interface.html

If you are still in a problem, please let me know.

Thanks.

DavidCrandall-charter commented 3 years ago

Thank you for the quick response! I really appreciate it.

Ok, did the tizen studio 'permit to install applications' -

Screen Shot 2020-12-30 at 9 30 30 AM

However, I'm still getting some level of failure. I'm also getting warnings on sdb version mismatches between 4.2.16 (client) and 4.2.11 (server) today. The version mismatch is new, so I'm not sure what I'm doing. I'm running with a QN43Q60 and I did check for updates.

Here's basically a really verbose output of what I'm having issues with... whatever.txt (basically the same error)

Also - is there a command-line way to certify/upload a certificate to the TV? Basically I'm trying to automate and simplify pushing an application without using any sort of a graphical user interface, if I can avoid it.

Also - one last question, there isn't a list of sdb shell commands, like vd_appuninstall , somewhere, is there?

prozanne commented 3 years ago

Hi!

Now it seems ready for installing an application, but I am still thinking there is an issue of a certification. Could you please check when you create a basicProject on the Tizen studio, It could be installed on your target? (Check with Run as). If it works, please set a profile path of WITs to the path worked well at the Tizen Studio. And try WITs again. It's just for making sure that your environment works well originally. Because basically WITs uses sdb for installing an application just like Tizen studio does. And as I know.... the sdb version mismatches error is not a fatal error, It might be a just warning.

And about the 2nd question, I am not working for Tizen Studio, so I am not sure. But I think It's not supported. And I know It's so necessary feature for using only CLI without GUI. So WITs is considering to support the feature in the future. (TBD)

About the last one, I only found an official SDB Guide this guide.

Thanks.

DavidCrandall-charter commented 3 years ago

Ah, that got it. Thank you! Happy New Year!

So, I had to put the profile path to the one generated by the tizen studio certificate manager. The certificates we use are 'Samsung' certificates and not 'Tizen' ones (it's like, Samsung->'TV'->generate-> login->fill-in DUID in Tizen studio). I think I can kind of get around a lot of our needs with Tizen studio, but it still seems like we need Tizen Studio and can't run as headless as we would like. I think we might still have to use the 'permit to install applications' at a bare minimum.

I really appreciate this tool. It helps greatly.

One thing I've had to do is put the silent: false flags up on some of the execSync commands. Even if that doesn't state the exact problem, it's still useful to have verbose output.

prozanne commented 3 years ago

Hi 👍 Thanks! Happy New Year~

We are also considering and addressing to be independent from Tizen Studio. Sorry for inconvenience until now, we will update it gradually.

And also, for debugging, we will consider supporting a verbose option not to make you change a source code directly! Thanks. Have a nice day.

serkanbektas commented 3 years ago

This issue seems to closable but I got same error message with different problem.

I got "Failed to install Wits" error after Failed to uninstall Wits warning.

There isnt any bug report else.

⇒ wits -s
 _      ____________
| | /| / /  _/_  __/__
| |/ |/ // /  / / (_-<
|__/|__/___/ /_/ /___/

Start running Wits............

[@tizentv/tools]tools.getToolPath: toolName = sdb

      > [ Stored Information ]

      > baseAppPath  : /Users/serkan/Works/smart/src
      > width        : 1920
      > deviceIp     : 192.168.1.38
      > isDebugMode  : true

      > profile path : /Users/serkan/.nvm/versions/node/v15.2.1/lib/node_modules/@tizentv/wits/resource/profiles.xml
      > hostIp       : 192.168.1.102

connect to....192.168.1.38
Success to connect 192.168.1.38
content src is : index.html

Start packaging Samsung Tizen TV Platform......

[webide-common-tizentv]projectHelper.buildWidget() profilePath = /Users/serkan/.nvm/versions/node/v15.2.1/lib/node_modules/@tizentv/wits/resource/profiles.xml, excludeFiles = undefined
After build package, signature tempory files were removed
[webide-common-tizentv]projectHelper.widget.on(): Build Package completed!
============================== Build Package completed!

============================== Start to install the package

[warning] Failed to uninstall Wits

Failed to install Wits
prozanne commented 3 years ago

Hi!

First, happy new year! And sorry for late reply.

Could you please let me know which tizen certification you created? (public/partner)

If you chose a tizen partner level, as I checked from Tizen Studio team, the security policy was changed not to support Tizen Partner anymore. For this reason, unfortunately if you want to use "partner" level apis you should use only Samsung Partner certification which is not supported on WITs yet.

So, I think you have 2 options. You can switch to public level of tizen certification, or please install Tizen Studio and use a partner level of Samsung certification. Sorry for inconvenience.

Or perhaps you already use a public level of tizen certification, let me know again. There might be another issue.

Best regards Rosie

serkanbektas commented 3 years ago

Hello @prozanne,

I have installation problem with Tizen Studio on Big Sur and i thought I don't need to Tizen Studio if i use Wits but i understood that way is wrong.

I've installed Tizen Studio and created required fields (certificate, profile). Now i can use Wits without an error.

Thank you.

prozanne commented 3 years ago

Sorry for inconvenience again. We are also trying to be independent from Tizen Studio. If WITs supports Samsung certification (TBD) , Tizen Studio will not be required anymore.

Thanks! And this issue will be closed!

Best regards. Rosie.