You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem occurs only in Firebase emulator with functions that take more than 120 seconds of processing.
I have an onCall function which I run with timeoutSeconds 180 seconds. In this function, I do processing for over 130 seconds.
After the process is done, the function doesn't return any result and also doesn't finish. Therefore, it gets "idle" until the timeout (180 seconds) is reached and then throws the timeout error. Then the user who did the call doesn't get any response.
Steps to reproduce
exports.setTestEnvironment = functions
.runWith({
timeoutSeconds: 180,
})
.https.onCall(async (data: any, context: any) => {
try {
await new Promise(resolve => setTimeout(resolve, 130000)); // // Sleep for 130 seconds, simulating processing for test purposes.
console.log('Done. Should return success and finish execution');
return {
success: true,
};
} catch (error) {
throw new functions.https.HttpsError('invalid-argument', error.message);
}
});
Expected behavior
And the json response to the user...
{
"result": {
"success": true
}
}
Actual behavior
User gets "ERR_EMPTY_RESPONSE".
This error only happens with the Firebase Emulator, and I'm not able to test my app correctly. The function works fine when it's deployed.
I have not encountered this issue in github nor stackoverflow, which should be very straight forward to get.
Feel free to ask any question or present any workaround.
Thanks.
The text was updated successfully, but these errors were encountered:
Environment info
firebase-tools: 10.1.5
Platform: Windows
Node: 12.21.0
Test case
Problem occurs only in Firebase emulator with functions that take more than 120 seconds of processing.
I have an onCall function which I run with timeoutSeconds 180 seconds. In this function, I do processing for over 130 seconds.
After the process is done, the function doesn't return any result and also doesn't finish. Therefore, it gets "idle" until the timeout (180 seconds) is reached and then throws the timeout error. Then the user who did the call doesn't get any response.
Steps to reproduce
Expected behavior
And the json response to the user...
Actual behavior
User gets "ERR_EMPTY_RESPONSE".
This error only happens with the Firebase Emulator, and I'm not able to test my app correctly. The function works fine when it's deployed.
I have not encountered this issue in github nor stackoverflow, which should be very straight forward to get.
Feel free to ask any question or present any workaround.
Thanks.
The text was updated successfully, but these errors were encountered: