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

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

Closed
smiller0924 opened this issue Sep 12, 2023 · 21 comments
Closed

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

smiller0924 opened this issue Sep 12, 2023 · 21 comments

Comments

@smiller0924
Copy link

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
Copy link
Owner

NickRimmer commented Sep 13, 2023

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
Copy link

Nerwin commented Sep 15, 2023

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
Copy link
Owner

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
Copy link
Author

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
Copy link

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

@lmorganl
Copy link

Plugin is not working again with 8.0 :(

@smiller0924
Copy link
Author

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
Copy link

lmorganl commented Oct 2, 2023

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

@Pimpnase
Copy link

Pimpnase commented Oct 6, 2023

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
Copy link

alexander-veshkin commented Oct 14, 2023

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
Copy link
Owner

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
Copy link
Author

smiller0924 commented Oct 18, 2023 via email

@lmorganl
Copy link

lmorganl commented Oct 19, 2023

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
Copy link
Author

smiller0924 commented Oct 21, 2023 via email

@w33ble
Copy link

w33ble commented Nov 7, 2023

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
Copy link

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

@bitcrumb
Copy link

bitcrumb commented Dec 6, 2023

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
Copy link

bitcrumb commented Dec 6, 2023

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:

internalRouter = rootElement[containerElement].memoizedState.element.props.router
as @w33ble correctly identified.

@bitcrumb
Copy link

bitcrumb commented Dec 6, 2023

@NickRimmer I've opened up a pull request to work around this issue, see: #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
Copy link

bitcrumb commented Dec 6, 2023

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

@NickRimmer
Copy link
Owner

Hey! Just a heads-up that I'm closing old tickets and archiving this repo. I've started working on my own client, where I'll be applying all the ideas I wanted to bring here 😊

It's called RestApia. Feel free to check it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants