android: App doesn't load with the new custom Application\Activity support

Did you verify this is a real problem by searching [Stack Overflow]

Yes

Tell us about the problem

When you run the demo it says app is deployed to the device, but no app actually runs\loads. if you MANUALLY run it, it just crashes. image

Please provide the following version numbers that your issue occurs with:

All latest as of 2.2.1

Did the error happen while the app was being constructed? (buildtime error)

No, although there is an error @Pip3r4o fixed generating the Application class (generates super.getLock()), I think it’s a non issue with the latest internal master?

Did the error happen while the app was executing? (runtime error)

09-01 15:55:49.622    98    98 D Genyd   : Received Set Clipboard
09-01 15:55:49.622    98    98 D Genymotion: Received Set Clipboard
09-01 15:55:52.191   731  1105 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.nativescript.demo/org.myApp.MainActivity (has extras)} from uid 10008 on display 0
09-01 15:55:52.236  2551  2551 I art     : Late-enabling -Xcheck:jni
09-01 15:55:52.242   731  1108 I ActivityManager: Start proc 2551:org.nativescript.demo/u0a66 for activity org.nativescript.demo/org.myApp.MainActivity
09-01 15:55:52.248   425   804 D AudioFlinger: mixer(0xf1e40000) throttle end: throttle time(10)
09-01 15:55:52.255  2551  2551 I TNS.Native: NativeScript Runtime Version 2.2.0, commit 14f63dd23a93cb0d1af9623d72ccf166e722e35a
09-01 15:55:52.255  2551  2551 D TNS.Native: JNI_ONLoad
09-01 15:55:52.255  2551  2551 D TNS.Native: JNI_ONLoad END
09-01 15:55:52.350  1107  1252 E Surface : getSlotFromBufferLocked: unknown buffer: 0xeeacbee0
09-01 15:55:52.405  2551  2551 D TNS.Native: V8 version 4.7.80
09-01 15:55:52.437  2551  2551 D TNS.Native: lenNodes=69396, lenNames=748833, lenValues=877953
09-01 15:55:52.437  2551  2551 D TNS.Native: time=0
09-01 15:55:52.479  2551  2551 D TNS.Java: Enabling NativeScript Debugger Agent
09-01 15:55:52.487  2551  2551 D AndroidRuntime: Shutting down VM
09-01 15:55:52.487  2551  2551 W System.err: java.lang.RuntimeException: Unable to create application org.myApp.Application: com.tns.NativeScriptException: JavaScript object for Java ID 0 not found.
09-01 15:55:52.487  2551  2551 W System.err: Attempting to call method onCreate
09-01 15:55:52.488  2551  2551 W System.err:    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4710)
09-01 15:55:52.488  2551  2551 W System.err:    at android.app.ActivityThread.-wrap1(ActivityThread.java)
09-01 15:55:52.488  2551  2551 W System.err:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
09-01 15:55:52.488  2551  2551 W System.err:    at android.os.Handler.dispatchMessage(Handler.java:102)
09-01 15:55:52.488  2551  2551 W System.err:    at android.os.Looper.loop(Looper.java:148)
09-01 15:55:52.488  2551  2551 W System.err:    at android.app.ActivityThread.main(ActivityThread.java:5417)
09-01 15:55:52.488  2551  2551 W System.err:    at java.lang.reflect.Method.invoke(Native Method)
09-01 15:55:52.488  2551  2551 W System.err:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
09-01 15:55:52.488  2551  2551 W System.err:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
09-01 15:55:52.488  2551  2551 W System.err: Caused by: com.tns.NativeScriptException: JavaScript object for Java ID 0 not found.
09-01 15:55:52.488  2551  2551 W System.err: Attempting to call method onCreate
09-01 15:55:52.488  2551  2551 W System.err:    at com.tns.Runtime.callJSMethodNative(Native Method)
09-01 15:55:52.488  2551  2551 W System.err:    at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:862)
09-01 15:55:52.488  2551  2551 W System.err:    at com.tns.Runtime.callJSMethodImpl(Runtime.java:727)
09-01 15:55:52.488  2551  2551 W System.err:    at com.tns.Runtime.callJSMethod(Runtime.java:713)
09-01 15:55:52.488  2551  2551 W System.err:    at com.tns.Runtime.callJSMethod(Runtime.java:694)
09-01 15:55:52.488  2551  2551 W System.err:    at com.tns.Runtime.callJSMethod(Runtime.java:684)
09-01 15:55:52.488  2551  2551 W System.err:    at org.myApp.Application.onCreate(Application.java:22)
09-01 15:55:52.488  2551  2551 W System.err:    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
09-01 15:55:52.488  2551  2551 W System.err:    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
09-01 15:55:52.488  2551  2551 W System.err:    ... 8 more
09-01 15:55:52.490   731   742 I ActivityManager: START u0 {flg=0x14008000 cmp=org.nativescript.demo/com.tns.ErrorReportActivity (has extras)} from uid 10066 on display 0
09-01 15:55:52.495   731   742 D         : HostConnection::get() New Host Connection established 0xdbaaa080, tid 742
09-01 15:55:52.526   744   744 E EGL_emulation: tid 744: eglCreateSyncKHR(1215): error 0x3004 (EGL_BAD_ATTRIBUTE)
09-01 15:55:52.651  2551  2551 I Process : Sending signal. PID: 2551 SIG: 9
09-01 15:55:52.667   731  1108 I ActivityManager: Process org.nativescript.demo (pid 2551) has died
09-01 15:55:52.683  2574  2574 I art     : Late-enabling -Xcheck:jni
09-01 15:55:52.690   731  1108 I ActivityManager: Start proc 2574:org.nativescript.demo/u0a66 for activity org.nativescript.demo/com.tns.ErrorReportActivity
09-01 15:55:52.708  2574  2574 I TNS.Native: NativeScript Runtime Version 2.2.0, commit 14f63dd23a93cb0d1af9623d72ccf166e722e35a
09-01 15:55:52.708  2574  2574 D TNS.Native: JNI_ONLoad
09-01 15:55:52.708  2574  2574 D TNS.Native: JNI_ONLoad END
09-01 15:55:52.763  2574  2590 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
09-01 15:55:52.772  2574  2574 D         : HostConnection::get() New Host Connection established 0xe7d3f240, tid 2574
09-01 15:55:52.831  2574  2590 D libEGL  : loaded /system/lib/egl/libEGL_emulation.so
09-01 15:55:52.832  2574  2590 D libEGL  : loaded /system/lib/egl/libGLESv1_CM_emulation.so
09-01 15:55:52.836  2574  2590 D libEGL  : loaded /system/lib/egl/libGLESv2_emulation.so
09-01 15:55:52.839  2574  2590 D         : HostConnection::get() New Host Connection established 0xeead2800, tid 2590
09-01 15:55:52.861  2574  2590 I OpenGLRenderer: Initialized EGL, version 1.4
09-01 15:55:52.907  2574  2590 W EGL_emulation: eglSurfaceAttrib not implemented
09-01 15:55:52.907  2574  2590 W OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xeead35a0, error=EGL_SUCCESS
09-01 15:55:53.111   731   756 I ActivityManager: Displayed org.nativescript.demo/com.tns.ErrorReportActivity: +432ms (total +879ms)
^C

Please tell us how to recreate the issue in as much detail as possible.

https://github.com/sitefinitysteve/nativescript-auth0/commits?author=sitefinitysteve

  • Run the Demo app

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 22 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Yeah no doesn’t fix anything… Sorry I haven’t checked in the new code yet… Near total rewrite better api and in TS just haven’t pushed it to git

On Dec 8, 2016 5:54 AM, “Nick Iliev” notifications@github.com wrote:

Hey @sitefinitysteve https://github.com/sitefinitysteve have you managed to resolve your issue? I have tested your demo application and although Google is reporting that I have successfully logged from another device the demo itself is reloading to the auth page (not receiving the token)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NativeScript/android-runtime/issues/546#issuecomment-265712334, or mute the thread https://github.com/notifications/unsubscribe-auth/ABeI6P0kN1DW4iOY2ZpZ-LOhCbnWFmigks5rF-H1gaJpZM4JzEaN .

Keep closed, I think I’ve found the reason for the crashing

Oh yeah sorry i know they aren’t related, just saying it also happens with the custom activity.

So this issue preventing the auth0 custom activity from loading is being addressed and is a real issue?