polkadot-js / apps

Basic Polkadot/Substrate UI for interacting with a Polkadot and Substrate node. This is the main user-facing application, allowing access to all features available on Substrate chains.
https://dotapps.io
Apache License 2.0
1.75k stars 1.55k forks source link

Error on connection to `LAOS` networks #10954

Closed asiniscalchi closed 4 weeks ago

asiniscalchi commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

the error was exposed by this delta : https://github.com/polkadot-js/api/compare/v13.0.1...v13.1.1

It should be the usage of metadata V15.

piggydoughnut commented 1 month ago

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

asiniscalchi commented 1 month ago

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 commented 1 month ago

The line that is failing: https://github.com/polkadot-js/apps/blob/6d20dfc291a5a2be882cc01ce0eda5273551e143/packages/react-components/src/AccountName.tsx#L52

piggydoughnut commented 1 month ago

Hey @asiniscalchi, sorry for delay, this will solve crashing explorer - https://github.com/polkadot-js/apps/pull/10967 Should be up soon.

Investigating the format issue now.

tonimateos commented 1 month ago

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:

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

Thanks! Toni

piggydoughnut commented 1 month ago

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
asiniscalchi commented 1 month ago

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

piggydoughnut commented 1 month ago

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

TarikGul commented 1 month ago

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 commented 1 month ago

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

asiniscalchi commented 1 month ago

We have a fix: https://github.com/freeverseio/laos/pull/821

asiniscalchi commented 4 weeks ago

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

polkadot-js-bot commented 3 weeks ago

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.