google-api-nodejs-client icon indicating copy to clipboard operation
google-api-nodejs-client copied to clipboard

Trying to download large email (>5MB) throws when options http2: true

Open lopezvit opened this issue 2 years ago • 1 comments

Environment details

  • OS: Linux / Macos
  • Node.js version: v18.10.0
  • npm version: 8.19.2
  • googleapis version: 105/109.0.1

Steps to reproduce

  1. Get a large email from Google API with the options {http2: false}
  2. The function returns the following error:
Could not download email 17d03869ffcd2de1 Error: unexpected end of file
    at Zlib.zlibOnError [as onerror] (node:zlib:189:17)
    at Zlib.callbackTrampoline (node:internal/async_hooks:130:17) {
  errno: -5,
  code: 'Z_BUF_ERROR'
}

Making the same request using the Try this API

Making the same request with the {http2: false} option works as well.

Possibly related with: #3108

lopezvit avatar Nov 14 '22 13:11 lopezvit

I have also observed that. As http2 should be used now instead of batch calls, this is pretty critical thing.

wdanilo avatar Jan 08 '24 04:01 wdanilo