Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Custom Event log not capturing in Firebase console, err #140

Closed
benskarunya opened this issue Sep 12, 2019 · 2 comments
Closed

Android Custom Event log not capturing in Firebase console, err #140

benskarunya opened this issue Sep 12, 2019 · 2 comments
Labels
android Relates to Android platform documentation Documentation issue legacy Related to inherited code/functionality

Comments

@benskarunya
Copy link

benskarunya commented Sep 12, 2019

Hi, i debugged using logcat and find the below error,
E/FirebasePlugin: org.json.JSONException: Value Rainfall Forecast Tile at 1 of type java.lang.String cannot be converted to JSONObject
2019-09-12 13:43:01.120 29916-30080/com.sdfsdfsd W/CordovaPlugin: Attempted to send a second callback for ID: FirebasePlugin216393764 Result was: "Invalid action"

And it is capturing the screenview correctly but only problem is custom Event log, sample script,
FirebasePlugin.logEvent("Market_Prices", "Grain");

Same working good for the iOS version. Please advice

i am using Ionic 3 with cordova 9.0.0,

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1) 

local packages:

@ionic/app-scripts : 3.2.4
Cordova Platforms  : android 8.0.0 ios 5.0.1
Ionic Framework    : ionic-angular 3.7.1

System:

ios-sim : 8.0.1 
Node    : v10.16.0
npm     : 6.9.0 
OS      : macOS
Xcode   : Xcode 10.3 Build version 10G8 

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro
@benskarunya benskarunya changed the title Android Event log not capturing in Firebase console, err Android Custom Event log not capturing in Firebase console, err Sep 12, 2019
@dpa99c
Copy link
Owner

dpa99c commented Sep 12, 2019

The second argument of logEvent() should be a key/value object of user properties, not a string as demonstrated here. This is what the native code expects.

But I agree that the documentation inherited from cordova-plugin-firebase doesn't make the expected parameter types clear - I'll update the documentation to add this.

@dpa99c dpa99c added android Relates to Android platform documentation Documentation issue legacy Related to inherited code/functionality labels Sep 12, 2019
@benskarunya
Copy link
Author

Thanks dpa99c, will try this.

@dpa99c dpa99c closed this as completed in 44f1163 Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Relates to Android platform documentation Documentation issue legacy Related to inherited code/functionality
Projects
None yet
Development

No branches or pull requests

2 participants