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

HTTP/2 session is closed while file beeing uploaded #504

Open
yacovg opened this issue Mar 31, 2023 · 0 comments
Open

HTTP/2 session is closed while file beeing uploaded #504

yacovg opened this issue Mar 31, 2023 · 0 comments
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@yacovg
Copy link

yacovg commented Mar 31, 2023

I'm trying to upload files to google drive with http2 set to true
and the await on the create method is never reached (works with http2: false).

google.drive({
      version: 'v3',
      timeout: 30000,
      auth,
      http2: true
    });

    try {
      const data = {
        media: {
          mimeType,
          body: Readable.from(buffer)
        },
        requestBody: {
          name,
          parents: [directoryId]
        }
      };

      const resp = await this.drive.files.create(data);

After some debugging I noticed that the http2 session is beeing destroyed after 500ms (http2.js ln:172)
If I change the 500ms to some big number then the upload process is finished succesfully

        sessionData.timeoutHandle = setTimeout(() => {
            closeSession(url);
        }, 500);

Environment details

  • OS: Ubuntu 20 (wsl2)
  • Node.js version: v16.16.0
  • npm version: v8.11.0
  • googleapis-common version: 6.0.4

Steps to reproduce

  1. just upload file with google drive cline with http2 set to true
@yacovg yacovg added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants