我一直在使用React Native开发应用程序,当我切换到Mac环境来设置ios的配置时,在完成所有设置之后,应用程序会很快打开并在安装后关闭,显示由反应驱动原生屏幕.我注意到在我的打包程序屏幕中,显示已加载了多少进度的包中的行不会出现,就好像它从未加载过一样.如果我尝试从Xcode运行代码,也会发生同样的事情.
这是我正在谈论的屏幕,对于我开始用于比较目的的测试项目:
这里是我的应用程序的相同屏幕,没有显示进度指示器:
我尝试遵循社区为类似问题提供的一些解决方案,但没有一个有效.请注意,终端窗口中不会显示任何错误消息,就好像构建和安装已成功完成一样.
有人可以帮我这个吗?我已经使用这个应用程序了很长一段时间,因为本机似乎总是崩溃并为我显示错误消息.任何帮助将非常感激 :)
编辑:忘了提到我正在尝试在模拟器上运行应用程序,因为我没有实际的设备.
我在Firebase项目中部署了以下云功能:
exports.createCredentials = functions.https.onCall((data, context) => {
if(!context.auth)
throw new functions.https.HttpsError('failed-auth', 'You must be authenticated to call this function')
const { email, password } = data;
if(!(typeof email === 'string'))
throw new functions.https.HttpsError('invalid-email', 'Email must be a string')
if(!(typeof password === 'string'))
throw new functions.https.HttpsError('invalid-password', 'Password must be a string')
return admin.auth().createUser({
email,
password
})
.then(userRecord => {
return { userRecord }
})
.catch((error) => {
throw new functions.https.HttpsError(error.code, error.message)
})
})
Run Code Online (Sandbox Code Playgroud)
问题是每当我抛出一个新的functions.https.HttpsError而不是在客户端捕获的错误作为文档状态时,我得到一个internal错误代码.在我的函数的日志中,它显示了一个未处理的错误,我尝试调用HttpsError.这是日志的一个例子:
Unhandled …Run Code Online (Sandbox Code Playgroud)