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

Failed to subscribe to new newBlockHeaders to confirm the transaction receipts. #19

Closed
damarnez opened this issue Nov 16, 2019 · 5 comments

Comments

@damarnez
Copy link

damarnez commented Nov 16, 2019

When I try to interact with my smart contracts and I wait the response with a promise or async , the conection web3 connected to the wallet walletlink throw this error:

image

I write a simple example, for test and appears the same error:
https://github.com/damarnez/walletlink_example

The line that we get the throw are :

await contracts.TestDani.methods.set(magicNumber).send({ from: address });

Is a simple transaction and wait the response from the chain. With others wallets works perfectly..

Feels like the problem is Infura doesn't allow newBlockHeaders by spec.https://infura.io/docs/#supported-json-rpc-methods

What can I do?

Infura : https://kovan.infura.io/v3/ ****
Web3 version : 1.2.1
WalletLink: 1.0.0

@swkim109
Copy link

Same issue here. I have tried to use wss:// but did not work.
Infura: https://rinkeby.infura.io/v3/***
Web3 1.2.4
Walletlink 1.0.0
And is there any websocket provider such as walletLink.makeWebsocketProvider?

@mrjoedang
Copy link

Same issue here (using the Kovan network of Infura) when trying to authorize a transaction.

@damarnez
Copy link
Author

damarnez commented Feb 19, 2020

I was checking the source and the problem is that the walletlink provider doesn't support websocket. One fast solution is to make this fix on your source.

const walletLink = new WalletLink({
  appName: 'Example Company',
  appLogoUrl: `https://static.example.com/favicons/favicon.ico`
});

const wallet = walletLink.makeWeb3Provider(
  `https://mainnet.infura.io/v3/YOUR_TOKEN_INFURA`,
  1
);

// FIX BUG: Walletlink bug with web3
wallet.on = null;

With this fix, we force the Provider to connect to the chain only with https.

@petejkim
Copy link
Contributor

This is fixed in 2.0.0

@damarnez
Copy link
Author

Thanks!! :D

hieronymus777 pushed a commit that referenced this issue Nov 18, 2021
Set client type based on User-Agent header
bangtoven pushed a commit that referenced this issue Feb 29, 2024
…LinkRelay & RelayAbstract (#19)

* add scwConnector

* use connector, subsequent requetss

* rmv noisy enable call from testapp

* delete scwrelay and move files

* comment

* close popup after addresses are recieved

* cleanup

* move subsequent request handler into private method

* remember scw connection type, skip relay selection flow for subsequent requests

* dont change testapp

* fix return existing accounts condition

* pr feedback

* re-delete removed files after rebase

* fix tests

* lint

* tsc

* define ConnectorInterface

* make providers connector more generic

* rmv extension req handler

* move scw request logic to connector

* async

* add back closeChildWindow

* request and response typing and naming

* rmv dead walletlink code for now
bangtoven pushed a commit that referenced this issue Feb 29, 2024
…LinkRelay & RelayAbstract (#19)

* add scwConnector

* use connector, subsequent requetss

* rmv noisy enable call from testapp

* delete scwrelay and move files

* comment

* close popup after addresses are recieved

* cleanup

* move subsequent request handler into private method

* remember scw connection type, skip relay selection flow for subsequent requests

* dont change testapp

* fix return existing accounts condition

* pr feedback

* re-delete removed files after rebase

* fix tests

* lint

* tsc

* define ConnectorInterface

* make providers connector more generic

* rmv extension req handler

* move scw request logic to connector

* async

* add back closeChildWindow

* request and response typing and naming

* rmv dead walletlink code for now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants