Getting SQL Error on Google Receipt Validation persist=true

Hi - I’m getting an SQL query error when setting persist=true on validateGoogleReceipt. This code was working fine on Nakama 3.10.0 and continues to function well if persist is set to false. Copying the code snippet and error below.

  1. Versions: Nakama 3.15.0, Linux binary, Cockroach Serverless 22.2.2
  2. Go 1.19.4

Error:

{"level":"error","ts":"2023-01-24T19:00:17.005Z","caller":"server/core_purchase.go:190","msg":"Error storing Google receipt","error":"ERROR: at or near \"8\": syntax error (SQLSTATE 42601)"}

Receipt being passed to function:

{"severity":"DEBUG","time":"2023-01-27T05:13:46.166828596Z","caller":"ChumChum/PurchaseManager.go:739","message":"Attempting to validate google receipt {\"json\":\"{\\\"orderId\\\":\\\"GPA.3384-3712-2412-47715\\\",\\\"packageName\\\":\\\"com.StudioSirah.KurukshetraAscension\\\",\\\"productId\\\":\\\"com.studiosirah.kurukshetraascension.gold8000india\\\",\\\"purchaseTime\\\":1674796414805,\\\"purchaseState\\\":0,\\\"purchaseToken\\\":\\\"icpljokbgaacgaajkcbgkkjk.AO-J1OyCZbYWMfYyneD3svbROAcDIC5UXm2E1Y8Fdxi8fVnu6QLt2KQdVuQSUUCQwRWa9tHhIAMjOCAB8Pg63YUCPgbVSE1OcL5X71BZr01BYCujDybR-Eg\\\",\\\"quantity\\\":1,\\\"acknowledged\\\":false}\",\"signature\":\"Or7Fcpsflvrrq5XKzBJD65zdWi9VEsgfoG+KEFt0SqtzDiGZLJeq+4XVZvFTjEJBO6DzX3s9YPfk7hyPeHfyVyR6pcD072akD5S6uumn41rGF3CORCvnxrCes1LVKQcRzatJSFISxtd4zP5b20Nlbps95fRQXEA3noKyvZfeRdZMq3RI6XVOlLCzExVRjyWA+TrYgOpD9JCnUwzfrmEeodWCuFXWrJq+minjfQq7M70xph+DFdS7mQ68OFqseDTG9p2+/6DanRAB6TYg9k6JUAfSRNTABJbTZX58r82+nhmHDyxtR5vSPmVVBW4fIYsEC1k6y/RbXdI751LbJ1SEZA==\",\"skuDetails\":[\"{\\\"productId\\\":\\\"com.studiosirah.kurukshetraascension.gold8000india\\\",\\\"type\\\":\\\"inapp\\\",\\\"title\\\":\\\"8000 gold (Kurukshetra: Ascension)\\\",\\\"name\\\":\\\"8000 gold\\\",\\\"iconUrl\\\":\\\"https:\\\\/\\\\/lh3.googleusercontent.com\\\\/wgMJnJz6CWrsZd6WDiuZJpqn7heY5I0vp8P9r784FVEm3WE4zNd_59nCNA3aZotde7Sh\\\",\\\"description\\\":\\\"Add 8000 gold to your account\\\",\\\"price\\\":\\\"\\u20b9999.00\\\",\\\"price_amount_micros\\\":999000000,\\\"price_currency_code\\\":\\\"INR\\\",\\\"skuDetailsToken\\\":\\\"AEuhp4KeozG_rqWZ7TLyGTCGZ6WsiJiY30MYeY8MDfqc-B4M7ETHP1qcmjk0fs0f1F8Z\\\"}\"]}","runtime":"go","rpc_id":"rpc_claim_purchase"}

Hi yes, this is a known bug and there is already a fix but it has not been released yet. If you don’t need the latest functionality introduced in 3.15.0 then I suggest you downgrade to 3.14.0 until the next release.

Understood - thanks for the update!