Skip to content
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

Functions chunky response #12914

Open
nmalevich opened this issue May 8, 2024 · 3 comments
Open

Functions chunky response #12914

nmalevich opened this issue May 8, 2024 · 3 comments

Comments

@nmalevich
Copy link

Description

I write response by chunks. On my local server it works, but Firebase Function return response only after "res.end()"

exports.cloudFunctionEntryPoint = async (req, res) => {
    setTimeout(()=>{
        res.write("1\n");
    }, 1000)
    setTimeout(()=>{
        res.write("2\n");
    }, 2000)
    setTimeout(()=>{
        res.write("3\n");
    }, 3000)
    setTimeout(()=>{
        res.write("4\n");
    }, 4000)
    setTimeout(()=>{
        res.write("5\n");
        res.end();
    }, 5000)
}

Reproducing the issue

No response

Firebase SDK Version

10.25.0

Xcode Version

15.3

Installation Method

Swift Package Manager

Firebase Product(s)

Functions

Targeted Platforms

iOS

Relevant Log Output

No response

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!
@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@rizafran
Copy link
Contributor

rizafran commented May 9, 2024

Hi @nmalevich, could you provide a code snippet of your Firebase Functions and iOS code invoking the function so I could reproduce it on my end? Thanks.

@nmalevich
Copy link
Author

Thank you for your reply. My general question about having possibility to implement streaming data(sending response by chunks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants