Corona App42 API - App42-LeaderBoard-Sample crashes

0 votes

I am trying to run your Coroa SDK sample app called App42 Leaderboard sample. When I compile and run and type in a username and password and touch 'login' it crashes with the error messages below.

2014-09-16 19:05:05.164 Corona Simulator[5234:707] Runtime error
/Users/errolsimon/Documents/Corona Apps/App42-LeaderBoard-Sample/App42-Lua-API/Util.lua:159: attempt to call field 'gsub' (a nil value)
stack traceback:
/Users/errolsimon/Documents/Corona Apps/App42-LeaderBoard-Sample/App42-Lua-API/Util.lua:159: in function 'trim'
/Users/errolsimon/Documents/Corona Apps/App42-LeaderBoard-Sample/App42-Lua-API/UserService.lua:139: in function 'authenticate'
/Users/errolsimon/Documents/Corona Apps/App42-LeaderBoard-Sample/login.lua:167: in function '_onEvent'
?: in function '?'
?: in function <?:1381>
?: in function <?:221>
asked Sep 16, 2014 in App42 Cloud API-BaaS by simon.errol (15 points)
recategorized Mar 3, 2015 by sushil

1 Answer

0 votes
I also tried it on an actual iPad device and I get the same error message in the console log so this is not related to the Corona simulator.
answered Sep 16, 2014 by simon.errol (15 points)
Hello Simon,

Change the input parameter in authenticate function with "loginNameField"  with "loginUserNameTextField" and "loginPasswordField" with "loginPassTextField" and it will works. I have also faced the same issue and it will work for me.

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