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

XHR request not supported by stream-http getReader() of undefined #10043

Closed
marinav opened this issue Nov 27, 2019 · 6 comments
Closed

XHR request not supported by stream-http getReader() of undefined #10043

marinav opened this issue Nov 27, 2019 · 6 comments

Comments

@marinav
Copy link

marinav commented Nov 27, 2019

Bug report

What is the current behavior?

I need to send xhr requests to set up Cypress tests in my project, unfortunatly, even if the request succeed, i can't access data because of dependencies used by webpack: (node-libs-browser and stream-http). It triggers this error :

Cannot read property 'getReader' of undefined

because response.js file in stream-http package need a response.body and is empty.

I saw an open PR on stream-http package but I don't know if it will be merged one day. So I tried to desactivate node in webpack settings (https://webpack.js.org/configuration/node/) but I have another error :

'crypto' is undefined

If the current behavior is a bug, please provide the steps to reproduce.

To simulate an xhr request I delete win.fetch in my Cypress file, but you can do it in the project directly. And I have whatwg-fetch polyfill installed.

What is the expected behavior?

I would like to send xhr request and get the answer.

Other relevant information:
webpack version: 4.41.2
Node.js version: 10.15.3
Operating System: Mac osx

@marinav marinav changed the title XHR request not supported by stream-http getReader() unknown XHR request not supported by stream-http getReader() of undefined Nov 27, 2019
@webpack-bot
Copy link
Contributor

This issue had no activity for at least three months.

It's subject to automatic issue closing if there is no activity in the next 15 days.

@alexander-akait
Copy link
Member

@marinav sorry for delay, problem still exists?

@marinav
Copy link
Author

marinav commented Feb 27, 2020

@evilebottnawi I stop trying to use Cypress I had too much problems so it's not a problem no more.

@alexander-akait
Copy link
Member

@marinav thanks for feedback, I will close this problem if you have problems in the future feel free to open a problem, next time we will try to answer you as soon as possible, I apologize again for not being able to respond on time, thanks

@truelson
Copy link

truelson commented Feb 9, 2021

I am seeing this on a 401 in an android webview and it's blocking use of the https://github.com/Yaffle/EventSource polyfill for us. Would greatly appreciate accepting the fix.

@truelson
Copy link

truelson commented Feb 9, 2021

jhiesey/stream-http#110

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

No branches or pull requests

4 participants