Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

WebsocketProvider on React-Native url == null #2602

@jacksonng77

Description

@jacksonng77

I am on 1.0.0-beta.50 and React-Native 0.57 via expo SDK 32.0

I am trying to connect to a private ethereum node with the following codes:

const web3 = new Web3(
	new Web3.providers.WebsocketProvider('wss://u0yyyar44q-u0nczix681-wss.us-east-2.kaleido.io', {headers:{authorization: 'Basic dTBxdGxkcTVkdzpMWFh5WUtLVzIyZEFJUDhTNm9sWEFSbzNkZDFEYkYwS1VYc3laUm5saXVv'}})
);

web3.eth.getBlock("latest").then((latestBlock) => {
console.log("Latest Block Via HTTP Provider: ")
console.log(latestBlock);

I am unable to connect to my node. The following error is shown.

url == null

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAddressing a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions