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

React native url == null (WebsocketProvider) #2864

Closed
helllynx opened this issue Jun 2, 2019 · 4 comments
Closed

React native url == null (WebsocketProvider) #2864

helllynx opened this issue Jun 2, 2019 · 4 comments
Labels
2.x 2.0 related issues Needs Clarification Requires additional input

Comments

@helllynx
Copy link

helllynx commented Jun 2, 2019

Description

Hi) While writing an application on RN, there were problems with catching exceptions during internet connection loss. If I have already call new Web3.providers.WebsocketProvider(urlConfig); then when the connection is lost, the application crashes without causing try/catch.

Expected behavior

Calling new Web3.providers.WebsocketProvider(urlConfig); when connection lost must throw some exception.

Actual behavior

Just crash without logs in logger, but with screen logs.

Error Logs

rn_web3

Versions

web3: 1.0.0-beta.55
react-native: 0.59.4

Thank you!

@nivida
Copy link
Contributor

nivida commented Jun 3, 2019

Could you create a GitHub repository with an example project where this error happens? Otherwise, it will be hard to reproduce this issue 1:1.

@helllynx
Copy link
Author

helllynx commented Jun 3, 2019

@nivida here repo. I took the main project and delete unnecessary parts, I apologize for the unnecessary dependences =(

For reproduce:

Run app, then push button, in logs you seee some events. The easiest way to reproduce is to connect the phone by USB, running the build and then turn off Wi-Fi or cellular network. You need wait some timeout, about 10 sec.

@sirpy
Copy link

sirpy commented Jan 7, 2020

bug in react native
see PR for fix
facebook/react-native#27702

@nivida
Copy link
Contributor

nivida commented Jan 9, 2020

@sirpy Thanks for proposing this PR in the react-native repository. I will close this issue now but feel free to ping me here again if the issue is still existing after the PR got merged and released.

@nivida nivida closed this as completed Jan 9, 2020
facebook-github-bot pushed a commit to facebook/react-native that referenced this issue Jan 19, 2021
Summary:
Conform with Websocket javascript api.
related to web3js issues: web3/web3.js#2864 web3/web3.js#2602

Reviewed By: javache

Differential Revision: D25927475

Pulled By: TheSavior

fbshipit-source-id: 26b2df0565dac581d546b6824dd4f0fc2c8cdc32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x 2.0 related issues Needs Clarification Requires additional input
Projects
None yet
Development

No branches or pull requests

3 participants