我的应用程序有10个云功能,它们在android模拟器和poster中运行良好。其中最简单的就是
exports.verifySeller = functions.https.onCall((data)=>{
return admin.firestore().collection("sellers").doc(data.sellerId).get().then(val=>{
if( !val ){
throw new Error('Not exist');
}
var resp = JSON.stringify({
order:val.data()
})
return resp;
}).catch(err=>{
var resp = JSON.stringify({
success:false,
message:err.message
})
console.log('Error occured ', err )
return resp;
})
});
它给出了";超过截止日期";从实际设备使用时出错。我浏览了所有的文章和stackoverflow查询,但没有发现任何与此相关的内容。
Err Error: DEADLINE_EXCEEDED
at D:MySpaceNodenativeodicustomernode_modules@react-native-firebasefunctionslibindex.js:72
at onSuccess (D:MySpaceNodenativeodicustomerscreensOrderSellerSelect.js:92)
at onPress (D:MySpaceNodenativeodicustomerscreensOrderSellerSelect.js:159)
at Pressability._performTransitionSideEffects (D:MySpaceNodenativeodicustomernode_modulesreact-nativeLibrariesPressabilityPressability.js:697)
at Pressability._receiveSignal (D:MySpaceNodenativeodicustomernode_modulesreact-nativeLibrariesPressabilityPressability.js:634)
at onResponderRelease (D:MySpaceNodenativeodicustomernode_modulesreact-nativeLibrariesPressabilityPressability.js:530)
at Object.invokeGuardedCallbackImpl (D:MySpaceNodenativeodicustomernode_modulesreact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:265)
at invokeGuardedCallback (D:MySpaceNodenativeodicustomernode_modulesreact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:476)
at invokeGuardedCallbackAndCatchFirstError (D:MySpaceNodenativeodicustomernode_modulesreact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:500)
根据其他文章,这可能是网络问题,但我已经与各种网络提供商进行了交叉检查,仍然得到了相同的结果。我必须为实际设备配置任何东西才能使功能正常工作吗?任何帮助都将不胜感激。谢谢
在尝试了很多事情之后,我决定在云中部署这些功能。现在运行良好。由于我已经在本地设备模拟器中测试了这些功能,我想我可以继续做决定了。我只是每天监控配额,它足以在真实设备中测试功能。