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

Error when running wits-start #5

Open
jfrux opened this issue Feb 25, 2021 · 8 comments
Open

Error when running wits-start #5

jfrux opened this issue Feb 25, 2021 · 8 comments

Comments

@jfrux
Copy link

jfrux commented Feb 25, 2021

Everything else seems to be working great... except when I run wits-start

Please advise...

[webide-common-tizentv]projectHelper.buildWidget() profilePath = /Users/170510/tizen-studio-data/profile/profiles.xml, excludeFiles = undefined
(node:52043) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '$' of undefined
    at Object.getProfileItems (/Users/170510/Projects/TizenTestProject/node_modules/@tizentv/webide-common-tizentv/lib/profileEditor.js:227:59)
    at PackageSigner.setProfile (/Users/170510/Projects/TizenTestProject/node_modules/@tizentv/webide-common-tizentv/lib/packageSigner.js:154:35)
    at /Users/170510/Projects/TizenTestProject/node_modules/@tizentv/webide-common-tizentv/lib/projectHelper.js:116:29
    at new Promise (<anonymous>)
    at TVWebApp.buildWidget (/Users/170510/Projects/TizenTestProject/node_modules/@tizentv/webide-common-tizentv/lib/projectHelper.js:108:15)
    at Object.buildPackage (/Users/170510/Projects/TizenTestProject/node_modules/@tizentv/wits/lib/hostAppHelper.js:62:23)
    at Object.run (/Users/170510/Projects/TizenTestProject/node_modules/@tizentv/wits/command/start.js:31:14)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:52043) 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: 2)
(node:52043) [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.
@zLupa
Copy link

zLupa commented Sep 10, 2021

Hello, did you solved this error? I think it's something with Certificates.
For some reason, in my SamsungCertificates folder, the .pwd files don't exist, only the .p12.

@zLupa
Copy link

zLupa commented Sep 10, 2021

How to solve:

PKCS#12 MAC could not be verified. Invalid password?
(node:171193) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'privateKey' of null

Seems that the passwords aren't stored in .pwd files, they're stored in some kind of "secret-tool".
Path of the tool in Linux: "/home/<YOUR_USER>/tizen-studio/tools/certificate-encryptor/secret-tool".
I used this command to set the password:

/home/<YOUR USER>/tizen-studio/tools/certificate-encryptor/secret-tool store --label="tizen-studio" --password <YOUR CERTIFICATE PASSWORD>  keyfile <YOUR KEY FILE> tool certificate-manager

Then, you create for distributor and for author.
You can find your key file in profiles.xml (/home//tizen-studio-data/profile/profiles.xml) in the password attribute of every profileitem.

@chiragkataria22
Copy link

chiragkataria22 commented May 27, 2022

@zLupa Hi
Did you solve this issue?

PKCS#12 MAC could not be verified. Invalid password?
(node:171193) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'privateKey' of null

I am also stuck on the same issue.

@pwsses
Copy link

pwsses commented May 27, 2022

@chiragkataria22 Hello. Would you share your development env?
Such as version of platform, tizentv version? Whether set to Active Profile on Certificate manage commend or not

@chiragkataria22
Copy link

@pwsses Hi
This is the package.json of my project

{ "name": "helloworld", "version": "1.0.0", "description": "", "main": "", "scripts": { "build": "webpack --watch", "wits-init": "wits --init", "wits-start": "wits --start", "wits-watch": "wits --watch" }, "author": "", "license": "ISC", "devDependencies": { "@types/tizen-common-web": "^1.0.0", "@types/tizen-tv-webapis": "^1.0.0", "file-loader": "^6.0.0", "ts-loader": "^6.2.1", "typescript": "^3.6.4", "webpack": "^4.41.2", "webpack-cli": "^3.3.11" }, "dependencies": { "@tizentv/webide-common-tizentv": "^1.0.12", "@tizentv/wits": "^2.2.0", "tizen-common-web": "^1.0.0", "tizen-tv-webapis": "^1.0.0" } }

Certificate is being created via samsung account. There is only single profile in profiles.xml. Emulator is also installed
OS - Linux

@zLupa
Copy link

zLupa commented May 27, 2022

@zLupa Hi Did you solve this issue?

PKCS#12 MAC could not be verified. Invalid password? (node:171193) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'privateKey' of null

I am also stuck on the same issue.

Yep, see my last comment

@chiragkataria22
Copy link

@zLupa

Tried the above command for both author and distributor. But that too didn't work. Still getting this error.

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

[webide-common-tizentv]projectHelper.buildWidget() profilePath = /home/chirag/tizen-studio-data/profile/profiles.xml, excludeFiles = undefined
[@tizentv/tools]tools.getToolPath: toolName = certificate-encryptor
cryptTool = /home/chirag/tizentv-tools/certificate-encryptor/secret-tool
PKCS#12 MAC could not be verified. Invalid password?
/home/chirag/Desktop/helloworld/node_modules/@tizentv/webide-common-tizentv/lib/packageSigner.js:180
authorSig.sign(this.profileInfo.author.privateKey, userExcludeFiles);
^

TypeError: Cannot read property 'privateKey' of null
at PackageSigner.signPackage (/home/chirag/Desktop/helloworld/node_modules/@tizentv/webide-common-tizentv/lib/packageSigner.js:180:48)

@pwsses
Copy link

pwsses commented Jun 2, 2022

@chiragkataria22
How can you create tizen profile in profiles.xml? how about make profile with wits --certificate?
And please check your linux env with Manage certificate in headless Linux systems at "https://developer.tizen.org/community/tip-tech/how-manage-certificates-and-package-applications-different-ubuntu-setups?langredirect=1"

I think this is the same issue. and It seems to be a Tizen Platform constraint on headless Linux system.
Samsung/webIDE-common-tizentv#18

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

No branches or pull requests

4 participants