Hello,
using the example code to use storage_write
I get a successful write message in the log. but opening the created entry in the web view results in “An error occured while reading storage object.”. I’m using Nakama “3.17.1+c3b317d8” cockroach db “latest-v20.2”.
The code in the RPC looks like this:
local user_id = c.SYSTEM_USER
local new_objects = {
{ collection = "save", key = "save1", user_id = user_id, value = {name = "Hello"} }
}
local write_result = nk.storage_write(new_objects)
nk.logger_info("Write result: " .. c.dump(write_result))
Log message after write:
{"level":"info","ts":"2023-10-18T16:11:40.454Z","caller":"server/runtime_lua_nakama.go:2249","msg":"Write
result: { [1] = { [\"key\"] = save1,[\"collection\"] = save,[\"user_id\"] = 00000000-0000-0000-0000-0000
00000000,[\"version\"] = b07f9e832eb35ecaf98ea12e25227df4,} ,} ","runtime":"lua","rpc_id":"save_receipt"}
Log message when opening the entry in the web view:
{"level":"error","ts":"2023-10-18T16:12:15.257Z","caller":"server/core_storage.go:494","msg":"Could not r
ead storage objects.","error":"cannot convert [save] to Text"}