SamsungDForum / SamsungCheckout

This sample shows how to implement billing system on your application.
6 stars 6 forks source link

Unable to install sample app on tv #2

Closed rdobda-gaia closed 3 years ago

rdobda-gaia commented 3 years ago

Hi, how can i install the sample app on the tv? I tried the following

  1. Packaged a wgt using htis command: ~/tizen-studio/tools/ide/bin/tizen package -- . -t wgt -s my-cert
  2. Tried to install using this command ~/tizen-studio/tools/ide/bin/tizen install --name SamsungCheckout.wgt
  3. Get this error Transferring the package... Transferred the package: /Users/gaiaapps/Documents/code/SamsungCheckout/GeneralSampleApp/SamsungCheckout/SamsungCheckout.wgt -> /home/owner/share/tmp/sdk_tools/tmp Installing the package...

    Platform log view

    install wgt package_path /home/owner/share/tmp/sdk_tools/tmp/SamsungCheckout.wgt was_install_app return WAS_TRUE app_id[wgt] install start app_id[wgt] installing[7] app_id[wgt] installing[10] app_id[wgt] installing[13] app_id[wgt] installing[15] app_id[wgt] installing[18] app_id[wgt] installing[21] app_id[wgt] installing[23] app_id[wgt] install failed[118014] spend time for wascmd is [701]ms cmd_ret:0 Failed to install Tizen application. Total time: 00:00:01.236

rdobda-gaia commented 3 years ago

Note, the error above 118014 is "Not permitted to install this widget onto the target device with the current certificate. Either select a different certificate or ensure that your device unique ID has been added to the certificate whitelist."

When i change the app ID to something else random, i get error code 118019, which is "Your Tizen config.xml manifest file contains a restricted privilege. Remove it."

When i take the provided .wgt in the repo, i get this error 118012

Application already installed with the same ID; uninstall the existing application first. This device may not support Tizen certificate signed widget files; try re-signing your widget using a Samsung certificate. If another Samsung certificate has been pushed to this device, you may need to re-push the certificate to the device.

-- Note; the app does not appear to be installed by looking at the device, or nor though the device manager app list, and when i run ~/tizen-studio/tools/ide/bin/tizen uninstall -p 2e5U77JCpf It says The package is not exist. [Fail] Fail uninstall. There is the problem about package.

Has anyone been able to install these sample apps?

rdobda-gaia commented 3 years ago

When attempting to install this on various tv’s/developer workstations, we receive different errors. However, in one case we seem to be closer to a solution, but it still does not work. Here’s what happens:

  1. When installing the sample app on an emulator, we are able to install it; however, the sample does not work and gives an error “[SamsungCheckout] Exception: Undefined” – we assume because we need to run on an actual tv due to the payment sdk’s not being available on an emulator

  2. When attempting to install on the tv by using tizen studio and our existing “public certificate” the install fails with this message – “app_id[KdtJiSeEMh.CheckoutMovie] install failed[118, -14], reason: Signature error : :Check config.xml| - Current required_version(=api version) = 2.4, | certificate signature level = public||[MISMATCHED_PRIVILEGE_LEVEL]| - http://developer.samsung.com/privilege/sso.partner%7C >> Use at least partner signatured certificate.||:<-7>

  3. So, this leads us to believe that we need to upgrade our certificate to a “partner certificate” in order to use Samsung pay in our app. We are not sure how to do this. We tried simply creating a new partner certificate within the certificate manager, and install with that, but when installing using the partner certificate we create locally, we get a different error -- app_id[KdtJiSeEMh.CheckoutMovie] install failed[118, -12], reason: Check certificate error : :Invalid certificate chain with certificate in signature.:<-3>

  4. Note: When we use our normal non-partner certificate to install on the tv, if we remove the then it installs, but obviously does not work because this is the very tool needed to do the work. So, it seems that this privledge requires a partner certificate, but we are not sure how to acquire a valid partner certificate to do this work.

Still stuck

rdobda-gaia commented 3 years ago

Update: For some reason the certificate generator on one box seemed to be corrupt, so it did not provide the full "wizard" that allowed me to not only create a partner certificate, but also add the DUID of my device to it. So i used a different machine and i was able to create a partner cert (it properly prompted me to login to my samsung acct), and then associate the DUID. I then copied this cert to the box connected to the tv, and voila, after setting it to the default and then clicking "permit to instlal" from device manager, it seems to have worked as i was then able to install. It seems that the samsung dev environment is very fragile and quirky, especially when it comes to certs. I have no idea if there's maybe a way to "reset" the certificate manager on the offending box so it clears any old credentials and let's me do the proces, but anyway i seem to be unblocked.

mrhashcoder commented 1 year ago
install ConeKnockout
was_install_webapp return WAS_TRUE
app_id[App_Name] install start
app_id[App_Name] download failed[16]
spend time for wascmd is [51]ms

I'm Getting this issue while installing a wgt file using wascmd. Can you please suggest something you might know.

there is no app that is installed with same name or such.

Koleneko commented 1 year ago

Hey, @mrhashcoder, did you manage to fix this? Got the same problem. Would be very grateful if you could help:)