Issues filed here should be about bugs in __the code in this repository__.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:
I'm getting DEADLINE_EXCEEDED exception when trying to call a function and sending a base64 payload with it.
Just call a function with a large enough payload and the exception will trigger.
Important to notice that the second time that I call it the function works properly. Probably the cold-start time of the function contributes to this problem.
What happened? How can we make the problem occur?
I think that the problem is on the writeTimeout of the OkHttp client. I'm not an expert of that library but it may be possible that the setTimeout function is just about the complete call and not the upload part. Here's the reference
https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.Builder.html#writeTimeout-java.time.Duration-
Have you tried using setTimeout to increase the timeout on the HttpsCallableReference?
https://firebase.google.com/docs/reference/android/com/google/firebase/functions/HttpsCallableReference.html#setTimeout(long,%20java.util.concurrent.TimeUnit)
@matteobucci Can you include the full, call trace, so that we can see exactly what is exceeding the deadline? Thanks!
I have this problem every cold execution.
I tried withTimeout(30, TimeUnit.SECONDS), but the exception still the same:
Caused by: java.net.SocketTimeoutException: failed to connect to <uri> (port 443) after 10000ms
I have the same problem as well. It happens the first time the onCall function is invoked. Sometimes It throws this exception even when the function completes successfully.
Hi @matteobucci usually, the error message "Error: 4 DEADLINE_EXCEEDED: Deadline Exceeded." is possibly caused by a write operation hitting the quota per second limit. Here’s our documentation for more details.
If this isn’t the case, could you provide the following information in order for us to know what might be causing the issue:
Additionally, here’s a related Stack Overflow post which might help.
Hey @matteobucci. We need more information to resolve this issue but there hasn't been an update in 7 days. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@matteobucci if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Most helpful comment
I have the same problem as well. It happens the first time the onCall function is invoked. Sometimes It throws this exception even when the function completes successfully.