Search code examples
macostizentizen-web-apptizen-wearable-sdksamsung-galaxy-gear

SIGNATURE_INVALID when trying to install application on Samsung Gear 2


After registering with samsung for a developer certificate i can't install my application, i'm getting SIGNATURE_INVALID (code 22).

The application can be anything, including a hello world app from the IDE wizard.

What's interesting is that before getting an email back from Samsung and instaling the key, I have deployed a hello world app and it worked. Can't duplicate this no more.

Log from the IDE:

Launching the Tizen application...
# If you want to see the detailed information,
# please set the logging level to DEBUG in Preferences and check the log file in '(...)'.

[Initializing the launch environment...]
    RDS: On
    Target information: SM-R380
    Application information: Id(p8BYHTMfs6.Pilot), Package Name(p8BYHTMfs6), Project Name(Pilot)
[Transferring the package...]
    Repackaging is in progress before the package transfer.
    Transferred the package: (...)/tizen/Pilot.wgt -> /opt/usr/apps/tmp
[Stopping running application...]
[Installing the package...]
path is /opt/usr/apps/tmp/Pilot.wgt
start process (install)
....
error : 22

end process (fail)
processing result : SIGNATURE_INVALID [22] failed
spend time for pkgcmd is [1798]ms
cmd_ret:22
[Transferring the package...]
    Repackaging is in progress before the package transfer.
    Transferred the package: (...)/tizen/Pilot.wgt -> /opt/usr/apps/tmp
path is /opt/usr/apps/tmp/Pilot.wgt
start process (install)
....
error : 22

end process (fail)
processing result : SIGNATURE_INVALID [22] failed
spend time for pkgcmd is [1824]ms
cmd_ret:22
Unexpected stop progress...
(12.17 sec)

And when trying with sdb:

$ sdb install Pilot.wgt

pushed                      Pilot.wgt   100%          3MB
1 file(s) pushed. 0 file(s) skipped.
Pilot.wgt                        2813 KB/s (3512786 bytes in 1.219s)
path is /opt/usr/apps/tmp/Pilot.wgt
__return_cb req_id[1] pkg_type[wgt] pkgid[p8BYHTMfs6] key[start] val[install]
__return_cb req_id[1] pkg_type[wgt] pkgid[p8BYHTMfs6] key[install_percent] val[3]
__return_cb req_id[1] pkg_type[wgt] pkgid[p8BYHTMfs6] key[install_percent] val[22]
__return_cb req_id[1] pkg_type[wgt] pkgid[p8BYHTMfs6] key[install_percent] val[25]
__return_cb req_id[1] pkg_type[wgt] pkgid[p8BYHTMfs6] key[install_percent] val[33]
__return_cb req_id[1] pkg_type[wgt] pkgid[p8BYHTMfs6] key[error] val[22]
__return_cb req_id[1] pkg_type[wgt] pkgid[p8BYHTMfs6] key[end] val[fail]
processing result : SIGNATURE_INVALID [22] failed
spend time for pkgcmd is [1758]ms

Interesting things from the log:

[2014.09.02 16:53:58][WARN ] SignCommand.java(91) - Cannot remove a file. Path : (...)/tizen/.build/Result Resource Layer/author-signature.xml
[2014.09.02 16:53:58][WARN ] SignCommand.java(91) - Cannot remove a file. Path : (...)/tizen/.build/Result Resource Layer/signature1.xml

(...)

[2014.09.02 16:54:06][DEBUG] SdbCommand.java(203) - $ /usr/bin/pkgcmd -i -q -t wgt -p "/opt/usr/apps/tmp/Pilot.wgt"
[2014.09.02 16:54:08][DEBUG] SdbCommand.java(203) - $ rm -f /opt/usr/apps/tmp/Pilot.wgt
[2014.09.02 16:54:08][DEBUG] ZimLaunchDelegate.java(240) -
Error code: SIGNATURE_INVALID
Error message:
Command: /usr/bin/pkgcmd -i -q -t wgt -p "/opt/usr/apps/tmp/Pilot.wgt"
Management: Check author certificates in Preferences > Tizen SDK > Secure Profiles > Profile items.

[2014.09.02 16:54:08][DEBUG] LaunchesListener.java(187) - removed - project: Pilot, device serial: 529f31b34100626c
[2014.09.02 16:54:08][PERFORM_E] ZimLaunchDelegate.java(277) - [Category: web.launch] at 2014-09-02 16:54:08.967         [12170(ms)]

Some of the things i tried:

  • The certificate is for the correct device id, generated by the IDE. Tried two times to sign with Samsung.
  • The certificate is automaticaly copied to gear's /home/developer.
  • I can install the sample .wgt files using sdb.
  • The project was cleaned multiple times, IDE and Gear restarted, Gear has been reset.

My system:

  • OSX Mountain Lion
  • Tizen IDE from install manager tizen-wearable-sdk-2.2.151_macos64.bin (current)
  • Tizen SDK for Wearable, Version : 1.0.0b2, Build id : 20140411-1445 (current)
  • Samsung Gear 2 (SM-R380), firmware R380XXU0BNE5 (current)

Any idea on how to fix my setup to be able to develop again?


Solution

  • Sigh.. now i know what i did not check - removing the workspace metadata fixed the setup. Great way to waste a day.

    If anyone is interested, the workspace was not even used (projects remained in separate dirs)