B4J Question FCM push

tsteward

Well-Known Member
Licensed User
Longtime User
I am trying to implement firebase push messaging into my B4A app which I think I have done but using the FCM B4J send program (found here) I get this error
I have set the projectID and entered the path to json file used by b4a app
Messaging is enabled in the firebase console
Waiting for debugger to connect...
Program started.
Error occurred on line: 71 (Main)
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:132)
at anywheresoftware.b4j.object.JavaObject.RunMethodJO(JavaObject.java:139)
at b4j.example.main._gettokenvalue(main.java:154)
at b4j.example.main$ResumableSub_Send.resume(main.java:105)
at b4j.example.main._send(main.java:76)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:629)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:234)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:100)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:98)
at b4j.example.main.main(main.java:29)
Caused by: java.io.IOException: Error reading credentials from stream, 'type' field not specified.
at com.google.auth.oauth2.GoogleCredentials.fromStream(GoogleCredentials.java:170)
at com.google.auth.oauth2.GoogleCredentials.fromStream(GoogleCredentials.java:143)
... 24 more
 
Hi, I cannot be 100% sure but this message "java.lang.reflect.InvocationTargetException" indicates that some values you pass into a sub or function are not of the correct type.
 
Upvote 0

Similar Threads

  • Question Question
Replies
7
Views
8K
  • Question Question
B4J Question FCM Running Slow
Replies
13
Views
7K
Replies
1
Views
2K
Replies
38
Views
44K
Replies
2
Views
13K
Back
Top