App42 Storage Service call not working from Button Click event.But working directly

0 votes

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)
stack traceback:
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
asked Apr 11, 2020 in Corona by abhijit_x_pert (10 points)

Please log in or register to answer this question.

Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on