-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Websocket on 1.0.0-beta.52 (TypeError: The header content contains invalid characters) #2754
Labels
2.x
2.0 related issues
Needs Clarification
Requires additional input
Stale
Has not received enough activity
Comments
Could you create a repository to reproduce this? |
@nivida i added you to our repo (branch is "spectrum") |
Could you add the URL of the repository here? |
nivida
added
Needs Clarification
Requires additional input
and removed
more information needed
labels
Oct 8, 2019
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions |
This was referenced Feb 16, 2023
This was referenced Feb 23, 2023
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
Stale
Has not received enough activity
Description
I'm getting the following error when reading infura's websocket endpoint on a new Web3 instance.
`TypeError: The header content contains invalid characters
at validateHeader (_http_outgoing.js:494:11)
at ClientRequest.setHeader (_http_outgoing.js:498:3)
at new ClientRequest (_http_client.js:173:14)
at Object.request (http.js:38:10)
at Object.request (https.js:243:15)
at Object.request (/Users/gmaister/Desktop/workspace/Carbon/carbon.js/node_modules/agent-base/patch-core.js:23:20)
at WebSocketClient.connect (/Users/gmaister/Desktop/workspace/Carbon/carbon.js/node_modules/websocket/lib/WebSocketClient.js:254:56)
at new W3CWebSocket (/Users/gmaister/Desktop/workspace/Carbon/carbon.js/node_modules/websocket/lib/W3CWebSocket.js:62:18)
at ProvidersModuleFactory.createWebsocketProvider (/Users/gmaister/Desktop/workspace/Carbon/carbon.js/node_modules/web3-providers/dist/web3-providers.cjs.js:1262:22)
at new WebsocketProvider$1 (/Users/gmaister/Desktop/workspace/Carbon/carbon.js/node_modules/web3-providers/dist/web3-providers.cjs.js:1328:39)
at Object. (/Users/gmaister/Desktop/workspace/Carbon/carbon.js/Routes/v1/spectrum/util/scanForTransactionETH.js:25:23)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function._load (/Users/gmaister/Desktop/workspace/Carbon/carbon.js/node_modules/@sentry/node/dist/integrations/console.js:41:47)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/Users/gmaister/Desktop/workspace/Carbon/carbon.js/Routes/v1/spectrum/index.js:20:44)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
Failed Code Snippet
const networkToUseWS =
wss://mainnet.infura.io/ws
;console.log(chalk.magenta('url: ', networkToUseWS));
const web3 = new Web3(new Web3.providers.WebsocketProvider(networkToUseWS));
Versions
The text was updated successfully, but these errors were encountered: