insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

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

Open Ten0 opened this issue 2 years ago • 1 comments

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 https://github.com/Kong/insomnia/commit/1e54dae260d1aae2ddc95ca09b21f962b5d609e9#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: https://github.com/Kong/insomnia/blob/d2599d6f42e56b4e0fc3bd90b0013e610cdbefe0/packages/insomnia/src/ui/components/panes/grpc-request-pane.tsx#L81-L88

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 avatar Jan 03 '24 19:01 Ten0

Hey :wave: Any news? Thanks 🙏

Elrendio avatar Aug 13 '24 13:08 Elrendio