NickRimmer / insomnia-plugin-request-navigator

Lost in Requests? Let's Navigate with new beauty tabs ~_~
https://insomnia.rest/plugins/insomnia-plugin-request-navigator
27 stars 6 forks source link

I do not see tabs open for each new request #25

Open smiller0924 opened 10 months ago

smiller0924 commented 10 months ago

When I click a new request in Insomnia it does not open as a tab. Is there a configuration function that I need to setup?

NickRimmer commented 10 months ago

Hi @smiller0924, Could you please confirm you are using the latest versions of Insomnia and Plugin? Recently Insomnia had a major update and changed a lot in background

Nerwin commented 10 months ago

I have the same issue, it was working well before the recent major update of insomnia. I have the latest Insomnia version and the latest version of the plugin. A tab is showing when starting Insomnia, but as soon as i click a new request, the whole tab bar disappears

NickRimmer commented 9 months ago

When the application started and you faced such issue, could you please open dev tools (ctrl+alt+i) and send me example if there are any errors.

Unfortunately, I cannot reproduce it and I need you help (=

smiller0924 commented 9 months ago

That's the thing. There are no errors. It just doesn't run. Not sure what you are looking for from the DEV Tools. If you give me an idea I could narrow it down for you and send you what you need. Thank you.

jeanchristopheMICHEL commented 9 months ago

After upgrade from V2023.5.5 to v2023.5.8, tabs are now availble. I hope that this post can help you

lmorganl commented 9 months ago

Plugin is not working again with 8.0 :(

smiller0924 commented 9 months ago

I'm on Insomnia 2023.5.8. the plug in does not work. How do you engage it? Is there a trigger of a setting in the plugin? You instructions are a bit sparse on the details.

Thank you.

lmorganl commented 9 months ago

in 2023.5.8 after each start i need to click on menu : tools/reload plugins

Pimpnase commented 9 months ago

Same with Insomnia v8.2.0. The plugin isn't loaded on startup and doesn't show tabs at all. Only a manual refresh via Tools → Reload Plugins, as @lmorganl state does show the tabs (and then it works wonderfully). They also appear, if you open Preferences → Plugins, but my guess is, that they reload the plugins when showing the page, so same problem.

The problem only exist when starting/opening Insomnia. Once the plugin is loaded, it works without problems. On startup there is the following error in the dev-tools console:

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'props')
    at initRouter (/Users/[USER]/Library/Application Support/Insomnia/plugins/insomnia-plugin-request-navigator/index.js:2771:72)
    at connect (/Users/[USER]/Library/Application Support/Insomnia/plugins/insomnia-plugin-request-navigator/index.js:2912:8)
    at waitForConnectionAsync (/Users/[USER]/Library/Application Support/Insomnia/plugins/insomnia-plugin-request-navigator/index.js:3726:8)
    at sentryWrapped (helpers.ts:98:17)
alexander-veshkin commented 9 months ago

Same for me, but could not see any tabs - tried to reload plugins, disable all plugins exept this, clean storage. ins 8.2.0

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'props')
    at initRouter (/Users/[USER]/Library/Application Support/Insomnia/plugins/insomnia-plugin-request-navigator/index.js:2771:72)
    at connect (/Users/[USER]/Library/Application Support/Insomnia/plugins/insomnia-plugin-request-navigator/index.js:2912:8)
    at waitForConnectionAsync (/Users/[USER]/Library/Application Support/Insomnia/plugins/insomnia-plugin-request-navigator/index.js:3726:8)
    at sentryWrapped (helpers.ts:98:17)
NickRimmer commented 9 months ago

Plugin is not working again with 8.0 :(

I will try to look into it, but unfortunately Kong's team not allowing me to continue using fully Insomnia from version 8... I simply cannot login or share anything to their cloud

smiller0924 commented 9 months ago

Imorganl,

I'm kind of a noob with Insomnia. Which package do I download and how do I install it?

Thank you.

On Tue, Oct 17, 2023 at 9:36 AM lmorganl @.***> wrote:

https://github.com/Kong/insomnia/releases/tag/core%408.3.0 back in 8.3 :)

— Reply to this email directly, view it on GitHub https://github.com/NickRimmer/insomnia-plugin-request-navigator/issues/25#issuecomment-1766434876, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZZHLVSDDAQ6JZLFGSXXXXDX72CUTAVCNFSM6AAAAAA4VFNK7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRWGQZTIOBXGY . You are receiving this because you were mentioned.Message ID: @.*** com>

lmorganl commented 9 months ago

Hello Smiller0924

insomnia-plugin-request-navigator is also working with Insomnia 8.3 [insomnia-plugin-request-navigator](https://github.com/Kong/insomnia/releases/ but only on Local Scratch Pad v2023.5.8 is also availlable on github.

smiller0924 commented 8 months ago

Nick,

Thank you. But I still need to know how to make it work. Any ideas?

Thank you

S.

On Thu, Oct 19, 2023, 3:29 AM lmorganl @.***> wrote:

Hello Smiller0924

insomnia-plugin-request-navigator is also working with Insomnia 8.2 [insomnia-plugin-request-navigator]( https://github.com/Kong/insomnia/releases/ but only on Local Scratch Pad

— Reply to this email directly, view it on GitHub https://github.com/NickRimmer/insomnia-plugin-request-navigator/issues/25#issuecomment-1770224859, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZZHLVUJS7ETIXQ4Z4URYPDYADJGRAVCNFSM6AAAAAA4VFNK7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZQGIZDIOBVHE . You are receiving this because you were mentioned.Message ID: @.*** com>

w33ble commented 8 months ago

Hitting this as well, error is coming from this line:

internalRouter = rootElement[containerElement].memoizedState.element.props.router;

Looks like rootElement[containerElement].memoizedState.element here is null, but I don't know enough about Insomnia plugins to know what the actual issue is. Running Insomnia 8.3.0 and version 0.3.0 of this plugin.

LunaticoCR commented 8 months ago

Same here, v8.3.0 on macOS and no tab unfortunately.

bitcrumb commented 7 months ago

Same here, never seeing the tabs on startup.

I always have to go to the pluing settings and disable/enable the plugin for them to appear.

bitcrumb commented 7 months ago

This is the log after startup in which I can see an error and a warning relating to request-navigator:

Screenshot 2023-12-06 at 09 39 56

These are the continued logs after disabling/enabling the plugin (after which the tabs work/appear): Screenshot 2023-12-06 at 09 40 33

Looks indeed that this is about this line: https://github.com/NickRimmer/insomnia-plugin-request-navigator/blob/31f1c8f19d57699334696dd916957236644f8833/src/services/insomnia/connector/refs-router.ts#L20 as @w33ble correctly identified.

bitcrumb commented 7 months ago

@NickRimmer I've opened up a pull request to work around this issue, see: https://github.com/NickRimmer/insomnia-plugin-request-navigator/pull/28

This PR implements a (albeit arbitrary) delay to the initRouter method. From the error above it is clear that the plugin is loaded/executed before some required elements are present in the page.

This is not clean solution to the problem. However I am not up-to-speed with the implementation details of Insomnia and its plugins. So this is my attempt at working around it. It hink ideally some kind of lifecycle or DOM event is observed before setting/looking up the router?

Hoping you want to take a look at this and validate my workaround? This would make this plugin a lot more usable for quite a few users apparently!

Thanks for your efforts so far! 🤟🏻

bitcrumb commented 7 months ago

For anyone looking for a quick fix ⬇️

I've added the workaround to the plugin code and ZIP'ed it up. Just replace the insomnia-plugin-request-navigator folder in the plugins directory.

insomnia-plugin-request-navigator.zip