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

Error on connection to LAOS networks #10954

Closed
asiniscalchi opened this issue Sep 25, 2024 · 16 comments
Closed

Error on connection to LAOS networks #10954

asiniscalchi opened this issue Sep 25, 2024 · 16 comments
Assignees
Labels
Bug Tracks issues causing errors or unintended behavior, critical to fix for reliability.

Comments

@asiniscalchi
Copy link
Contributor

all laos network are experiencing the following error on connection:

Uncaught error. Something went wrong with the query and rendering of this component. Please supply all the details below when logging an issue, it may help in tracing the cause.

createType(AccountId):: Invalid AccountId provided, expected 32 bytes, found 20

Error: createType(AccountId):: Invalid AccountId provided, expected 32 bytes, found 20
at o (https://polkadot.js.org/apps/modu.6724c4c4ec0fc7a7.js:1:87040)
at J.createType (https://polkadot.js.org/apps/modu.d704469d4359a33d.js:2:48759)
at Array.<anonymous> (https://polkadot.js.org/apps/comm.bf3973086a259e8c.js:693:1230)
at D (https://polkadot.js.org/apps/comm.bf3973086a259e8c.js:693:1820)
at P (https://polkadot.js.org/apps/comm.bf3973086a259e8c.js:693:2176)
at https://polkadot.js.org/apps/comm.bf3973086a259e8c.js:743:195
at Object.zi [as useState] (https://polkadot.js.org/apps/modu.bd8f3266470441f0.js:2:80363)
at https://polkadot.js.org/apps/modu.bd8f3266470441f0.js:2:223782
at https://polkadot.js.org/apps/comm.bf3973086a259e8c.js:743:189
at _i (https://polkadot.js.org/apps/modu.bd8f3266470441f0.js:2:77446)

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Flaos-rpc.dwellir.com#/accounts
image

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.laossigma.laosfoundation.io#/accounts
image

@asiniscalchi
Copy link
Contributor Author

it seems it's the api the problem:
I run locally polkadot.js and it works with the following:
image

but the one published is not working with:
image


So it seems
v10.12.6 working.
v13.2.1 not working.

@asiniscalchi
Copy link
Contributor Author

find out that we are missing some metadata LAOS side:
2024-09-26 11:26:37 PORTABLEREGISTRY: Unable to determine runtime Call type, cannot inspect sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic

@asiniscalchi
Copy link
Contributor Author

the error was exposed by this delta : polkadot-js/api@v13.0.1...v13.1.1

It should be the usage of metadata V15.

@piggydoughnut
Copy link
Contributor

Thank you for such a great debug 🙏🏽 The update to v15 is in the works. So hopefully soon all will be 🚀 😊

@asiniscalchi
Copy link
Contributor Author

asiniscalchi commented Sep 27, 2024

Hi @piggydoughnut is there any tool that could check if our metadata is correct ?
I really scared that the problem is our side but I dunno how to verify it.
( and it's a kind of critic bug for us ... our users can't interact with the chain )

@asiniscalchi
Copy link
Contributor Author

The line that is failing:

: statics.registry.createType('AccountId', addr as string).toU8a();

@asiniscalchi asiniscalchi changed the title Error on connection to laos networks Error on connection to LAOS networks Sep 27, 2024
@piggydoughnut
Copy link
Contributor

Hey @asiniscalchi, sorry for delay, this will solve crashing explorer - #10967 Should be up soon.

Investigating the format issue now.

@piggydoughnut piggydoughnut self-assigned this Sep 30, 2024
@tonimateos
Copy link

tonimateos commented Oct 1, 2024

image
image
image

Hi @piggydoughnut, thanks for your help on this issue! The patch solved the crash issue. In case it helps, these are the final issues still remaining:

  • impossible to add an H160 address in the address-book tab (see screenshot, the save button is always disabled)
  • balances not shown (see screenshots)

Let us know if there's anything we can help with. The LAOS team would definitely prioritise providing support.

Thanks!
Toni

@piggydoughnut
Copy link
Contributor

piggydoughnut commented Oct 1, 2024

Hai @tonimateos !
Thanks a lot for providing the information about the other issues - it certainly helped :)
All the fixes are pushed now, everything should work fine after the next api release which should be soonish (2 weeks max)

P.S. Here are sneak peeks of the fixes 😉

Screenshot 2024-10-01 at 20 38 55 Screenshot 2024-10-01 at 20 38 31

@piggydoughnut piggydoughnut added the Bug Tracks issues causing errors or unintended behavior, critical to fix for reliability. label Oct 14, 2024
@asiniscalchi
Copy link
Contributor Author

asiniscalchi commented Oct 15, 2024

Hi @piggydoughnut ,
I just realized the new version was deployed and the parsing of the H160 addresses seems to be fixed. Thanks!
However another problem arised: Subwallet and Talisman are unable to sign transaction and fail with the following error:

image

  • Is a problem from their side?
  • Why the other H160 parachians ( Moonbeam, Darwinia ) do not have this kind of behavior ? What's the difference ?

@piggydoughnut
Copy link
Contributor

@asiniscalchi I suspect it is still on our side, will check and let you know asap.

@TarikGul
Copy link
Member

Hey @asiniscalchi

We found the source of the issue. To get straight to the point, the most straightforward solution would be if Laos adds the runtime api metadata to V15 Metadata.

The issue is that there is a runtime call here being called in the api when signing happens. Laos has support for it, but because its not in the metadata it requires the api to use the hardcoded generation here which resolves to using AccountId which is Accountid32.

@asiniscalchi
Copy link
Contributor Author

asiniscalchi commented Oct 15, 2024

We'll code an hotfix as soon as possible.
Thanks a lot for the help.

@asiniscalchi
Copy link
Contributor Author

We have a fix:
freeverseio/laos#821

@asiniscalchi
Copy link
Contributor Author

hotfix deployed in LAOS mainnet ... all is working. Thanks for the help.

@polkadot-js-bot
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Tracks issues causing errors or unintended behavior, critical to fix for reliability.
Projects
None yet
Development

No branches or pull requests

5 participants