-
Notifications
You must be signed in to change notification settings - Fork 906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON string was partially returned when running function via Emulator #1474
Comments
Also having this issue. It seems that JSON payloads beyond a certain size are partially returned. The response also includes ERR_CONTENT_LENGTH_MISMATCH network error in chrome. Downgrading to firebase-tools@6 (and associated firebase-admin and firebase-functions) fixes the issue. |
@nilinyi thanks for the detailed bug report! Hopefully the fix will be simple (and @keeganbrown the point about |
Ok I have a simple reproduction: exports.helloWorld = functions.https.onRequest((request, response) => {
const numItems = request.param('num');
const obj = {};
let i = 0;
while (i < numItems) {
obj[uuidv1()] = uuidv1();
i++;
}
response.header('x-num-items', "" + i);
response.send(obj);
}); If I use small parameters for I found the line (in this specific example). 2808 works but 2909 does not:
So the "too big" line is somewhere between 219025 and 219103 |
@abeisgoat the only clue I have here is that in |
Environment info
firebase-tools:
7.0.2
Platform:
macOS
Test case
Here is the code:
Steps to reproduce
Run a firebase emulator using the code above and send a http GET request to path /test.
Expected behavior
The returned json is partial. Here is the returned json based on the above code:
Actual behavior
It should return the complete json.
The text was updated successfully, but these errors were encountered: