fgl27 / smarttv-twitch

Twitch client for Samsung Smart TVs 2015 and newer models, in doubt read the README bellow
GNU General Public License v3.0
170 stars 18 forks source link

Invalid password errors, installation issue #41

Closed Lutzy closed 2 years ago

Lutzy commented 5 years ago

After wasting hours getting "Invalid password" errors every time I tried to build this project (or any project for that matter), I finally figured out what was going on. I'm leaving this info here so that you can either add it to the Readme or at least someone can find this Issue via Github search.

Basically, if you follow the Readme to a T using the latest Tizen Studio, your /profiles/profiles.xml will look like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles active="strong" version="3.1">
<profile name="strong">
<profileitem ca="/home/ryan/tizen-studio/tools/certificate-generator/certificates/developer/tizen-developer-ca.cer" distributor="0" key="/home/ryan/tizen-studio-data/keystore/author/strong.p12" password="/home/ryan/tizen-studio-data/keystore/author/strong.pwd rootca=""/>
<profileitem ca="/home/ryan/tizen-studio/tools/certificate-generator/certificates/distributor/tizen-distributor-ca.cer" distributor="1" key="/home/ryan/tizen-studio/tools/certificate-generator/certificates/distributor/tizen-distributor-signer.p12" password="/home/ryan/tizen-studio-data/tools/certificate-generator/certificates/distributor/tizen-distributor-signer.pwd" rootca=""/>
<profileitem ca="" distributor="2" key="" password="" rootca=""/>
</profile>
</profiles>

But those .pwd files aren't ever created by the certificate manager and attempting to just put the correct passwords in plaintext in files with those names doesn't work. Instead, what you need to do is edit your profiles.xml accordingly:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles active="strong" version="3.1">
<profile name="strong">
<profileitem ca="/home/ryan/tizen-studio/tools/certificate-generator/certificates/developer/tizen-developer-ca.cer" distributor="0" key="/home/ryan/tizen-studio-data/keystore/author/strong.p12" password="<yourStrongPasswordHere>" rootca=""/>
<profileitem ca="/home/ryan/tizen-studio/tools/certificate-generator/certificates/distributor/tizen-distributor-ca.cer" distributor="1" key="/home/ryan/tizen-studio/tools/certificate-generator/certificates/distributor/tizen-distributor-signer.p12" password="tizenpkcs12passfordsigner" rootca=""/>
<profileitem ca="" distributor="2" key="" password="" rootca=""/>
</profile>
</profiles>

Finally, the stupid IDE will constantly attempt to overwrite these correct settings with its *.pwd garbage, so you'll need to do a chmod a-w <tizen-studio-data>/profiles/profiles.xml

Anyway, beautiful app, thanks so much for your work, but I'm hoping this will be helpful to anyone else that gets stuck using the latest Tizen Studio in Ubuntu.

auto-comment[bot] commented 5 years ago

Thank your for raising a issue. I will try and get back to you as soon as possible. Regards @fgl27

fgl27 commented 5 years ago

Yes tizen is far from be something OK to use.

On the past there was a similar problem after a tizen update, so I create this help How to create a Samsung developer certificate and send to the TV... On that time with that process one was able to install just fine, after some time tizen update again and the Tizen simple problem was back working...

The odd thing is here I'm on latest version of tizen and here it just works, and yes there is no .pwm file, I just creat a new certificate to make sure, but maybe here s because I update tizen and didn't install from scratch and there is something from old version that makes it just work

Screenshot from 2019-07-05 11-52-41

Screenshot from 2019-07-05 11-53-43

Screenshot from 2019-07-05 11-54-18

Screenshot from 2019-07-05 11-54-31

this issue can be also related to https://github.com/fgl27/smarttv-twitch/issues/16

Thanks.

Lutzy commented 5 years ago

Sure, could absolutely be something that doesn't affect everyone, but for me this was a fresh install of Ubuntu in a VM (so no previous installs or likely conflicting dependencies) and then I followed the readme. I thought maybe I messed something up, so I blew away all Tizen things and the same thing happened again.

Anyway, I imagine it won't affect everyone, but hey, one more workaround to add to the potential list of things to try. Thanks again for your work!

scotttag commented 1 year ago

This is completely broken in Tizen IDE Studio 5.0 now and not fixable with the above fix - it doesn't seem to be possible to build this any more, at least on Ubuntu IDE Studio

You get the invalid password error above on the certificate, and if you change the password in profile.xml and set chmod a-w - Tizen Studio refuses to build saying it cannot write to the profile file. If you create the (missing) .pwd files that the certificate manager creates with the correct passwords, it still errors out with the incorrect password error

Used to build fine on previous IDE versions. Unfortunately Tizen Studio also auto-updates itself once installed on Ubuntu - so even installing IDE 4.6 won't work as this auto-updates to 5.0 and breaks again before the first build