question

viti-27 avatar image
viti-27 asked

Could not deserialize reseponse from server:

local PlayFabClientApi = require("PlayFab.PlayFabClientApi")
local IPlayFabHttps = require("PlayFab.IPlayFabHttps")
local PlayFabHttps_Defold = require("PlayFab.PlayFabHttps_Defold")
local entity=require("PlayFab.PlayFabAuthenticationApi")
local data=require("PlayFab.PlayFabDataApi")
IPlayFabHttps.SetHttp(PlayFabHttps_Defold) -- Assign the Defold-specific IHttps wrapper


PlayFabClientApi.settings.titleId = "BE9A" -- Please change this value to your own titleId from PlayFab Game Manager


function init(self)
	local loginRequest = {
		-- https://api.playfab.com/documentation/Client/method/LoginWithCustomID
		TitleId = PlayFabClientApi.settings.titleId,
		CustomId = "GettingStartedGuide",
		CreateAccount = true
	}
	PlayFabClientApi.LoginWithCustomID(loginRequest, OnLoginSuccess, OnLoginFailed)
end


function OnLoginSuccess(result)
	print("works")
end


function OnLoginFailed(error)
	for x,y in pairs(error) do
		print(y)
	end
	
end

have this errors

ERROR:SCRIPT: HTTP request to 'https://BE9A.playfabapi.com/Client/LoginWithCustomID?sdk=DefoldSdk_0.50.190205' failed (http result: -1 socket result: -5) DEBUG:SCRIPT: ServiceUnavailable DEBUG:SCRIPT: 1123 DEBUG:SCRIPT: 0 DEBUG:SCRIPT: Could not deserialize reseponse from server:

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

·
JayZuo avatar image
JayZuo answered

I'm not familiar with Defold, but this seems to be a Defold bug as your code is right and works well in HTML5 build. For more info, please see https://forum.defold.com/t/playfab-defold-sdk-error-def-3789/31101.

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.