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

Only the first package's request is loaded - needs component reload to see other packages #6963

Open
Ten0 opened this issue Jan 3, 2024 · 1 comment · May be fixed by #8284
Open

Only the first package's request is loaded - needs component reload to see other packages #6963

Ten0 opened this issue Jan 3, 2024 · 1 comment · May be fixed by #8284
Assignees
Labels
A-grpc Area: GRPC / GRPC Protocol B-bug Bug: general classification S-unverified Status: Unverified by maintainer

Comments

@Ten0
Copy link

Ten0 commented Jan 3, 2024

In the request view, only the initially selected request's package list is loaded.
When jumping from one request to another without changing request type (gRPC, HTTP), Insomnia loses all knowledge of the available packages:
image

This means you basically need to reload Insomnia every time you want to select a different request.

This seems to be because 1e54dae#diff-fa19a1544a824dfa7ffa4d2ae0bdd35ec8268f8d9beee660b8d7da09069b3050 moved the hook that loaded the methods from a useAsync (that triggers on every action) to a useMount, that only triggers upon component load:

useMount(async () => {
if (!activeRequest.protoFileId) {
return;
}
console.log(`[gRPC] loading proto file methods pf=${activeRequest.protoFileId}`);
const methods = await window.main.grpc.loadMethods(activeRequest.protoFileId);
setGrpcState({ ...grpcState, methods });
});

This implies that "loading proto file methods" only triggers for the first request, but not when changing request.

This matches the behavior we see: if jumping from a gRPC request to an HTTP request then to a gRPC request, the new gRPC request will get loaded. But if jumping directly from gRPC to gRPC, the second one is not loaded.

In the DevTools console, we can see [gRPC] loading proto file methods when changing request type or anything else that removes the gRPC request pane, but not when changing request, but that is probably just because the log is only written on component load, and not properly factored elsewhere.

Insomnia Version

2023.5.8

What operating system are you using?

Linux

Installation method

deb (self-packed)

Last Known Working Insomnia version

2022.7.0

@Ten0 Ten0 added B-bug Bug: general classification S-unverified Status: Unverified by maintainer labels Jan 3, 2024
@Ten0 Ten0 changed the title Only the first package's request is loaded - needs app restart to see other packages Only the first package's request is loaded - needs component reload to see other packages Jan 4, 2024
@gatzjames gatzjames added the A-grpc Area: GRPC / GRPC Protocol label Jan 31, 2024
@Elrendio
Copy link

Hey 👋 Any news? Thanks 🙏

@ryan-willis ryan-willis self-assigned this Jan 9, 2025
@ryan-willis ryan-willis linked a pull request Jan 17, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-grpc Area: GRPC / GRPC Protocol B-bug Bug: general classification S-unverified Status: Unverified by maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants