error message code 32752 when creating a room

Options
Hello,

So i am using the demo script "LobbyMainPanel" so no one can say it could be my code, and checked all prefabs and using close to or exactly like the demo of the Asteroids that Photon comes with.

so in short, when i go to create the room, it gives me this error messsage:

error: 32752 Long error: Newtonsoft.Json.JsonReaderException : Unexpected character encountered while parsing value: J. Path '', line 0, position 0.

i am not sure how can I check the json to pin point what is causing it, but here is the snippet part code that creates the room from LobbyMainPanel:
        public void OnCreateRoomButtonClicked()
        {
            CreateRoomButton.interactable = false;
            string roomName = RoomNameInputField.text;
            if (roomName is null || roomName == string.Empty)
            {
                return;
            }
            roomName = (roomName.Equals(string.Empty)) ? "Room " + UnityEngine.Random.Range(1000, 10000) : roomName;

            byte maxPlayers;
            byte.TryParse(Convert.ToString(RoomPlayerCount), out maxPlayers);
            maxPlayers = (byte) Mathf.Clamp(maxPlayers, 1, 6);

            RoomOptions options = new RoomOptions {MaxPlayers = maxPlayers, PlayerTtl = 10000 };

            PhotonNetwork.CreateRoom(roomName,options,null,null);
            Debug.Log("Room Created Successfully: " + roomName + ": Room Player count: " + maxPlayers.ToString());
        }

yes i did add Debug.log but its to get the error, its weird, it "Does" create the room, but then the error comes from of course method:
        public override void OnCreateRoomFailed(short returnCode, string message)
        {
            SetActivePanel(SelectionPanel.name);
            CreateRoomButton.interactable = true;
            Debug.Log("Create room failed, Short error: " + returnCode + " Long error: " + message.ToString());
        }


so I am sure its not creating the room..

I DO have Photon and playfab installed on the same project, could that be the problem? if so... should i use something else besides playfab then? or maybe is there an actual fix for this?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @siten0308,

    This is an issue in Webhooks.
    Make sure you are returning proper JSON in expected format in RoomCreated handler in PlayFab's CloudScript for your PlayFab Title.
  • siten0308
    Options
    ok gotya, thank you for replying @JohnTube mod, but is there a way to show the json for RoomCreated? what variable i can put in Debug.Log to show so that i may know? it would help me troubleshoot what format its messing up at.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @siten0308,

    Unfortunately there is no way to log.
    You could use PlayFab's PlayStream events maybe to log response before returning it.
  • siten0308
    Options
    ok... so... i tried to just use: PhotonNetwork.CreateRoom(_roomName.text) and STILL getting the same error message... this really doesnt make sense... is Photon any good?