Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

GPGS V2 plugin-cannot login after app restarts with logged out state
Started by Sheekore Dec 10 2018 10:22 AM

No replies to this topic
gpgs v2 login error runtime error
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Sheekore

[GLOBAL: userInfoPane.html]
Sheekore
  • Enthusiast

  • 80 posts
  • Corona SDK

I ran into some bugs. I am using corona 2018.3442 and using the gpgs v2 plugin.

1. When I log out of the gpgs, everything seems fine, I can login or logout multiple times without any errors. When I log out and close the app and reopen the app again everything seems ok, but when I go to the scoreboard screen where I can login to the gpgs I get this runtime error:

11-28 20:21:45.754 14225 14241 I Corona  : ERROR: Runtime error
11-28 20:21:45.754 14225 14241 I Corona  : java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.ContextWrapper.getApplicationContext()' on a null object reference
11-28 20:21:45.754 14225 14241 I Corona  : Java Stack Trace:
11-28 20:21:45.754 14225 14241 I Corona  :      plugin.gpgs.v2.Connector.getContext(Connector.java:58)
11-28 20:21:45.754 14225 14241 I Corona  :      plugin.gpgs.v2.Connector.isConnected(Connector.java:50)
11-28 20:21:45.754 14225 14241 I Corona  :      plugin.gpgs.v2.Connector.isAuthenticated(Connector.java:54)
11-28 20:21:45.754 14225 14241 I Corona  :      plugin.gpgs.v2.LuaLoader.isAuthenticated(LuaLoader.java:108)
11-28 20:21:45.754 14225 14241 I Corona  :      plugin.gpgs.v2.LuaLoader.access$2200(LuaLoader.java:41)
11-28 20:21:45.754 14225 14241 I Corona  :      plugin.gpgs.v2.LuaLoader$IsAuthenticatedWrapper.invoke(LuaLoader.java:637)
11-28 20:21:45.754 14225 14241 I Corona  :      com.ansca.corona.JavaToNativeShim.nativeTouchEvent(Native Method)
11-28 20:21:45.754 14225 14241 I Corona  :      com.ansca.corona.JavaToNativeShim.touchEvent(JavaToNativeShim.java:430)
11-28 20:21:45.754 14225 14241 I Corona  :      com.ansca.corona.input.RaiseTouchEventTask.executeUsing(RaiseTouchEventTask.java:39)
11-28 20:21:45.754 14225 14241 I Corona  :      com.ansca.corona.CoronaRuntimeTaskDispatcher$TaskEvent.Send(CoronaRuntimeTaskDispatcher.java:170)
11-28 20:21:45.754 14225 14241 I Corona  :      com.ansca.corona.events.EventManager.sendEvents(EventManager.java:91)
11-28 20:21:45.754 14225 14241 I Corona  :      com.ansca.corona.Controller.updateRuntimeStat
11-28 20:21:45.758 14225 14241 I Corona  : ERROR: Runtime error
11-28 20:21:45.758 14225 14241 I Corona  : java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.ContextWrapper.getApplicationContext()' on a null object reference
11-28 20:21:45.758 14225 14241 I Corona  : Java Stack Trace:
11-28 20:21:45.758 14225 14241 I Corona  :      plugin.gpgs.v2.Connector.getContext(Connector.java:58)
11-28 20:21:45.758 14225 14241 I Corona  :      plugin.gpgs.v2.Connector.isConnected(Connector.java:50)
11-28 20:21:45.758 14225 14241 I Corona  :      plugin.gpgs.v2.Connector.isAuthenticated(Connector.java:54)
11-28 20:21:45.758 14225 14241 I Corona  :      plugin.gpgs.v2.LuaLoader.isAuthenticated(LuaLoader.java:108)
11-28 20:21:45.758 14225 14241 I Corona  :      plugin.gpgs.v2.LuaLoader.access$2200(LuaLoader.java:41)
11-28 20:21:45.758 14225 14241 I Corona  :      plugin.gpgs.v2.LuaLoader$IsAuthenticatedWrapper.invoke(LuaLoader.java:637)
11-28 20:21:45.758 14225 14241 I Corona  :      com.ansca.corona.JavaToNativeShim.nativeTouchEvent(Native Method)
11-28 20:21:45.758 14225 14241 I Corona  :      com.ansca.corona.JavaToNativeShim.touchEvent(JavaToNativeShim.java:430)
11-28 20:21:45.758 14225 14241 I Corona  :      com.ansca.corona.input.RaiseTouchEventTask.executeUsing(RaiseTouchEventTask.java:39)
11-28 20:21:45.758 14225 14241 I Corona  :      com.ansca.corona.CoronaRuntimeTaskDispatcher$TaskEvent.Send(CoronaRuntimeTaskDispatcher.java:170)
11-28 20:21:45.758 14225 14241 I Corona  :      com.ansca.corona.events.EventManager.sendEvents(EventManager.java:91)
11-28 20:21:45.758 14225 14241 I Corona  :      com.ansca.corona.Controller.updateRuntimeState(Controller.java:318)
11-28 20:21:45.758 14225 14241 I Corona  :      com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:425)
11-28 20:21:45.758 14225 14241 I Corona  :      com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1625)
11-28 20:21:45.758 14225 14241 I Corona  :      com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1380)
11-28 20:21:45.758 14225 14241 I Corona  : stack traceback:
11-28 20:21:45.758 14225 14241 I Corona  :      [C]: ?
11-28 20:21:45.758 14225 14241 I Corona  :      [C]: in function 'isAuthenticated'
11-28 20:21:45.758 14225 14241 I Corona  :      ?: in function <?:747>
11-28 20:21:45.758 14225 14241 I Corona  :      ?: in function 'method'
11-28 20:21:45.758 14225 14241 I Corona  :      /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:221: in function 'dispatchEvent'
11-28 20:21:45.758 14225 14241 I Corona  :      /Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/composer/composer.lua:906: in function '_nextTransition'
11-28 20:21:45.758 14225 14241 I Corona  :      /Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/composer/composer.lua:1499: in function 'transitionNewScene'
11-28 20:21:45.758 14225 14241 I Corona  :      /Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/composer/composer.lua:1531: in function 'gotoScene'
11-28 20:21:45.758 14225 14241 I Corona  :      ?: in function '_onEvent'
11-28 20:21:45.758 14225 14241 I Corona  :      /Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/widget/widgetLibrary/widget_button.lua:120: in function 'manageButtonTouch'
11-28 20:21:45.758 14225 14241 I Corona  :      /Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/widget/widgetLibrary/widget_button.lua:881: in function 'method'
11-28 20:21:45.758 14225 14241 I Corona  :      /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:221: in function </Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:190>

and when I go to the settings screen to download the snapshot, normally if user is not logged in, then login attempt is made but I get this runtime error:

11-28 20:26:45.716 14655 14671 I Corona  : ERROR: Runtime error
11-28 20:26:45.716 14655 14671 I Corona  : java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.ContextWrapper.getApplicationContext()' on a null object reference
11-28 20:26:45.716 14655 14671 I Corona  : Java Stack Trace:
11-28 20:26:45.716 14655 14671 I Corona  :      plugin.gpgs.v2.Connector.getContext(Connector.java:58)
11-28 20:26:45.716 14655 14671 I Corona  :      plugin.gpgs.v2.Connector.isConnected(Connector.java:50)
11-28 20:26:45.716 14655 14671 I Corona  :      plugin.gpgs.v2.Connector.isAuthenticated(Connector.java:54)
11-28 20:26:45.716 14655 14671 I Corona  :      plugin.gpgs.v2.LuaLoader.isAuthenticated(LuaLoader.java:108)
11-28 20:26:45.716 14655 14671 I Corona  :      plugin.gpgs.v2.LuaLoader.access$2200(LuaLoader.java:41)
11-28 20:26:45.716 14655 14671 I Corona  :      plugin.gpgs.v2.LuaLoader$IsAuthenticatedWrapper.invoke(LuaLoader.java:637)
11-28 20:26:45.716 14655 14671 I Corona  :      com.ansca.corona.JavaToNativeShim.nativeTouchEvent(Native Method)
11-28 20:26:45.716 14655 14671 I Corona  :      com.ansca.corona.JavaToNativeShim.touchEvent(JavaToNativeShim.java:430)
11-28 20:26:45.716 14655 14671 I Corona  :      com.ansca.corona.input.RaiseTouchEventTask.executeUsing(RaiseTouchEventTask.java:39)
11-28 20:26:45.716 14655 14671 I Corona  :      com.ansca.corona.CoronaRuntimeTaskDispatcher$TaskEvent.Send(CoronaRuntimeTaskDispatcher.java:170)
11-28 20:26:45.716 14655 14671 I Corona  :      com.ansca.corona.events.EventManager.sendEvents(EventManager.java:91)
11-28 20:26:45.716 14655 14671 I Corona  :      com.ansca.corona.Controller.updateRuntimeStat
11-28 20:26:45.718 14655 14671 I Corona  : ERROR: Runtime error
11-28 20:26:45.718 14655 14671 I Corona  : java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.ContextWrapper.getApplicationContext()' on a null object reference
11-28 20:26:45.718 14655 14671 I Corona  : Java Stack Trace:
11-28 20:26:45.718 14655 14671 I Corona  :      plugin.gpgs.v2.Connector.getContext(Connector.java:58)
11-28 20:26:45.718 14655 14671 I Corona  :      plugin.gpgs.v2.Connector.isConnected(Connector.java:50)
11-28 20:26:45.718 14655 14671 I Corona  :      plugin.gpgs.v2.Connector.isAuthenticated(Connector.java:54)
11-28 20:26:45.718 14655 14671 I Corona  :      plugin.gpgs.v2.LuaLoader.isAuthenticated(LuaLoader.java:108)
11-28 20:26:45.718 14655 14671 I Corona  :      plugin.gpgs.v2.LuaLoader.access$2200(LuaLoader.java:41)
11-28 20:26:45.718 14655 14671 I Corona  :      plugin.gpgs.v2.LuaLoader$IsAuthenticatedWrapper.invoke(LuaLoader.java:637)
11-28 20:26:45.718 14655 14671 I Corona  :      com.ansca.corona.JavaToNativeShim.nativeTouchEvent(Native Method)
11-28 20:26:45.718 14655 14671 I Corona  :      com.ansca.corona.JavaToNativeShim.touchEvent(JavaToNativeShim.java:430)
11-28 20:26:45.718 14655 14671 I Corona  :      com.ansca.corona.input.RaiseTouchEventTask.executeUsing(RaiseTouchEventTask.java:39)
11-28 20:26:45.718 14655 14671 I Corona  :      com.ansca.corona.CoronaRuntimeTaskDispatcher$TaskEvent.Send(CoronaRuntimeTaskDispatcher.java:170)
11-28 20:26:45.718 14655 14671 I Corona  :      com.ansca.corona.events.EventManager.sendEvents(EventManager.java:91)
11-28 20:26:45.718 14655 14671 I Corona  :      com.ansca.corona.Controller.updateRuntimeState(Controller.java:318)
11-28 20:26:45.718 14655 14671 I Corona  :      com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:425)
11-28 20:26:45.718 14655 14671 I Corona  :      com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1625)
11-28 20:26:45.718 14655 14671 I Corona  :      com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1380)
11-28 20:26:45.718 14655 14671 I Corona  : stack traceback:
11-28 20:26:45.718 14655 14671 I Corona  :      [C]: ?
11-28 20:26:45.718 14655 14671 I Corona  :      [C]: in function 'isAuthenticated'
11-28 20:26:45.718 14655 14671 I Corona  :      ?: in function '_onEvent'
11-28 20:26:45.718 14655 14671 I Corona  :      /Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/widget/widgetLibrary/widget_button.lua:120: in function 'manageButtonTouch'
11-28 20:26:45.718 14655 14671 I Corona  :      /Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/widget/widgetLibrary/widget_button.lua:881: in function 'method'
11-28 20:26:45.718 14655 14671 I Corona  :      /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:221: in function </Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:190>

Only when I uninstall the app and then reinstall, the usual gpgs login flow works. It's that once I logout and close the app, I cannot log back in to gpgs.

2. I have noticed that when a login attempt is made, in the gpgsloginlistener function the event already says 'logged in', even though only the gpgs pop up showed up asking through which account to login. Shouldn't the event say logged in only when a successful login has been done?

3. If the user is already logged in, when the gpgs login is called without userInitiated variable in the main.lua, the app screen halts for a second and the screen dims a bit (like when gpgs pop up shows the background becomes a bit dark), the pop up doesn't show and then the app goes on with the user logged in. Before, when login was happening in the background the screen wouldn't dim and user wouldn't have noticed that the login process is going on.

If anyone could look into these issues, would be a great help.




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: gpgs v2, login error, runtime error