Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Android Cloud Functions Change Timeout

I'm using Firebase Cloud Functions library on Android and using getHttpsCallable to call a cloud function.

The problem is that the function needs 15-20 seconds to return the result back to the client, so the client throws an exception java.net.SocketTimeoutException: timeout.

Is there any way to change the timeout?

like image 612
Ahmed Abdelmeged Avatar asked Apr 12 '26 20:04

Ahmed Abdelmeged


1 Answers

The most recent version of the SDK adds setTimeout and withTimeout methods that let you configure a custom timeout.

See the docs here: https://firebase.google.com/docs/reference/android/com/google/firebase/functions/HttpsCallableReference

Release Notes: https://firebase.google.com/support/release-notes/android

like image 119
bklimt Avatar answered Apr 14 '26 10:04

bklimt