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

"Fork locally" breaks UI completely #10738

Closed
2 of 7 tasks
nazar-pc opened this issue Jul 8, 2024 · 6 comments · Fixed by #10835
Closed
2 of 7 tasks

"Fork locally" breaks UI completely #10738

nazar-pc opened this issue Jul 8, 2024 · 6 comments · Fixed by #10835

Comments

@nazar-pc
Copy link
Contributor

nazar-pc commented Jul 8, 2024

  • I'm submitting a ...

    • Bug report
    • Feature request
    • Support request
    • Other
  • What is the current behavior and expected behavior?

Try to open https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-0.gemini-3h.subspace.network%2Fws#/explorer or https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-1.gemini-3h.subspace.network%2Fws#/explorer and click "Fork Locally".

Not quite sure what that is, but after that the whole UI turns into blank white screen and I see following in the console:

panicked at src/task.rs:131:6:
called `Result::unwrap()` on an `Err` value: RuntimeVersion(RuntimeVersionDecode)

Stack:

we/e.wbg.__wbg_new_abda76e883ba8a5f@https://polkadot.js.org/apps/dyna.51a85f1e8a072e3a.js:2:14711
@https://polkadot.js.org/apps/dyna.51a85f1e8a072e3a.js line 2 > WebAssembly.Module:wasm-function[1118]:0x19865d
@https://polkadot.js.org/apps/dyna.51a85f1e8a072e3a.js line 2 > WebAssembly.Module:wasm-function[1354]:0x1a1281
@https://polkadot.js.org/apps/dyna.51a85f1e8a072e3a.js line 2 > WebAssembly.Module:wasm-function[1234]:0x19dfde
@https://polkadot.js.org/apps/dyna.51a85f1e8a072e3a.js line 2 > WebAssembly.Module:wasm-function[113]:0xb8361
@https://polkadot.js.org/apps/dyna.51a85f1e8a072e3a.js line 2 > WebAssembly.Module:wasm-function[645]:0x17344c
@https://polkadot.js.org/apps/dyna.51a85f1e8a072e3a.js line 2 > WebAssembly.Module:wasm-function[1482]:0x1a2772
se@https://polkadot.js.org/apps/dyna.51a85f1e8a072e3a.js:2:9812
a@https://polkadot.js.org/apps/dyna.51a85f1e8a072e3a.js:2:17978

RuntimeError: unreachable executed

This seems to come from Polkadot.js apps itself (likely somewhere in WASM) and possibly caused by the fact that we have an extra field in our RuntimeVersion data structure, but it worked before and I don't understand why would it break the whole UI completely.

Opening another tab doesn't help, the only thing that helps is to specify a different endpoint of some chain in URL manually so it "forgets" what it was trying to do.

At very least I would have expected for UI to not break irrecoverably.

  • Please tell us about your environment:
  • Version: apps v0.141.2-1
  • Environment:
    • Node.js
    • Browser
    • Other (limited support for other environments)
@TarikGul
Copy link
Member

I don't have a huge in depth knowledge of chopsticks, so I am not completely sure why it is failing. cc @qiweiii

That being said happy to add a disable option for Fork Locally if that would help.

@qiweiii
Copy link
Contributor

qiweiii commented Jul 12, 2024

Could be need to update its version.

I should add some tests so this can be detected in ci.

@qiweiii
Copy link
Contributor

qiweiii commented Jul 12, 2024

Update chopsticks version did not work, but fortunately local forks still work for other chains.

May need to take some time to fix this issue. Meanwhile @nazar-pc to recover from white screen, another solution is to remove localFork field in dev tool -> application -> localStorage

So there are 2 things to fix/check

  • On chopsticks side, make sure it works for subspace
  • on pjs app, make sure local fork failure is recoverable

@qiweiii
Copy link
Contributor

qiweiii commented Aug 15, 2024

The linked pr will solve this.

For subspace chain, local fork won't be able to support it, since the Runtime Version include extra field, and that will fail in smoldot (chopsticks use smoldot as wasm executor), and it's unlikely they will allow custom fields

@nazar-pc
Copy link
Contributor Author

Right, I think that is the smallest issue, we have a completely different consensus that wouldn't work with Smalldot anyway, so disabling that feature for such chains makes sense to me.

@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 Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants