I have 10 cloud functions for my application and they work fine from an android emulator and from postman. Simplest one of them is -
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;
})
});
It gives "deadline exceeded" error when using from an actual device. I have gone through all the articles and stackoverflow queries but not found anything relevant to this.
Err Error: DEADLINE_EXCEEDED
at D:\MySpace\Node\native\odicustomer\node_modules\@react-native-firebase\functions\lib\index.js:72
at onSuccess (D:\MySpace\Node\native\odicustomer\screens\Order\SellerSelect.js:92)
at onPress (D:\MySpace\Node\native\odicustomer\screens\Order\SellerSelect.js:159)
at Pressability._performTransitionSideEffects (D:\MySpace\Node\native\odicustomer\node_modules\react-native\Libraries\Pressability\Pressability.js:697)
at Pressability._receiveSignal (D:\MySpace\Node\native\odicustomer\node_modules\react-native\Libraries\Pressability\Pressability.js:634)
at onResponderRelease (D:\MySpace\Node\native\odicustomer\node_modules\react-native\Libraries\Pressability\Pressability.js:530)
at Object.invokeGuardedCallbackImpl (D:\MySpace\Node\native\odicustomer\node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:265)
at invokeGuardedCallback (D:\MySpace\Node\native\odicustomer\node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:476)
at invokeGuardedCallbackAndCatchFirstError (D:\MySpace\Node\native\odicustomer\node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:500)
According to other articles it might be network issue but I have cross checked with various network providers and still get the same result. Do I have to configure anything for an actual device for the function to work ? Any help will be much appreciated. Thanks.