LSP code action: InternalError: request handler panicked: invalid offset #12755
Unanswered
tushar-saxena-yral
asked this question in
Troubleshooting
Replies: 2 comments 1 reply
-
Apparently the issue goes away when i delete some code. I will post the code snippet exhibits the issue for me: use crate::state::canisters::authenticated_canisters;
use leptos::{component, expect_context, view, IntoView, ServerFnError};
use crate::try_or_redirect_opt;
use crate::component::icons::notification_icon::NotificationIcon;
use yral_canisters_common::Canisters;
#[component]
pub fn PndWithdrawal() -> impl IntoView {
let auth_cans = authenticated_canisters();
let is_own_account = auth_cans.derive(
move || principal,
move |cans_wire, principal| async move {
let cans_wire = cans_wire?;
let canisters = Canisters::from_wire(cans_wire, expect_context())?;
Ok::<_, ServerFnError>(canisters.user_principal() == principal)
},
);
let is_own_account = try_or_redirect_opt!(is_own_account()?);
view! {
<div class="min-h-screen w-full flex flex-col text-white pt-2 pb-12 bg-black items-center">
<div id="back-nav" class="flex flex-col items-center w-full gap-20 pb-16">
<Title justify_center=false>
<div class="flex flex-row justify-between">
<BackButton fallback="/" />
<span class="font-bold text-2xl">Withdraw</span>
<Show when=move || is_own_account>
<a href="/wallet/notifications" disabled=true class="text-xl font-semibold">
<NotificationIcon show_dot=false classes="w-8 h-8 text-neutral-600".to_string() />
</a>
</Show>
</div>
</Title>
</div>
</div>
}
} If, however, i delete the auth_cans related code, code actions start working again. use crate::state::canisters::authenticated_canisters;
use leptos::{component, expect_context, view, IntoView, ServerFnError};
use crate::try_or_redirect_opt;
use crate::component::icons::notification_icon::NotificationIcon;
use yral_canisters_common::Canisters;
#[component]
pub fn PndWithdrawal() -> impl IntoView {
let is_own_account = true;
view! {
<div class="min-h-screen w-full flex flex-col text-white pt-2 pb-12 bg-black items-center">
<div id="back-nav" class="flex flex-col items-center w-full gap-20 pb-16">
<Title justify_center=false>
<div class="flex flex-row justify-between">
<BackButton fallback="/" />
<span class="font-bold text-2xl">Withdraw</span>
<Show when=move || is_own_account>
<a href="/wallet/notifications" disabled=true class="text-xl font-semibold">
<NotificationIcon show_dot=false classes="w-8 h-8 text-neutral-600".to_string() />
</a>
</Show>
</div>
</Title>
</div>
</div>
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
The error lines in the log are printed to stderr by rust-analyzer - it's a panic within rust-analyzer rather than Helix |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I am using rust analyzer with helix to work on a leptos based project. When trying to use the code action
<space>a
, helix says internal error.However, this only happens in one specific file even though it is setup exactly same way the rest of the files are.
Other lsp features such as goto definition,
<space>k
, etc are working fine.Reproduction Steps
I tried this:
hx
<space>a
I expected this to happen:
Instead, this happened:
Helix log
~/.cache/helix/helix.log
Platform
Linux
Terminal Emulator
kitty 0.39.1
Installation Method
arch official repo
Helix Version
helix 25.01.1
Beta Was this translation helpful? Give feedback.
All reactions