Plugins don't work after upgrading to 11.0.0
Expected Behavior
For all requests, the message is "New Response missing parentId"
Actual Behavior
Reproduction Steps
When I fetch Tokens --> I have this error : "New Response missing parentId"
Is there an existing issue for this?
- [x] I have searched the issue tracker for this problem.
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
Same error on linux
Same for me. After update to R11.0.0. My getToken request stopped working
New Response missing parentId``
I have the same bug
@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.
My plugings :
I found ths incrimined plugin : "insomnia-plugin-oauth2-token-provider" Without this plugin, i have no error
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
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.
@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
Do you know if there are any alternative plugins to 'insomnia-plugin-oauth2-token-provider'?
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.
This is a known issue in https://github.com/Kong/insomnia/issues/8485 while using environment tags as header name will break the request.
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());
}
];
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
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.
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.
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.
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.
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 made an update in my local code that resolved the promise, see this bug report I made. Bug report
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!
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.