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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When running wit -s or wit -w I get an error

micalexander opened this issue · comments

Error: no such file or directory .config/yarn/global/node_modules/@tizentv/wits/container/author-signature.xml

Hi,

I guess it failed during packing the application.
But just for making sure, I am asking several questions.

  1. Have you ever experienced WITs before, or for the first time?
  2. If you did "wits -i" for configuring, could you please share the .witsconfig.json file?
  3. Do you have a tizen/samsung certification?
    How to get a certification,
    1. Download Tizen Studio and get a certification
    2. Use WITs to get a certification (wits -c)

Thanks for the response.

This is my first time using WITs.

I did use wits -i to initiate the project. The witsconfig.json output is below

{
  "connectionInfo": {
    "deviceIp": "0.0.0.0",
    "socketPort": 4348,
    "width": "1920",
    "isDebugMode": true,
    "hostIp": "192.168.1.10"
  },
  "profileInfo": {
    "path": "/Users/alexanderm/.config/yarn/global/node_modules/@tizentv/wits/resource/profiles.xml"
  }
}

Yes I do have a tizen certificate. I have tried using wits -c and tizen certificate (tizen cli) both to create the certificate and neither seem to work.

I am having the same issue.

Also my first time using WITs and used wits -i to initiate.

My witsconfig.json output is below

{
  "connectionInfo": {
    "deviceIp": "0.0.0.0",
    "socketPort": 6450,
    "width": "1920",
    "isDebugMode": true,
    "hostIp": "192.168.0.122"
  },
  "profileInfo": {
    "path": "/Users/christiep/tizen-studio-data/profile/profiles.xml"
  }
}

@micalexander
Hi
Could you please open the profiles.xml and check if <profiles active="yourprofile" version="3.1"> exists?
/Users/alexanderm/.config/yarn/global/node_modules/@tizentv/wits/resource/profiles.xml

And one more thing, I can see you've set deviceIp as 0.0.0.0, It means the application should be launched on the emulator.
Are you using WITs on the emulator?

If you can attach full logs It would be helpful for debugging.

@PChristie37
Hi

I can see you have a certification from the Tizen Studio.
Are you using an emulator as a target?
And could you please share the whole logs when you've got the error?

@prozanne
Yes trying to target the emulator that is running before doing wits -s

Full log is

[webide-common-tizentv]projectHelper.buildWidget() profilePath = /Users/christiep/tizen-studio-data/profile/profiles.xml, excludeFiles = undefined
node:events:304
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, open '/Users/christiep/Wits/container/author-signature.xml'
Emitted 'error' event on ReadStream instance at:
    at emitErrorNT (node:internal/streams/destroy:194:8)
    at emitErrorCloseNT (node:internal/streams/destroy:159:3)
    at processTicksAndRejections (node:internal/process/task_queues:80:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/christiep/Wits/container/author-signature.xml'
}

@PChristie37
Hmmm I can't reproduce the issue what you've got.

One thing I wonder is.....
Can you tell me what method did you do for installing WITs?

  1. npm install -g @tizentv/wits
    (Linux : /usr/lib/node_modules/@tizentv/wits)
    (Mac : /usr/local/lib/node_modules/@tizentv/wits)

  2. clone Wits to /Users/christiep/ from github

If you did 2nd method for installing it, could you try with npm again?
npm install -g @tizentv/wits

@micalexander
Hi
I tried to make similar environment with you, and I tested it.
I used Mac, with WITs installed via yarn, and an emulator.
As my side, I couldn't reproduce it what you are faced on.

hmmm but maybe you can try this.
First, you can try giving a permission to "/Users/alexanderm/.config/yarn/global/node_modules/@tizentv/wits/container".
The error message seems "author-signature.xml" file wasn't moved to container.
Could you please try it?

Sorry for inconvenience.

@prozanne
So I took into consideration everything and messed around with some permissions and have now run into this error.
I removed the cloned repo, installed via npm globally, and gave permissions to "/node_modules/@tizentv/wits/container"

Thanks for all the help!

[webide-common-tizentv]projectHelper.buildWidget() profilePath = /Users/christiep/tizen-studio-data/profile/profiles.xml, excludeFiles = undefined
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
/usr/local/lib/node_modules/@tizentv/wits/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 (/usr/local/lib/node_modules/@tizentv/wits/node_modules/@tizentv/webide-common-tizentv/lib/packageSigner.js:180:48)
    at /usr/local/lib/node_modules/@tizentv/wits/node_modules/@tizentv/webide-common-tizentv/lib/projectHelper.js:117:23
    at processTicksAndRejections (node:internal/process/task_queues:93:5)

@prozanne

@micalexander
Hi
Could you please open the profiles.xml and check if <profiles active="yourprofile" version="3.1"> exists?
/Users/alexanderm/.config/yarn/global/node_modules/@tizentv/wits/resource/profiles.xml

And one more thing, I can see you've set deviceIp as 0.0.0.0, It means the application should be launched on the emulator.
Are you using WITs on the emulator?

If you can attach full logs It would be helpful for debugging.

Yes it does show <profiles active="myprofile" version="3.1">

After debugging the issue myself for a while I seem to have found the issue. It seems like a race condition was happening on my machine. I created a pull request that should resolve the issue as it has resolved it for me.

The pull request was added to a dependency repo of WITs.

@micalexander
That sounds awesome.
Thanks for pull requesting.
I will talk about it to the owner of Samsung/webIDE-common-tizentv.

Thanks!

@PChristie37

Hi, Thanks for your effort.
I'm asking about the issue to "webide-common-tizentv",
I will let you know after figuring out something!
Thanks and sorry for inconvenience!

@micalexander
Hi, I heard that Samsung/webIDE-common-tizentv has released.
WITs has updated to v2.4.7 as well.
Please update to the latest version of WITs.

But the issue will keep opened till resolving the other issue reported by PChristie37.

Thanks.
Have a nice day.

@prozanne
Thank you for all the help again, I seem to be getting closer. When running wits -s now, I am running into this error:

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

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

      > [ Stored Information ]

      > baseAppPath  : /Users/christiep/SilverSneakersSamsung/web-build
      > width        : 1920
      > deviceIp     : 0.0.0.0
      > isDebugMode  : true

      > profile path : /Users/christiep/.config/yarn/global/node_modules/@tizentv/wits/resource/profiles.xml
      > hostIp       : 192.168.0.122

content src is : index.html

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

[webide-common-tizentv]projectHelper.buildWidget() profilePath = /Users/christiep/.config/yarn/global/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

install SilverSneakersSamsungWITs
package_path /home/owner/share/tmp/sdk_tools/WITs.wgt
app_id[SilverSneakersSamsungWITs] install start
app_id[SilverSneakersSamsungWITs] installing[10]
app_id[SilverSneakersSamsungWITs] installing[13]
app_id[SilverSneakersSamsungWITs] installing[15]
app_id[SilverSneakersSamsungWITs] installing[18]
app_id[SilverSneakersSamsungWITs] installing[21]
app_id[SilverSneakersSamsungWITs] installing[23]
app_id[SilverSneakersSamsungWITs] installing[26]
app_id[SilverSneakersSamsungWITs] installing[28]
app_id[SilverSneakersSamsungWITs] installing[31]
app_id[SilverSneakersSamsungWITs] installing[34]
app_id[SilverSneakersSamsungWITs] installing[36]
app_id[SilverSneakersSamsungWITs] installing[39]
app_id[SilverSneakersSamsungWITs] installing[42]
app_id[SilverSneakersSamsungWITs] installing[44]
app_id[SilverSneakersSamsungWITs] installing[47]
app_id[SilverSneakersSamsungWITs] installing[50]
app_id[SilverSneakersSamsungWITs] installing[52]
app_id[SilverSneakersSamsungWITs] installing[55]
app_id[SilverSneakersSamsungWITs] installing[57]
app_id[SilverSneakersSamsungWITs] installing[60]
app_id[SilverSneakersSamsungWITs] installing[63]
app_id[SilverSneakersSamsungWITs] installing[65]
app_id[SilverSneakersSamsungWITs] installing[68]
app_id[SilverSneakersSamsungWITs] installing[71]
app_id[SilverSneakersSamsungWITs] installing[73]
app_id[SilverSneakersSamsungWITs] installing[76]
app_id[SilverSneakersSamsungWITs] installing[78]
app_id[SilverSneakersSamsungWITs] installing[81]
app_id[SilverSneakersSamsungWITs] install failed[118, -1], reason: General error :
spend time for wascmd is [22573]ms


Failed to install Wits

Hi!
It seems the certification is invalid.
Maybe you can get another certification and try with it again.

(With invalid certification, the application could be packaged,
but actually it can be failed to install the target.
I think when creating a certification It might not have done successfully.)

And for sure, I can see you are using WITs for making a certification,
we use "webide-common-tizentv" module for creating it, and I know they use "secret-tool" on Linux.
And sometimes "secret-tool" is the matter on the latest version of the Linux.
Was there no suspect error logs when you create a certification? Something like "Failed to store KeyValuePairs:"

After trying again If you are still in the problem though,
Could you please give me logs when you do "wits -c" please?

Hi!
I heard the issue was already known in Tizen Studio too, and I was guided to do below steps.
Perhaps, have you already done it?
Then, just try getting another certification and running application again!

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

Oh and, If you are still in a problem,
I see you already have a Tizen Studio, so you can try making a certification from there and set profilePath of WITs to "/Users/christiep/tizen-studio-data/profile/profiles.xml" too.

When I asked the issue to Tizen Studio, he queried file paths in "profiles.xml" really exist.

for example, whether /usr/lib/node_modules/@tizentv/wits/resource/Author/helloworld.p12 exists
<profile name="helloworld">
    <profileitem ca="/root/tizentv-tools/certificate-generator/certificates/developer/tizen-developer-ca.cer" distributor="0" key="/usr/lib/node_modules/@tizentv/wits/resource/Author/helloworld.p12" password="/usr/lib/node_modules/@tizentv/wits/resource/Author/helloworld.pwd" rootca=""/>
    <profileitem ca="/root/tizentv-tools/certificate-generator/certificates/distributor/sdk-partner/tizen-distributor-ca.cer" distributor="1" key="/root/tizentv-tools/certificate-generator/certificates/distributor/sdk-partner/tizen-distributor-signer.p12" password="/root/tizentv-tools/certificate-generator/certificates/distributor/sdk-partner/tizen-distributor-signer.pwd" rootca=""/>
    <profileitem ca="" distributor="2" key="" password="" rootca=""/>
  </profile>

Hi @PChristie37
I am also getting this error after running wits start

[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)
at /home/chirag/Desktop/helloworld/node_modules/@tizentv/webide-common-tizentv/lib/projectHelper.js:117:23

Can you please tell how to resolve this one? I am new to tizen and stuck in this.