- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
自从我从 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
})
);
};
};
我已经尝试了许多其他方法来让它工作,但没有一个成功。我也没有在谷歌上发现任何特别 react native 的东西。有任何想法吗?
最佳答案
这是 react-native@0.54.2
上的错误。
升级到 react-native@0.54.4
或更新版本以解决此问题。
关于javascript - react-native firebase 在类 com.facebook.react.bridge.ReadableNativeMap 上找不到要序列化的属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50360629/
考虑: InsertDataToServer = () => { const { pinValue1 } = this.state; const { pinValue2 } = this.st
我有一个自定义标记图像,并想使用一个变量来表示图像的不透明度。我执行以下操作并遇到此错误“无法将不透明度的值从 ReadableNativeMap 转换为加倍” var status=1; th
我在 React Native 工作, 我用 PHP用于后端以及当我使用 fetch POST请求我收到如此奇怪的错误,我不知道为什么会发生。我检查了网址,所以它没有问题,也正常fetch()在没有
自从我从 firebase web SDK 切换到 react-native-firebase 后,我无法在注册用户后在数据库上创建用户节点。我收到以下错误(在 Windows 上): https:/
我是一名优秀的程序员,十分优秀!