Skip to content

[Android >= 33] firebase request permessions causing app crash #144

Closed
@kefahB

Description

@kefahB

Hi @triniwiz :)

Firebase crash the app on requesting permissions, It working fine before upgrading to NS 8.3.5!

  System.err: An uncaught Exception occurred on "main" thread.
  System.err: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=1001, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {com.cocarz/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onRequestPermissionsResult failed
  System.err: Error: java.lang.ArrayIndexOutOfBoundsException: int[] offset=0 length=1 src.length=0
  System.err:
  System.err: StackTrace:
  System.err: java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=1001, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {com.cocarz/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onRequestPermissionsResult failed
  System.err: Error: java.lang.ArrayIndexOutOfBoundsException: int[] offset=0 length=1 src.length=0
  System.err: 	at android.app.ActivityThread.deliverResults(ActivityThread.java:5347)
  System.err: 	at android.app.ActivityThread.handleSendResult(ActivityThread.java:5386)
  System.err: 	at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
  System.err: 	at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
  System.err: 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
  System.err: 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
  System.err: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
  System.err: 	at android.os.Handler.dispatchMessage(Handler.java:106)
  System.err: 	at android.os.Looper.loopOnce(Looper.java:201)
  System.err: 	at android.os.Looper.loop(Looper.java:288)
  System.err: 	at android.app.ActivityThread.main(ActivityThread.java:7898)
  System.err: 	at java.lang.reflect.Method.invoke(Native Method)
  System.err: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
  System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
  System.err: Caused by: com.tns.NativeScriptException: Calling js method onRequestPermissionsResult failed
  System.err: Error: java.lang.ArrayIndexOutOfBoundsException: int[] offset=0 length=1 src.length=0
  System.err: 	at com.tns.Runtime.callJSMethodNative(Native Method)
  System.err: 	at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1302)
  System.err: 	at com.tns.Runtime.callJSMethodImpl(Runtime.java:1188)
  System.err: 	at com.tns.Runtime.callJSMethod(Runtime.java:1175)
  System.err: 	at com.tns.Runtime.callJSMethod(Runtime.java:1153)
  System.err: 	at com.tns.Runtime.callJSMethod(Runtime.java:1149)
  System.err: 	at com.tns.NativeScriptActivity.onRequestPermissionsResult(NativeScriptActivity.java:71)
  System.err: 	at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:8759)
  System.err: 	at android.app.Activity.dispatchActivityResult(Activity.java:8617)
  System.err: 	at android.app.ActivityThread.deliverResults(ActivityThread.java:5340)
  System.err: 	... 13 more
  System.err: Caused by: java.lang.ArrayIndexOutOfBoundsException: int[] offset=0 length=1 src.length=0
  System.err: 	... 23 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions