question

brendan avatar image
brendan asked

Problem with photon server (username) and playfab account creation

he2
started a topic on Tue, 15 September 2015 at 2:48 AM

Hello,

I have two problems, the first is with the account creation, when I send the request Client/RegisterPlayFabUser, it sometimes doesn't work and the return result is "username already exist", but the username doesn't exist and is never created ! If I retry with another nickname it sometimes works, the result is unpredictible. Any idea where this can come from ? (I already clean, recompile the project, trace the requests and so on, I always have the same problem)

The second is more complex, I use a photon server (the one provide by playfab), I can log on playfab and get all I need : cloud script url, photon authetication token... But when I use the 'connect' method from marmalade api (C++) to connect the photon server, I have : "invalid username". Looks like the photon authentication token is correctly used, but the passed username is not valid (same username as playfab) - What did I miss ? Is there a special username to give, build or something like that ?

I had to create a server on photon website, with the option "Allow anonymous client to connect, independently of configured providers", and then it works, but anyone can connect now on this photon server ... And of course the authentication token is not valid (logical result)

I'm using Marmalade C++ api 7.8.1 with this game title id https://959B.playfabapi.com

Thanks

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Best Answer
Brendan Vanous said on Thu, 17 September 2015 at 5:47 PM

To be clear, this isn't a bug. We had all titles in the common publisher space originally, as there are some specific advantages to this - particularly as we add in more services. However, we got feedback from developers that they preferred the solution of distinct Publisher ID spaces, and we agreed that the advantages of that model were greater, so we moved to it. When we did so, however, we couldn't just move the existing games to Publisher ID spaces, as there's no simple way to "port" the user accounts between those spaces. So, titles which pre-date that change are still in the common account space. But as Hamza pointed out, all you have to do is ask (as in this thread), and we're happy to move your Studio and titles to a unique Publisher ID. Speaking of which, I've updated all your titles for the Publisher ID I added to your Studio, so you're good to go. :)

Brendan


7 Comments
johntube said on Tue, 15 September 2015 at 3:20 PM

Hey he2,

First, PlayFab does not provide Photon Server. PlayFab premium tiers have access to 3 Photon apps: Realtime + Turnbased + Chat.

IMO, you are getting a wrong Photon token. You are using a wrong Photon AppId. You should be using the one given by PlayFab from GameManager. Photon apps given by PlayFab can't be accessed from "Photon website". In fact they can't be configured from anywhere.

You are using a real "username" value as custom authentication parameter. It is not your fault the naming is wrong. Please replace it with PlayFabId.

Good luck with the rest.


he2 said on Wed, 16 September 2015 at 2:06 AM

You're right john, we discovered yesterday that replacing the username by the playfabid was working. Well, the constructor of the class is very clear and is asking for a user name (Photon source code)...

Client::Client(LoadBalancing::Listener& listener, const Common::JString& applicationID, const Common::JString& appVersion, const Common::JString& username, nByte connectionProtocol=Photon::ConnectionProtocol::UDP, AuthenticationValues authenticationValues=AuthenticationValues(), bool autoLobbyStats=false, bool useDefaultRegion=true);

Anyway, I still have the same problem with the user registration, when the name is short (john for example) the name is considered as already registered and when you're looking for the user 'john', he doesn't exist ! Any idea ?


johntube said on Wed, 16 September 2015 at 2:15 AM

How old is your title?

First PlayFab had a serious accounts issue: all games where sharing the same user list / space / "DB". So if a username was already claimed in another PlayFab title your players couldn't have it.

Now this issue is solved for new titles. Each newly created title will be given a unique publisher ID that will guarantee uniqueness of usernames only in the publisher space = all titles of same studio.

If your title is old you can always ask for a publisher ID via email.


he2 said on Wed, 16 September 2015 at 2:19 AM

It's a test title, and a very old one, may be one year, so this can be the problem, I'm just going the create a new title, and test the result. Btw, the problem is linked to the main account or just the title ?


Brendan Vanous said on Wed, 16 September 2015 at 5:36 PM

We introduced Publisher ID at the Studio level, so creating a new title in the same Studio wouldn't help. I've just set your Studio up with a unique Publisher ID, so that any new titles created going forward will use it. I can move your existing title(s) to that ID as well, but bear in mind that any player accounts you've created so far in those titles will not be migrated. They're associated with the Publisher ID, and so won't be in your distinct publisher space. Let us know if you want us to move them.

Brendan


he2 said on Thu, 17 September 2015 at 12:30 AM

Thanks for your answer brendan, if you can associate all the titles with a unique publisher id it would be great ! This bug is really terrible, for now all those titles are test titles, so no problem with the users.

Thanks a lot.


Brendan Vanous said on Thu, 17 September 2015 at 5:47 PM

To be clear, this isn't a bug. We had all titles in the common publisher space originally, as there are some specific advantages to this - particularly as we add in more services. However, we got feedback from developers that they preferred the solution of distinct Publisher ID spaces, and we agreed that the advantages of that model were greater, so we moved to it. When we did so, however, we couldn't just move the existing games to Publisher ID spaces, as there's no simple way to "port" the user accounts between those spaces. So, titles which pre-date that change are still in the common account space. But as Hamza pointed out, all you have to do is ask (as in this thread), and we're happy to move your Studio and titles to a unique Publisher ID. Speaking of which, I've updated all your titles for the Publisher ID I added to your Studio, so you're good to go. :)

Brendan

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.