When I call my Storage service be it insertJSONDocument or findDocumentById from my lua file which loads and call the DBService calls and it returns the results.
But same function when I call from a button click event in the same lua file the below error is displayed.
AppWarp\WarpUtilities.lua:224: attempt to concatenate local 'user' (a nil value)
AppWarp\WarpUtilities.lua:224: in function 'calculateSignature'
App42-Lua-API\Util.lua:134: in function 'sign'
App42-Lua-API\StorageService.lua:169: in function 'findDocumentById'
DbConnect.lua:48: in function 'getData'
View1.lua:60: in function '_onEvent'
?: in function '?'
This is basic step .I do not know why it should not work. My Appwrap and Appwrap42 are having different api key and secret key.
Is it because the storage calls should be only called from main thread of the Scene lua file and cannot be called from inside of any other event or callback function