szmarczak / http2-wrapper

Use HTTP/2 the same way like HTTP/1
MIT License
239 stars 18 forks source link

TypeError: Cannot set properties of null (setting 'trailers') #85

Closed DanHelfman closed 2 years ago

DanHelfman commented 2 years ago

Hello!

I am using a process in Apify to validate whether a URL is valid. The process has worked well for some time, but in the last week it began randomly failing with this error (this is an excerpt from our logging):

2021-12-17T02:34:02.887Z /usr/src/app/node_modules/http2-wrapper/source/client-request.js:374
2021-12-17T02:34:02.890Z                res.trailers = trailers;
2021-12-17T02:34:02.892Z                             ^
2021-12-17T02:34:02.894Z 
2021-12-17T02:34:02.897Z TypeError: Cannot set properties of null (setting 'trailers')
2021-12-17T02:34:02.899Z     at ClientHttp2Stream.<anonymous> (/usr/src/app/node_modules/http2-wrapper/source/client-request.js:374:18)
2021-12-17T02:34:02.901Z     at Object.onceWrapper (node:events:510:26)
2021-12-17T02:34:02.904Z     at ClientHttp2Stream.emit (node:events:390:28)

I tried rebuilding the process in Apify to get the newest version automatically, but that did not make a difference. Has anyone reported a similar issue? Are there any known solutions?

Please let me know if I can provide additional information. Thank you!

szmarczak commented 2 years ago

I'm aware of this issue and it has been fixed in http2-wrapper@2.1.10.

szmarczak commented 2 years ago

https://github.com/szmarczak/http2-wrapper/issues/84

DanHelfman commented 2 years ago

Thank you! I updated my package.json to specify http2-wrapper@2.1.10.

szmarczak commented 2 years ago

You can test this e.g. by visiting https://www.tek.com/en/keithley via Apify