insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Plugins don't work after upgrading to 11.0.0

Open bensalaa2000 opened this issue 9 months ago • 18 comments

Expected Behavior

For all requests, the message is "New Response missing parentId"

Actual Behavior

Image

Reproduction Steps

When I fetch Tokens --> I have this error : "New Response missing parentId"

Is there an existing issue for this?

Which sync method do you use?

  • [ ] Git sync.
  • [ ] Insomnia Cloud sync.
  • [ ] Local only

Additional Information

No response

Insomnia Version

11.0.0

What operating system are you using?

Windows

Operating System Version

Windows 11

Installation method

From Insomnia upade

Last Known Working Insomnia version

No response

bensalaa2000 avatar Mar 18 '25 14:03 bensalaa2000

Image

bensalaa2000 avatar Mar 18 '25 14:03 bensalaa2000

Same error on linux

Image

arturjuniorsoluti avatar Mar 18 '25 14:03 arturjuniorsoluti

Same for me. After update to R11.0.0. My getToken request stopped working

Image

New Response missing parentId``

JaronVoidgazer avatar Mar 19 '25 13:03 JaronVoidgazer

I have the same bug

Image

marlenesco avatar Mar 19 '25 15:03 marlenesco

@bensalaa2000 @JaronVoidgazer @marlenesco @arturjuniorsoluti I've tried with the same workflow, using OAuth 2.0 in Auth and Click Fetch Tokens button, but it could not reproduce the issue.

Have you installed any plugins? If so, could you provide a screenshot of the used plugins and disabled all plugins first to see if the issue could be resolved.

cwangsmv avatar Mar 20 '25 06:03 cwangsmv

My plugings : Image

bensalaa2000 avatar Mar 20 '25 08:03 bensalaa2000

I found ths incrimined plugin : "insomnia-plugin-oauth2-token-provider" Without this plugin, i have no error

bensalaa2000 avatar Mar 20 '25 08:03 bensalaa2000

Hi @cwangsmv It worked. I removed some plugins which i do not even use. But it seems this one is making problems insomnia-plugin-copy-to-clipboard

Image

JaronVoidgazer avatar Mar 20 '25 10:03 JaronVoidgazer

I'm facing issue sending request after the update to Insomnia 11.0.0 Using the Save Variables plugin in the header breaks the request. Save Variables v.4.0.7 Disable those lines I can send the request.

Image

Image

Image

EHoglid-NI avatar Mar 20 '25 14:03 EHoglid-NI

@bensalaa2000 @JaronVoidgazer @marlenesco @arturjuniorsoluti I've tried with the same workflow, using OAuth 2.0 in Auth and Click Fetch Tokens button, but it could not reproduce the issue.

Have you installed any plugins? If so, could you provide a screenshot of the used plugins and disabled all plugins first to see if the issue could be resolved.

Thank you for your response, but I don't have any other installed plugins @bensalaa2000

marlenesco avatar Mar 20 '25 15:03 marlenesco

Do you know if there are any alternative plugins to 'insomnia-plugin-oauth2-token-provider'?

marlenesco avatar Mar 20 '25 15:03 marlenesco

I'm facing issue sending request after the update to Insomnia 11.0.0 Using the Save Variables plugin in the header breaks the request. Save Variables v.4.0.7 Disable those lines I can send the request.

Image

Image

Image

This is a known issue in https://github.com/Kong/insomnia/issues/8485 while using environment tags as header name will break the request.

cwangsmv avatar Mar 21 '25 02:03 cwangsmv

I am experiencing the same issue. It appears to be a problem handling Buffer objects from the response. Minimal plugin to reproduce:

module.exports.responseHooks = [
  (context) => {
    Buffer.from(context.response.getBody());
  }
];

maccath avatar Mar 22 '25 11:03 maccath

Will have a look into the plugin "insomnia-plugin-oauth2-token-provider" the next days and will try to update it. Haven't used insomnia for a while myself so didn't realized they changed something that breaks it...

Feel free to open a issue here: https://github.com/AraComITServicesGmbH/insomnia-plugin-oauth2-token-provider/issues

kitingChris avatar Mar 25 '25 08:03 kitingChris

Is there any workaround for this? I have tried adapting the plugin I'm using but as soon as Buffer.from is called, it fails somewhere deeper in the code.

swoodvitsoe avatar Mar 26 '25 12:03 swoodvitsoe

I made a drastic decision: I rolled back to the old version (https://github.com/Kong/insomnia/releases/tag/core%4010.3.1) and disabled automatic updates. This behavior has fixed the problem.

I know it's not the best solution, but it works.

marlenesco avatar Mar 27 '25 13:03 marlenesco

We also rolled back to the previous version. We have a custom plugin that we absolutely cannot use our flows without. If we need to update our plugin we can, but we will need some guidance as other attempts in this thread have not worked.

JohnTrapp avatar Mar 28 '25 21:03 JohnTrapp

We've been running on the previous version for 2 weeks now and unfortunately we are looking at something else instead of insomnia in the absence of a fix to this.

swoodvitsoe avatar Apr 14 '25 12:04 swoodvitsoe

I'm posting this on the chance that it might help someone:

I had a personal plugin which I used to decrypt one of the response parameters. It was working fine on my old laptop running Insomnia 6.x.x. I installed Insomnia 11.3.0 on a new laptop and when I ran the plugin it broke with the missing parentId error detailed above with the same symptoms. Use the debugger (view -> DebugerTools) to locate the offensive code in the stack trace.

To fix, I see that whereas the response used to be accessible with the following notation: const response = JSON.parse(context.response.getBody().toString('utf-8')); if(response.d.Token){

now instead of the response returning as an object and accessing its properties, now it was returning a promise. So I handled the promise asynchronously and put all my code in the then() callback::

Now I use this:

   context.response.getBody().then((good) => {
  console.log('response body --> ' + good.toString('utf-8'));
  const response = JSON.parse(good.toString('utf-8'));
	
  if(response.d.Token){

It's straightforward js - they shouldn't have broken things but you can easily recalibrate.

benzyp avatar Jul 16 '25 22:07 benzyp

I made an update in my local code that resolved the promise, see this bug report I made. Bug report

EHoglid-NI avatar Jul 17 '25 06:07 EHoglid-NI

I'm posting this on the chance that it might help someone:

I had a personal plugin which I used to decrypt one of the response parameters. It was working fine on my old laptop running Insomnia 6.x.x. I installed Insomnia 11.3.0 on a new laptop and when I ran the plugin it broke with the missing parentId error detailed above with the same symptoms. Use the debugger (view -> DebugerTools) to locate the offensive code in the stack trace.

To fix, I see that whereas the response used to be accessible with the following notation: const response = JSON.parse(context.response.getBody().toString('utf-8')); if(response.d.Token){

now instead of the response returning as an object and accessing its properties, now it was returning a promise. So I handled the promise asynchronously and put all my code in the then() callback::

Now I use this:

   context.response.getBody().then((good) => {
  console.log('response body --> ' + good.toString('utf-8'));
  const response = JSON.parse(good.toString('utf-8'));
	
  if(response.d.Token){

It's straightforward js - they shouldn't have broken things but you can easily recalibrate.

I'll take a look at this solution. Could you share your code with us? By the way, thank you for the workaround!

marlenesco avatar Jul 17 '25 21:07 marlenesco

Thanks everyone for the help! We were able to solve this the same way, but with a slightly different style as previously shared:

const promisedBody = await context.response.getBody();
if (promisedBody && promisedBody.length > 0) {
    let body;
    try {
        body = JSON.parse(promisedBody);
    } catch (e) {
        console.error('Failed to parse response body as JSON', e);
        return;
    }
...

While it was an easy fix, as enterprise customers we don't really have time to debug and fix our plugin code. What happened with us is that we all either downgraded to a version that our current plugin worked on, or we didn't use the requests that required the plugin, which led to other problems. It also soured our teams' taste on Insomnia. We don't want to use a tool that we constantly have to work on/fix.

As a backend engineer, I understand and appreciate that this change was a good thing and needed to happen. But there should have been a test that identified this issue before releasing it. Then the breaking change could be either made backwards compatible or appropriately communicated with this easy fix provided. My team would have jumped on this much sooner if we didn't have to diagnose the issue first.

JohnTrapp avatar Aug 22 '25 17:08 JohnTrapp