Can't create Distribute Certificate

Hello everyone!

I’ve designed a watch face for my Samsung Galaxy Classic S3 with Galaxy Watch Studio, but I’m having trouble running it on my device because I can’t get a Distribute Certificate. I got up to here:

After entering my account credentials I get this:

Any idea what it could be?

Other details:

  • I am able to get an Author Certificate
  • I have have tried connecting my watch via WiFi and SDB over BlueTooth

Did you scroll down and enter the captcha it isn’t obvious you have to do that after you enter your name and password.

Are you running Windows 7, if so you need to update Internet Explorer to the 64 bit version that installs a .DLL that the store needs.

Those are the two most common. Wait a day it seems to happen because of a cache too.

Ron
Samsung Developer Team

There is no captcha at the bottom of that:


Are we always supposed to have one?

Also:

  • I’m on Windows 10
  • I’m not sure what’s being cached, but I first got the error message a week ago

I apologize I don’t see the captcha either it must have changed. I was able to sign in and generate a new distributor certificate in the USA.

If you go to the C:\Program Files\Galaxy Watch Studio\ folder there is a file eclipsec click on it and it will create a log file of GWS. Run that and try to generate the Distributor certificate. If it fails to create a Distributor Certificate again close GWS. It will save the log in the users\username\Galaxywatchdesigner\ folder as watchface.log. Just maybe you can see something that helps probably not as I think this is a store connection issue.

Can you log into the seller portal successfully maybe you can open a 1:1 Enquiry there.

Ron
Samsung Developer Team

Interesting… I looked through the log and found this:

INFO [03/27-08:38:49,073](DistributeLoginStep.java:384) - api_server_url = eu-auth2.samsungosp.com
INFO [03/27-08:38:49,074](DistributeLoginStep.java:387) - auth_server_url = eu-auth2.samsungosp.com
DEBUG [03/27-08:38:49,084](CSRGeneratorForTizen.java:175) - Start to generate CSR for Tizen keystore...OK
DEBUG [03/27-08:38:49,085](CSRGeneratorForTizen.java:178) - generate keygen object...OK
DEBUG [03/27-08:38:49,259](CSRGeneratorForTizen.java:181) - generate keypair object...OK
DEBUG [03/27-08:38:49,260](CSRGeneratorForTizen.java:199) - generate PBE parameter set...OK
DEBUG [03/27-08:38:49,264](CSRGeneratorForTizen.java:211) - generate PKCS#8 encrypted key...OK
DEBUG [03/27-08:38:49,268](CSRGeneratorForTizen.java:241) - X509Principal param : CN=GearWatchDesigner, OU=, O=, L=, ST=, C=, EmailAddress=cadmus.to+sam.sung@gmail.com
DEBUG [03/27-08:38:49,273](CSRGeneratorForTizen.java:287) - String index out of range: -1
INFO [03/27-08:38:49,273](DistributeLoginStep.java:446) - Distributor CSR generation failed
ERROR [03/27-08:38:49,274](DistributeLoginStep.java:450) - java.lang.Exception: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at com.samsung.gwd.ui.dialog.certification.CSRGeneratorForTizen.generateCSRDistribute(CSRGeneratorForTizen.java:288)
	at com.samsung.gwd.ui.dialog.certification.DistributeLoginStep.generateCsr(DistributeLoginStep.java:440)
	at com.samsung.gwd.ui.dialog.certification.DistributeLoginStep$7.run(DistributeLoginStep.java:408)
	at org.eclipse.swt.widgets.Display.runTimer(Display.java:4033)
	at org.eclipse.swt.widgets.Display.messageProc(Display.java:3157)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2303)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3532)
	at com.samsung.gwd.ui.dialog.Dialog.open(Dialog.java:166)
	at com.samsung.gwd.action.project.DistributeCertificateAction.action(DistributeCertificateAction.java:15)
	at com.samsung.gwd.action.Action.execute(Action.java:83)
	at com.samsung.gwd.ui.preview.RunOnDevice.isRegisterdDevice(RunOnDevice.java:1284)
	at com.samsung.gwd.ui.preview.RunOnDevice.processRun(RunOnDevice.java:1022)
	at com.samsung.gwd.ui.preview.RunOnDevice$15.onItemPressed(RunOnDevice.java:747)
	at com.samsung.gwd.ui.preview.RunOnDeviceItem.mouseUp(RunOnDeviceItem.java:268)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:221)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4118)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3931)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3534)
	at com.samsung.gwd.Application._start(Application.java:385)
	at com.samsung.gwd.Application.start(Application.java:77)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1498)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(Unknown Source)
	at org.bouncycastle.asn1.x509.X509Name.<init>(Unknown Source)
	at org.bouncycastle.asn1.x509.X509Name.<init>(Unknown Source)
	at org.bouncycastle.asn1.x509.X509Name.<init>(Unknown Source)
	at org.bouncycastle.jce.X509Principal.<init>(Unknown Source)
	at com.samsung.gwd.ui.dialog.certification.CSRGeneratorForTizen.generateCSRDistribute(CSRGeneratorForTizen.java:244)
	... 34 more

You can not have a + in your user name someone else reported this earlier this month. That is the issue.

Ron
Samsung Developer Program

That’s a shame. Will that be addressed in a future update or is it not even that high in the priority list?

It may help boost the priority if you open a bug report too.

scroll to the bottom and request developer support not store report.

Ron
Samsung Developer Team

Hi everyone,

I do have the same issues to create a Distribute Certificate :frowning: I did it once, and I therefore I have a file in the keystore folder (distributer.p12) as well as an author.p12 file

If I want to generate a CSR I’m able to choose the author.p12 file which I generated yesterday already. Why I’m not able to browse my Disk and choose the distributer.p12 file from yesterday?

So I alway need to generate a “new” distributer file. But if I start doing it, there is allways the request to connect the device or to enter the devise id…

Why is there no upload function for the existing distributor file???

Btw. today it is the same file I was working at like yesterday…

My system: W10, Garmin Watch 3 frontier, GWS V2.0.0_beta

Greetings, RookieJ :cowboy_hat_face:

You only need to generate a Distributor Certificate one time for your watch (unless it is updated to a new version, paired to a new watch or something else that causes a reset).

The Author Certificates tells Samsung who you are so it needs to be the same one for any uploaded apps/watch faces so keep it safe and duplicated if you plan to distribute anything on the store.

The Distributor Certificate basically tells the watch that the computer you are sending the app from is safe. the Distributor.p12 can have multiple certificates.

Are you sure it is asking for a Distributor File and not the RSA Encryption Key (which unlocks the encoded binary file).

Ron
Samsung Developer Relations

Good Morning Ron,

thanx for your answer :+1:

Did I get you right: Generating a Distributor and Author Certificate (GWS > Project > Author & Distribute Certificate only once, unless … [like you mentioned]) not just per project. As long as I have the same watch and the same GWS (same version) I don’t need to generate both files new?!

But now I have another issue: I’ve built my project and wanna run it on my GearWatch3, I push the RoD (F9) button, then scan devices … result=notice box “No Device Found…”

  • watch and PC belong to the same subnet
  • Debugging is “on” (watch)
  • WiFi is “on” (watch and PC)
    I’ve checked all 6 points in the Notice-Box …

What else can I do???

You only need to generate the Author Certificate once in a lifetime. Technically they do expire but they don’t enforce it for watch designers. You can renew it if it does expire. Distributor certificates have to be for every watch but it is the same .p12 file.

This is because at some time you tried to run on device and did not accept the RSA Encryption key. Your device is found, you know that because you generated a distributor certificate.

the binary is encoded and the RSA Encryption key is installed on the device so it can decode it. The first time you try to run on device it has a very brief period to accept it after that it blocks it.

In the C:\users\USERNAME\ folder is a hidden folder called .tizen in it are sdb.pub and sdb files. Rename them and restart everything computer and watch (Hold down the power key for about 15 seconds until it says restarting).

Give it a full minute to fully connect watch Wifi even though it says it is connected it may not be fully connected.

Put your watch on a factory installed watch face keep the watch active and keep looking at it.

launch GWS run on device and make sure you have the IP address selected in the connection window

Watch your watch and when the RSA Encryption key pops up select accept checkmark

You only have to accept the RSA Encryption key once per watch unless there is a system update. the minor ones don’t usually require a new Distributor certificate or RSA key

Ron
Samsung Developer Relations