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

XMLHttpRequest': The response type cannot be set after the request has been sent #1114

Closed
1 of 2 tasks
wangzhiqiang1975 opened this issue May 16, 2017 · 4 comments
Closed
1 of 2 tasks

Comments

@wangzhiqiang1975
Copy link

Note: for support questions, please use one of these channels: stackoverflow or slack

You want to:

  • report a bug
  • request a feature

Current behaviour

When I use React-Native 0.4.4 and socket.io-client testing remote message ,program can be connected server and get json string ,but system error "XMLHttpRequest': The response type cannot be set after the request has been sent

Steps to reproduce (if the current behaviour is a bug)

Note: the best way to get a quick answer is to provide a failing test case, by forking the following fiddle for example.

Expected behaviour

Setup

  • OS:Mac os 10.12.5
  • browser: IOS10.1 Simulator
  • socket.io version:2.0.1

2017-05-16 22 15 33

Other information (e.g. stacktraces, related issues, suggestions how to fix)

@wangzhiqiang1975
Copy link
Author

I down version from 2.0.1 to 1.7.4 fix it Thanks lots

@darrachequesne
Copy link
Member

I think that is linked to socketio/engine.io-client#562, but it shouldn't throw an error.

=> facebook/react-native#13991

@colorfulberry
Copy link

colorfulberry commented Jun 6, 2017

@wangzhiqiang1975 I down the version also works for me. Thanks

But io.connect(url, { transports: ['websocket'] }); use this maybe better

@marceloch2
Copy link

Adding { transports: ['websocket'] } works for me as well.

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