tangle
tangle copied to clipboard
[BUG] Too much recursion in services pallet
Overview
Certain function in the services pallet cause the Polkadot Portal to crash with the following:
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.
too much recursion
a@https://polkadot.js.org/apps/modu.47baa25d4dde3144.js:2:483768
componentDidUpdate@https://polkadot.js.org/apps/comm.784b368c99ba7e6e.js:4102:19685
componentDidMount@https://polkadot.js.org/apps/comm.784b368c99ba7e6e.js:4102:19550
Su@https://polkadot.js.org/apps/modu.bd8f3266470441f0.js:2:115204
wu@https://polkadot.js.org/apps/modu.bd8f3266470441f0.js:2:114979
wu@https://polkadot.js.org/apps/modu.bd8f3266470441f0.js:2:114878
wu@https://polkadot.js.org/apps/modu.bd8f3266470441f0.js:2:114878
bu@https://polkadot.js.org/apps/modu.bd8f3266470441f0.js:2:114517
52967/ks/<@https://polkadot.js.org/apps/modu.bd8f3266470441f0.js:2:126297
ks@https://polkadot.js.org/apps/modu.bd8f3266470441f0.js:2:126808
ss@https://polkadot.js.org/apps/modu.bd8f3266470441f0.js:2:120564
$o@https://polkadot.js.org/apps/modu.bd8f3266470441f0.js:2:61292
52967/os/<@https://polkadot.js.org/apps/modu.bd8f3266470441f0.js:2:117969
Reproduction
- Start a Tangle node with the latest v1.2.10 release
- Go to the portal
- Select any of the functions that take a
Field(call,request, etc.) - Observe the crash
Using subxt cli I get the following:
subxt explore --url https://testnet-rpc.tangle.tools pallet services calls call
The application panicked (crashed).
Message: : Cannot generate scale value example for recursive type: Type { path: Path { segments: ["tangle_primitives", "services", "field", "FieldType"] }, type_params: [], type_def: Variant(TypeDefVariant { variants: [Variant { name: "Void", fields
: [], index: 0, docs: [] }, Variant { name: "Bool", fields: [], index: 1, docs: [] }, Variant { name: "Uint8", fields: [], index: 2, docs: [] }, Variant { name: "Int8", fields: [], index: 3, docs: [] }, Variant { name: "Uint16", fields: [], index: 4,
docs: [] }, Variant { name: "Int16", fields: [], index: 5, docs: [] }, Variant { name: "Uint32", fields: [], index: 6, docs: [] }, Variant { name: "Int32", fields: [], index: 7, docs: [] }, Variant { name: "Uint64", fields: [], index: 8, docs: [] },
Variant { name: "Int64", fields: [], index: 9, docs: [] }, Variant { name: "String", fields: [], index: 10, docs: [] }, Variant { name: "Optional", fields: [Field { name: None, ty: UntrackedSymbol { id: 131, marker: PhantomData<fn() -> core::any::Ty
peId> }, type_name: Some("Box<FieldType>"), docs: [] }], index: 12, docs: [] }, Variant { name: "Array", fields: [Field { name: None, ty: UntrackedSymbol { id: 12, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("u64"), docs: [] },
Field { name: None, ty: UntrackedSymbol { id: 131, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Box<FieldType>"), docs: [] }], index: 13, docs: [] }, Variant { name: "List", fields: [Field { name: None, ty: UntrackedSymbol { id:
131, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Box<FieldType>"), docs: [] }], index: 14, docs: [] }, Variant { name: "Struct", fields: [Field { name: None, ty: UntrackedSymbol { id: 132, marker: PhantomData<fn() -> core::any
::TypeId> }, type_name: Some("BoundedVec<Box<FieldType>, ConstU32<32>>"), docs: [] }], index: 15, docs: [] }, Variant { name: "AccountId", fields: [], index: 100, docs: [] }] }), docs: [] }
Location: /Users/shady/.cargo/registry/src/index.crates.io-6f17d22bba15001f/subxt-cli-0.37.0/src/utils.rs:182
But sometimes it does work: