Skip to main content
8 votes

How do I fix a failed build error [E0635]: unknown feature 'proc_macro_span_shrink'?

I got the same issue today and rustup update doesn't work. And I came to an idea. rm -fr target Cargo.lock cargo check that's it. But anyone know what's the cause of it?
Jinhui's user avatar
  • 81
7 votes

How do I fix a failed build error [E0635]: unknown feature 'proc_macro_span_shrink'?

For those who are having the same problem since version 1.72.0, you need to do the same: pause updates of nightly rust. You can do this by editing rust-toolchain.toml file: [toolchain] channel = "...
Timofey Bugaevsky's user avatar
6 votes
Accepted

smart contract function call error

This is because of Shibuya has updated to Weights v2. If you are getting this error on polkadot.js we are working on a fix for it https://github.com/polkadot-js/apps/pull/8538. If you are getting this ...
Nikhil Ranjan's user avatar
5 votes
Accepted

Pre-dispatch Error

The transaction is not really put back if verification fails with InvalidTransaction::ExhaustsResources, it is just kept in the transaction pool. You can find some notes about it here: https://github....
NachoPal's user avatar
  • 514
4 votes
Accepted

Cannot find TryInto (compilation error) after it was pruned from prelude

As @apopiak had suggested in the comments, your Cargo.toml is still set as the 2018 edition of Rust, hence it is not able to locate TryInto in the prelude. My guess is that if you change it to 2021, ...
Keith Yeung's user avatar
  • 2,121
4 votes
Accepted

Thread 'tokio-runtime-worker' panicked at 'Storage root must match that calculated

The error is saying that at some point your node computed an incorrect state-root compared to the one that was written in the block header by a validator who authored the block. The cause can be ...
kianenigma's user avatar
  • 2,799
4 votes

Runtime panic when peering with node:

The issue might be that initial_authorities accounts don't have any funds, and therefore they don't exist. The error you see comes from the staking module, presumably because it didn't get any valid ...
André's user avatar
  • 2,455
4 votes
Accepted

Balance transfer fails when sending to the AccountIndex

This is not supported on-chain: https://github.com/paritytech/polkadot/blob/fb2c9ae0eece5a79356f7e7271cf3232f0143b0c/runtime/westend/src/lib.rs#L155 You always need to do the id lookup off-chain. ...
Bruno's user avatar
  • 8,365
4 votes
Accepted

How to use an Error define in one pallet in another pallet

trait Config: frame_system::Config + another_pallet::Config {} fn example<T>() -> DispatchError where T: Config { Err(<another_pallet::Error<T>>::AnotherError) }
AurevoirXavier's user avatar
  • 10.5k
4 votes
Accepted

Cyclic deps in substrate?

Cyclic dependencies are not allowed by Rust in general. I looked into the specific error that is being brought up here. Package frame-election-provider-support has a dependency on frame-election-...
Shawn Tabrizi's user avatar
  • 16k
4 votes
Accepted

XCM error. OverweightEnqueued event instead of opening HRMP channel

Well, this is because requireWeightAtMost you specified is greater than umpMaxIndividualWeight, you should use the values from my answer in your other question(5,000,000,000), hrmp.hrmpInitOpenChannel ...
Guantong's user avatar
  • 1,848
4 votes

How do I fix a failed build error [E0635]: unknown feature 'proc_macro_span_shrink'?

I got the same issue, rustup default stable solved it
wiiznokes3's user avatar
4 votes
Accepted

Upgrading to `polkadot-v0.9.30` throws "no function or associated item named `benchmarks`"

Update your runtime/Cargo.toml from: runtime-benchmarks = [ "frame-system-benchmarking", ... ] to runtime-benchmarks = [ "frame-system-benchmarking/runtime-benchmarks",...
Peter - R0GUE's user avatar
4 votes

smart contract function call error

It looks like the same issue still occurs in 2023, moreover I realised that now interacting with Smart Contracts on https://polkadot.js.org/apps/ is broken as well. The only way to interact with them ...
Pawel's user avatar
  • 41
3 votes

(FIXED) Substrate forkless upgrade tutorial: pallet_scheduler has breaking changes

Indeed, there is a new version for the Scheduler pallet and the tutorial needs to be updated according to it. This pull request mentions the necessary changes. In the meantime, just set the following ...
Iker's user avatar
  • 1,356
3 votes
Accepted

Use macros in a custom pallet tutorial doesn't compile

The problem is that you placed sp-std import into the dev-dependencies rather than the regular dependencies. Your file should like: [package] name = "pallet-template" version = "4.0.0-...
Shawn Tabrizi's user avatar
  • 16k
3 votes
Accepted

Guide or Best practice for parachain Runtime Upgrade(Exception handle or rollback)!

I would say that once a para is in the process of upgrading, the new validation function will eventually be set, and that should be without any action from your side. Seems that your para ended up ...
Alejandro Martínez's user avatar
3 votes

Collator panicked at 'Storage root must match that calculated.'

This is probably related to the broken state cache. See here for more information. For now you can run your nodes with --state-cache-size 0 to prevent this bug.
bkchr's user avatar
  • 11.3k
3 votes
Accepted

How do I fix a failed build error [E0635]: unknown feature 'proc_macro_span_shrink'?

rustup default nightly-2022-07-24 && rustup target add wasm32-unknown-unknown IMO, it's always good to follow the latest Polkadot release CI's Rust toolchain. https://github.com/paritytech/...
AurevoirXavier's user avatar
  • 10.5k
3 votes

How do I fix a failed build error [E0635]: unknown feature 'proc_macro_span_shrink'?

The tracking issue on the rust github is this: https://github.com/rust-lang/rust/issues/113152 In short, removing Cargo.lock and recompiling should fix this.
Pegasis's user avatar
  • 131
3 votes
Accepted

DispatchError::Other(_) always being mapped to DispatchError::Other("")

The reason goes back to the fact that DispatchError::Other has a special annotation that nullifies the encoding of the inner &'static str: pub enum DispatchError { /// Some error occurred. ...
kianenigma's user avatar
  • 2,799
3 votes

Parachain to Parachain XCM transfer 1010 bad signature error

There error that you are getting is a Transaction validity BadProof error. The Rust docs have some possible causes that may be helpful: /// General error to do with the transaction's proofs (e.g. ...
Bruno's user avatar
  • 8,365
3 votes

Problem deploying smart contract on rococo

Actually, this: smart contract function call error solved my question. It seems that Polkadot documentation is not up to date.
Nikola Bozin's user avatar
3 votes

how to resolve? error[E0422]: cannot find struct, variant or union type `LineColumn` in crate `proc_macro`

I was having the same issue in my GitHub actions and not locally. Updating my crates using cargo update seemed to fix the dependency that was causing this issue. Perhaps give this a try!
DJJ's user avatar
  • 63
3 votes

How to solve this error: associated type `BlockNumber` not found for `T`?

According to the Polkadot Release Analysis v1.0.0, GenesisBuild has been has been deprecated in favor of BuildGenesisConfig. Here is an example of how to use: #[pallet::genesis_config] #[derive(...
Bruno's user avatar
  • 8,365
2 votes

Thread 'tokio-runtime-worker' panicked at 'Storage root must match that calculated

When you say "updated node" what exactly do you mean? In substrate networks all nodes are updated at once - as soon as the network upgrade transaction is executed. This is because every node ...
T9b's user avatar
  • 468
2 votes

Runtime upgrade error: system.FailedToExtractRuntimeVersion

We've managed to upgrade the runtime and save the block history. It's still not clear what was the exact root cause, but we've created a runtime from scratch and added all of the FRAME pallets. After ...
vovacha's user avatar
  • 148
2 votes
Accepted

Error: 'tikv-jemalloc-sys' fails to build after upgrading substrate-based chain on WSL2

None of the given solutions worked for me. Later when I had my whole directory in the WSL2 file system (instead of the windows file system like earlier) and tried the build command, it worked for me.
SRG's user avatar
  • 36
2 votes

Error: 'tikv-jemalloc-sys' fails to build after upgrading substrate-based chain on WSL2

Got a similar issue when running builds on Ubuntu. Managed to resolve it by installing jemalloc via sudo apt install libjemalloc2
chexware's user avatar
  • 325
2 votes

Error: failed to instantiate a new WASM module instance: Insufficient resources: cannot create a memf"

This is probably not Substrate/Polkadot related, rather your execution operation system is for some reason blocking this particular system call. Try executing memfd_create from C or some other ...
kianenigma's user avatar
  • 2,799

Only top scored, non community-wiki answers of a minimum length are eligible