Nativescript-plugin-firebase: Tried to serialize an unsupported type: android.support.v4.util.ArrayMap

Created on 7 Aug 2018  Â·  4Comments  Â·  Source: EddyVerbruggen/nativescript-plugin-firebase

Hey man!

Using plugin 6.4.1 I got the message below, so opening an issue like you requested. Let me know if you need anything else.

Cheers!

JS: PLEASE REPORT THIS AT https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues: Tried to serialize an unsupported type: android.support.v4.util.ArrayMap, error: Error: java.lang.IllegalStateException: This container does not support retaining Map.Entry objects
JS:     android.support.v4.util.MapCollections$MapIterator.equals(MapCollections.java:136)
JS:     com.tns.NativeScriptWeakHashMap.get(NativeScriptWeakHashMap.java:452)
JS:     com.tns.Runtime.getJavaObjectID(Runtime.java:936)
JS:     com.tns.Runtime.getOrCreateJavaObjectID(Runtime.java:944)
JS:     com.tns.Runtime.callJSMethodNative(Native Method)
JS:     com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1116)
JS:     com.tns.Runtime.callJSMethodImpl(Runtime.java:996)
JS:     com.tns.Runtime.callJSMethod(Runtime.java:983)
JS:     com.tns.Runtime.callJSMethod(Runtime.java:967)
JS:     com.tns.Runtime.callJSMethod(Runtime.java:959)
JS:     com.tns.gen.com.google.android.gms.tasks.OnCompleteListener.onComplete(OnCompleteListener.java:16)
JS:     com.google.android.gms.tasks.zzj.run(U...

Updated today to NS 4.2, but I saw it also on 4.1:

$ tns info
✔ Getting NativeScript components versions information...
✔ Component nativescript has 4.2.0 version and is up to date.
✔ Component tns-core-modules has 4.2.0 version and is up to date.
✔ Component tns-android has 4.2.0 version and is up to date.
✔ Component tns-ios has 4.2.0 version and is up to date.
Android Authentication bug

Most helpful comment

Thanks for reporting this!

Looks like fi. the Facebook profile returns a "complex" data structure (android.support.v4.util.ArrayMap) which the plugin can't parse and ignores it.

I've now added support for this type (and android.util.ArrayMap - for older Android versions), which means you'll get more Facebook profile data once the user has logged in.

All 4 comments

Thanks for reporting this!

Looks like fi. the Facebook profile returns a "complex" data structure (android.support.v4.util.ArrayMap) which the plugin can't parse and ignores it.

I've now added support for this type (and android.util.ArrayMap - for older Android versions), which means you'll get more Facebook profile data once the user has logged in.

@EddyVerbruggen any chance you can release this as 6.4.2 instead of waiting for 6.5.0?

Many thanks!

Perhaps I will because the 6.5.0 release depends on Google releasing an update to their Firebase Android SDK and I have no idea when that will happen.

That would be awesome!

(I prefer not to commit unreleased versions of plugins out of fear later on there will be breaking changes that I am aware of).

Was this page helpful?
0 / 5 - 0 ratings