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

After-response script broken after 10.3.1 release #8371

Closed
1 of 4 tasks
mateusmarques opened this issue Feb 14, 2025 · 4 comments
Closed
1 of 4 tasks

After-response script broken after 10.3.1 release #8371

mateusmarques opened this issue Feb 14, 2025 · 4 comments
Assignees
Labels
B-bug Bug: general classification S-unverified Status: Unverified by maintainer

Comments

@mateusmarques
Copy link

Expected Behavior

I used to have this after-request script in my insomnia project since a long time and now it is not working anymore:

const {id} = insomnia.response.json();
const last_project_id = insomnia.request.url.path[2];
insomnia.environment.set("last_report_id", id);
insomnia.environment.set("last_project_id",last_project_id);
console.log('report_id: ', id);
console.log('project_id: ', last_project_id);

Actual Behavior

It says that path doesn't exist and "fails the response". By fails the response I mean that the request happened successfully and was processed by the server, but insomnia doesn't show the results because it breaks. I don't have the exact log output because I reverted to 10.3.0

Reproduction Steps

No response

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

10.3.1

What operating system are you using?

macOS

Operating System Version

Sequoia 15.1.1 M1 chip

Installation method

download from insomnia

Last Known Working Insomnia version

10.3.0

@mateusmarques mateusmarques added B-bug Bug: general classification S-unverified Status: Unverified by maintainer labels Feb 14, 2025
@coppolaop
Copy link

coppolaop commented Feb 14, 2025

I noticed that the error only happens with environment variables, those that have "_.", and are selected by the "edit variable" dialog. When I typed the name of my variable between braces, it worked, but using the environment the error occurs.

@ryan-willis
Copy link
Contributor

@mateusmarques thanks for the report, we have released a fix to our beta channel (that you can select under Preferences -> General), and can download here: https://github.com/Kong/insomnia/releases/tag/core%4010.3.2-beta.0

@ryan-willis ryan-willis self-assigned this Feb 14, 2025
@coppolaop
Copy link

I tested it here and it worked! But the installation via settings didn't work, I had to download it via the link.

@ihexxa
Copy link
Contributor

ihexxa commented Feb 19, 2025

Closing this and @mateusmarques feel free to reopen it if the latest version doesn't work for you.

@ihexxa ihexxa closed this as completed Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: general classification S-unverified Status: Unverified by maintainer
Projects
None yet
Development

No branches or pull requests

4 participants