react-native firebase 在 class com.facebook.react.bridge.ReadableNativeMap 上找不到要序列化的属性

react-native firebase No properties to serialize found on class com.facebook.react.bridge.ReadableNativeMap

自从我从firebase web SDK切换到react-native-firebase后,我无法在注册用户后在数据库上创建用户节点。我收到以下错误(在 windows 上):

https://i.imgur.com/sddZEeY.png

在 Mac、我 运行 和 Android 上,应用程序没有崩溃,但它没有在数据库上设置节点。但是,它适用于 iOS。

摘自package.json:

   "react-native": "0.54.2"
   "react-native-firebase": "^4.1.0"

在我的 android build.gradle 我有:

dependecies{
...
    implementation "com.google.android.gms:play-services-base:15.0.0"
    implementation "com.google.firebase:firebase-core:15.0.2"
    implementation "com.google.firebase:firebase-auth:15.1.0"
    implementation "com.google.firebase:firebase-messaging:15.0.2"
    implementation "com.google.firebase:firebase-database:15.0.0"
}

Tested only on android.

消息的其余部分。调试器中没有显示错误。

No properties to serialize found on class com.facebook.react.bridge.ReadableNativeMap
<init>
    null
zza
    null
zzi
    null
zzh
    null
zza
    null
setValue
    null
set
    RNFirebaseDatabase.java:332
invoke
    Method.java
invoke
    JavaMethodWrapper.java:374
invoke
    JavaModuleWrapper.java:162
run
    NativeRunnable.java
handleCallback
    Handler.java:751
dispatchMessage
    Handler.java:95
dispatchMessage
    MessageQueueThreadHandler.java:31
loop
    Looper.java:154
run
    MessageQueueThreadImpl.java:194
run
    Thread.java:761

以及之前有效的操作:

//register
export const registerUser = (
  {
    userName, //name of the user
    userEmail, //email of the user
    password //pw of the user
  },
  onSuccess, //callback()
  onFail // callback(showDialog[bool], { dialogTitle, dialogBody })
) => {
  console.log("register user", userEmail, password);
  return dispatch => {
    firebase
      .auth()
      .createUserWithEmailAndPassword(userEmail, password)
      .then(user => {
        console.log("registering user.uid: ", user.uid);
        firebase
        .database()
        .ref(`${DBREF_USERS}${user.uid}`)
        .set({
          name: userName,
          email: userEmail,
          id: user.uid
        }, 
        dispatch({
          type:REGISTER_SUCCESS,
          payload: user.uid
        }))
        onSuccess();
      })
      .catch(error =>
        onFail(true, {
          dialogTitle: I18n.t("alert_dialog_title"),
          dialogBody: error.message
        })
      );
  };
};

我已经尝试了许多其他方法来让它工作,但 none 做到了。我也没有在 google 上找到任何专门针对本机反应的内容。有任何想法吗?

这是 react-native@0.54.2 上的错误。

升级到 react-native@0.54.4 或更高版本以解决此问题。