Samsung / webIDE-common-tizentv

This is a common lib project for VScode/Atom extension and Wits, providing build, install, launch web project and certificate manager.
Apache License 2.0
11 stars 12 forks source link

`decryptPassword` of `cryptUtil.js` throws exception on Linux #18

Open heonie opened 3 years ago

heonie commented 3 years ago

I'm testing this on this environment:

When I call the buildWidget of the TVWebApp class, it throws an exception. Here's the log from the console.

[webide-common-tizentv]projectHelper.buildWidget() profilePath = /home/heonie/tizen-studio-data/profile/profiles.xml, excludeFiles = undefined
[@tizentv/tools]tools.getToolPath: toolName = certificate-encryptor
cryptTool = /home/heonie/tizentv-tools/certificate-encryptor/secret-tool
PKCS#12 MAC could not be verified. Invalid password?
(node:19791) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'privateKey' of null
    at PackageSigner.signPackage (/home/heonie/workspace/SampleApp/node_modules/@tizentv/webide-common-tizentv/lib/packageSigner.js:180:48)
    at /home/heonie/workspace/SampleApp/node_modules/@tizentv/webide-common-tizentv/lib/projectHelper.js:117:23
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:19791) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:19791) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Done in 0.69s.

As I run the secret-tool which is the certificate-encryptor of the Linux on the bash, it shows error like below:

heonie@heonie-VirtualBox:~/workspace/SampleApp$ /home/heonie/tizentv-tools/certificate-encryptor/secret-tool lookup --label="tizen-studio" keyfile /home/heonie/tizencert/tizen_author.pwd tool certificate-manager
ERROR 2021/03/24 17:02:40 lookup.go:51: secret not found in keyring
heonie@heonie-VirtualBox:~/workspace/SampleApp$ 

I can sign and package the application with Tizen Studio or tizen-cli with the activated certification profile. So, I believe this is not related to the wrong certification profile.

prozanne commented 3 years ago

Hi, the issue has been shown frequently on Ubuntu environment, I know that Tizen studio is using the way to encrypt / decrypt password with gnome-keyring. And the official guide says It should be enabled before using.

https://developer.tizen.org/community/tip-tech/how-manage-certificates-and-package-applications-different-ubuntu-setups?langswitch=en

Could you please try this solution? If you are still in problem, please let me know.