question

peachypixels avatar image
2 Votes"
peachypixels asked zipswich commented

Experiencing [invalid package publisher name] error

Hello!

I am trying to submit a game (built in Unity) to the store (as a UWP app) but am experiencing issues with regards to the certificate and publisher name.

My test certificate (built in Unity) has a publisher name of "CN=<NAME>"

After building the UWP solution (in Unity) I then associate the app with the store (from within Visual Studio) and this changes the publisher name to "CN=<ID>"

When I then build the store package, I receive the following error...

warning : Publisher name (CN=<ID>) does not match signing certificate subject: CN=<NAME>. Updating Publisher name.

Upon submitting the package to the store, I then finally receive the following error...

Invalid package publisher name: CN=<NAME> (expected: CN=<ID>)

If (during the app association process) I select the certificate from the store, it sets the publisher name to "CN=<NAME>" and the error messages are then the reverse of the above.

Basically, I am unable to perform an error free build and submit the package to the store (although it was working until recently)

The app store id is 9NJ24KCM1NSS

After a little investigation, it seems there was a Visual Studio bug that could cause this. But it was fixed last year and I am using the latest at the time of writing (16.9.5)

So I would be very grateful if someone could look into this please and let me know if it's an issue on my end or with Visual Studio or the store.

Kind regards
David

vs-generalpartner-center-general
· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

First, please make sure that you are associating with the correct app from Visual Studio. Then could you please take a look at the partner center, in the app that you reserved, check the Package/Identity/Publisher value from Product management->Product Identity to see if it matches the Publisher value automatically generated after you associated the app.

0 Votes 0 ·

Hi Roy,

Thanks for the reply.

I'm definitely associating with the correct app.

As for the partner centre, it shows this...

Package/Identity/Publisher: CN=<ID>
Package/Properties/PublisherDisplayName: <NAME>

Are they expected values?

During the association process, Visual Studio is updating the publisher to the correct CN=<ID> value, but it is then rejected on submission.

On-top of that, my understanding was that the store would generate a certificate (and discard my self signed one) but that doesn't appear to be the case.

Sorry, I'm publishing my first app and finding the certificate implementation a little confusing at the moment.

0 Votes 0 ·

Hi Roy,

Just to say I've fixed it, although to be honest I'm not sure exactly what was going on.

Initially I re-generated the test certificate with the publisher as <ID> but it still didn't fix the issue. However, I noticed that Visual Studio was picking up a certificate with <NAME> as the publisher.

So I purged all certificates from my local machine (which all had the publisher as <NAME>) then generated a new one and it built without issue and is now submitted.

Which leads me to think a cached certificate was being used somehow.

Strangely during the Associate With App process, the Select From Store option now says that there are no matching certificates in the store.

So this leaves me with the following questions...

1) Should the store create its own certificate and replace it during build\submission process?
2) If not, is it using the self signed certificate that I generated in Unity?

0 Votes 0 ·

Well, that's an interesting behavior. Generally, the association process in Visual Studio should generate the certificate that matches your app.

0 Votes 0 ·
Show more comments
RAB-Software avatar image
0 Votes"
RAB-Software answered RAB-Software edited

Hi,

I have the same problem on Visual Studio 16.10

Building the Unity3D project and running it in Visual Studio will show the self created certificate data under Packaging in the Package.appxmanifest.
Using Publish - Associate App will show the correct Publisher (greyed out), Publisher display name and Package family name in the Packaging window (greyed out).

However, if I create packages then the error message appears
Warning Publisher name (CN=[ID from partner center]) does not match signing certificate subject: CN=RAB-Software. Updating Publisher name.

double click on the message shows: [...]AppxPackage\Microsoft.AppXPackage.Targets 2698

So it looks like that Visual Studio is still using the self created certificate and not the certificate from partner center. Is there a way of forcing VS to use the correct certificate?

Another question would be if this is an Unity3D bug (building the VS project wrong) or a problem on the Microsoft side...

Thank you and kind regards!

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

kaki104 avatar image
1 Vote"
kaki104 answered zipswich commented

Hi

I am also having the same problem. It seems that the Publisher and Packag family name registered in the store are not used and the app is packaged using a local certificate.

I've been testing all day today. In the past, when connecting to the store, the pfx file was added to the project and the build was carried out with the private key, but is that not the case now? How can I package without a pfx file for the store? It seems that this issue should be dealt with quickly.


After searching several places, I found a solution. I started the app approval process with the second solution below.
Many thanks to James.


Hi @Connor Park,

There are a couple ways we can try to fix this:

Solution 1

Upgrade to at least Visual Studio to 16.11 Preview 2 or wait until 16.11 is officially released soon.
Add the property <GenerateTemporaryStoreCertificate>true</GenerateTemporaryStoreCertificate> to your project file.

Solution 2

Open the Manifest Designer using right click -> open on Package.appxmanifest.
Navigate to the Packaging tab and click the ‘Choose Certificate…’ button.
Click the ‘Create…’ button in the new dialog.
In the ‘Publisher Common Name’ textbox, enter your store publisher name WITHOUT the “CN=” prefix. e.g. AF9XXXXX-XXXX-XXXX-XXXX-XXXXXXXXCCB8
Click the ‘OK’ button.
Click the ‘OK’ button.
Save the file and solution.

Let me know which solution you attempt to use and how it goes.


Thank you,
James

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you. I had the same problem and found your post, then used solution 2 to solve the problem.

I am using VS17.2.0. The problem occurred when the certificate expired and I created a new one with default settings. Wish VS could fill the Publisher Common Name field automatically with the correct value. It fills it with one letter "h". I have no clue where it gets it.

0 Votes 0 ·
JonTemplin-8731 avatar image
0 Votes"
JonTemplin-8731 answered

I also had this issue in 16.10.3. I used Solution 1 in the above post by @kaki104 to successfully build a store package that passed upload validation by the Partner Center.

Sigh. It seems I have store packaging issues each time I use an upgraded Visual Studio. Publishing apps shouldn't be this difficult.

Thanks to the other posters for their help. I would have been spinning my wheels all afternoon without your help.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.