Google Play Game Services few questions

So after I removed highscore here (in gpgs.snapshot_set_data()):

local function save_data(highscore)
	local success, error_message = gpgs.snapshot_set_data(highscore) -- Removed in this place
	if success and save == true then
		print("COMMIT IS SUCCESSFULL")
		gpgs.snapshot_commit_and_close({progressValue = get_progress_value()}) --would be better to set data for the automatic conflict solver
	else
		print("snapshot_set_data ERROR:", error_message)
	end

It didn’t crash, but obviously it didn’t save data too. So the problem is with the variable highscore. Do you guys have any idea why it works perfectly on some devices, but crashes on other ones?

No, no real clue yet, we need to debug it.
Can you create a small repro case for us to debug?

I will try, but, as I mentioned before, it works on some devices, so there might be no crash on your device.

If you can get a log from those devices, that would be good too.

Here is the repro case :
(White square is the button) (The crash in this repro should happen after you click the button AND if google sign-in was successfull)

1 Like

Regarding making the app debuggable on android, I suspect there’s an issue with our way of doing it (it used to work).

You can currently create a copy of AndroidManifest.xml, and add android:debuggable to it, and it should work.

Also what could this error mean? I get this error on my repro case only. :

snapshot_set_data ERROR: nil

Hi, ive already configured gpgs and if i create an android APK release and install on my phone its working correctly, but if i upload and set as internal test or production on playstore, now its published, but gpgs is not connecting im getting this error “sign-in failed: sign_in_required (4)”, but as I said, app installed from adb into my phone connects correctly also i receive achievements

this is screen showing the issue

code on INIT function:

		if gpgs then
    		gpgs.set_callback(gpgs_callback)
    		gpgs.silent_login()
    		timer.delay(2, false, function() 
    			if not gpgs.is_logged_in() then
    				gpgs.login()
    			end
    		end)
    	end

CALLBACK:

	local function gpgs_callback(self, message_id, message)
	send_debug_message("message:"..tostring(message_id))
	send_debug_message("MSG_SIGN_IN: "..tostring(gpgs.MSG_SIGN_IN))
	send_debug_message("MSG_SIGN_OUT: "..tostring(gpgs.MSG_SIGN_OUT))
	send_debug_message("MSG_SILENT_SIGN_IN: "..tostring(gpgs.MSG_SILENT_SIGN_IN))
	send_debug_message("message: "..tostring(message))
	send_debug_message("message error: "..tostring(message["error"]))
	send_debug_message("message status: "..tostring(message["status"]))
	for i,p in ipairs(message) do
		send_debug_message("i: "..tostring(i)..", p: "..tostring(p))
	end
	
	if message_id == gpgs.MSG_SIGN_IN or message_id == gpgs.MSG_SILENT_SIGN_IN then
		if message.status == gpgs.STATUS_SUCCESS then
			send_debug_message("Signed in")
			send_debug_message(gpgs.get_id())
			send_debug_message(gpgs.get_display_name())
		else
			send_debug_message("Sign in error!")
		end
	elseif message_id == gpgs.MSG_SIGN_OUT then
		send_debug_message("Signed out")
	end
end

THANK YOU ALL