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

Prevented uncaught exception if body is null (fixes MS Edge getReader bug) #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

charlesfries
Copy link

No description provided.

@marinav
Copy link

marinav commented Nov 25, 2019

@jhiesey can you merge this pr ? I'm stuck like @charlesfries with this problem. Thank you

@feross
Copy link
Collaborator

feross commented May 5, 2020

Can you submit a unit test with this fix?

@truelson
Copy link

truelson commented Feb 9, 2021

This one is a bit difficult to submit a test fix with. Edge is now based on chrome and does not exercise this now, and haven't been able to get a copy of legacy edge on mac.

But that is not my problem. I am seeing body be undefined on a fetch in an android webview on a status 401, but can't quite get the test setup to duplicate it in these tests.

The fix is essentially a null check, low risk, and the proper way to test it would be via an actual unit test on the class, not getting express to do something a little funky in an integration test.

This current bug breaks the https://github.com/Yaffle/EventSource polyfill when it's used with the commonly used https://github.com/parshap/node-libs-react-native library that uses stream-http.

I would really rather you allowed this in. Thank you!!

@OpenSystemsConsulting
Copy link

We have an app running in an Android webview and with the latest release last week of Chrome webview (113.0.5672.76) (any version we tested with a major version 113) we started having an issue with am unhandled promise exception

Unhandled Promise rejection: Cannot read properties of null (reading 'getReader') ; Zone: ; Task: Promise.then ; Value: TypeError:

We had no problems with any other versions of webview we tested with.

This change appears to have fixed our issue (found it after spending most of the day testing/debugging)

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

Successfully merging this pull request may close these issues.

5 participants