Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit c933177

Browse files
Error: Tried to serialize an unsupported type: java.util.HashMap #1004
1 parent 19190a3 commit c933177

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/firebase.android.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,11 @@ firebase.toJsObject = javaObj => {
252252
node[item.getKey()] = firebase.toJsObject(item.getValue());
253253
}
254254
} catch (e) {
255-
console.log("PLEASE REPORT THIS AT https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues: Tried to serialize an unsupported type: " + javaObj.getClass().getName() + ", error: " + e);
255+
if (JSON.stringify(e).indexOf("Attempt to use cleared object reference") > -1) {
256+
console.log("Error while transforming Java to Js: " + e);
257+
} else {
258+
console.log("PLEASE REPORT THIS AT https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues: Tried to serialize an unsupported type: " + javaObj.getClass().getName() + ", error: " + e);
259+
}
256260
}
257261
}
258262
return node;

0 commit comments

Comments
 (0)