Failed Creating room when using PlayFab

I'm using PlayFab and Photon together and everything worked fine yesterday. I just suddenly can't create room today. I have logged in with PlayFab and PUN, but I get the error when creating a room:
[Photon]Failed created room. [32752] Failed to create game on https://mytitleid.playfablogic.com/webhook/1/prod/3DS36XKQCF7FD378R3SRXBDTNCT6GYNGCOGPW67E9FJCZK9UX6/RoomCreated? : Unexpected character encountered while parsing value: . Path '', line 0, position 0.
Does any know what this means and how I can fix it?
[Photon]Failed created room. [32752] Failed to create game on https://mytitleid.playfablogic.com/webhook/1/prod/3DS36XKQCF7FD378R3SRXBDTNCT6GYNGCOGPW67E9FJCZK9UX6/RoomCreated? : Unexpected character encountered while parsing value: . Path '', line 0, position 0.
Does any know what this means and how I can fix it?
3
Comments
Thank you for choosing Photon!
It looks like you are returning the expected JSON format for the PathCreate webhook from RoomCreated CloudScript handler.
You could simply use or or
It's a bit unusual as I thought PlayFab automatically returns default success response if you don't explicitly return anything.
OK, I spoke to soon - after trying those 3 return codes in my RoomCreated PlayFab handler it still gives the same error. The only way I could get it to go away was to remove the webhook from the Photon Dashboard (I guess this takes a few minutes to propagate to Photon servers which made me think it was fixed whilst changing CloudScript).
As a test I removed all code from the RoomCreated handler in PlayFab except the return codes but no change.
Hi, thanks for quick reaction. I changed the RoomCreated CloudScript in PlayFab like:
// Triggered automatically when a Photon room is first created
handlers.RoomCreated = function (args) {
//log.debug("Room Created - Game: " + args.GameId + " MaxPlayers: " + args.CreateOptions.MaxPlayers);
return { "ResultCode": 0, "Message": "OK"}
};
The problem still exists. Is my CloudScript wrong here?
Hi, I also tried removing RoomCreated and RoomJoined webhook in Photon Dashboard but it still exists. Could you tell me how you fixed this? After you removed the webhook, you could create room?
Okay guys I tried the three methods again and all of them worked. I noticed that "Message" in method 2 and Message in method 3 are different, although both of them work. If you can't make it work after changing CloudScript, try to set the Webhook in Photon Dashboard again following the document here.
Thank you all!
Hi, I'm also having this trouble. Even after trying JohnTube solutions and resetting the webhook it's still not fixed
PlayFab static IP addresses updated on 11th Jan. Maybe it is something related to this.
No rooms can be created they all return:
I return the data from the Playfab webhook like this (Actual response data for one of the rooms which worked fine till +-14 hours ago):
But it returns the same error, so it's most likely not a problem with the structure in my previous post.
I also tried to change the config to update the RoomCreated path to a different cloudscript function, but it results in the same error.
I'm really stuck here with my production game being broken, any leads or ideas would be really appreciated.
After deleting and re-adding webhook config and trying various things in CloudScript, the only way I can get it working is to remove the RoomCreated webhook.
also the exact error(s) you see/get, how to reproduce and when you noticed it first or when it started.
Sorry you are running into this!
PlayFab's JSON response has some weird char(s) as prefix.
Please see attached screenshot.
This was not there before and while we did not change anything we are willing to better handle it like Postman does.
But for now you should report this to PlayFab.
Thank you for your time and patience!
I personally encountered the name before and only now I looked it up anyway.
Something must have changed from PlayFab side.
So either they can revert for now or try not send BOM 'if possible'.
Would it be possible for you to forward this issue directly to PlayFab? Since it's an issue which is completely Service to Service and out of our control, it's probably also affecting quite some other Photon customers. (And assuming that it will be faster picked up if comes directly from Photon)
Or anyone with a PlayFab premium/enterprise account might have better luck at PlayFab..
Thank you for choosing Photon!
Of course we did reach out to PlayFab.
And we are working on a update from our end that will support this.
Thank you for choosing Photon!
Notifying you in case you missed the updates.
The issue should be resolved now.
From Photon side: we added a fix and started rolling out to a separate cluster and moved affected apps from customers that reported this there. We will continue rollout of this update slowly now to all servers.
From PlayFab side: they reverted a CloudScript related change to last week's version and the BOM causing this is gone for now for all applications. They will make sure it won't cause problems when they update again the next time.
Thank you for your patience and understanding!
Thank you @JohnTube. All hooks working as expected.
Shall we wait a little bit longer or contact you to make sure it is indeed in the separate cluster?
Thank you for choosing Photon!
Are you sure it's the same issue, if so, send an email to [email protected] and let us know your AppId, AppVersion, Region(s).
Also the repro steps + actual error message.
Extra info: client SDK used and its version + PlayFab TitleID.