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

Could not generate cURL - strict mode: unknown keyword: "afterRequest" error. #6279

Closed
1 task done
smheaton opened this issue Aug 15, 2023 · 6 comments
Closed
1 task done
Labels
B-bug Bug: general classification S-unverified Status: Unverified by maintainer

Comments

@smheaton
Copy link

Expected Behavior

I should be able to generate a curl statement or a code snippet from a request.

Actual Behavior

Two request options no longer work for me in 2023.5.0. If I try the "Generate Code" option:

image

...the dialog that appears won't let me change the dropdown options:

image

If I try the "Copy as curl" option in the same menu for a request, I get an error dialog:

image

Reproduction Steps

  1. Create a New GET Request for "https://www.google.com."
  2. In the left pane, click on the down arrow next to the request's name (e.g. "New Request")
  3. Select "Copy as curl" in the menu that appears and select "Click to confirm."

Result: A dialog appears that says "Could not generate cURL" with a message below it that says, "strict mode: unknown keyword: "afterRequest""

image

Is there an existing issue for this?

Additional Information

I rolled back using the Insomnia.Core-2023.3.0 executable and did not see either problem anymore.

Insomnia Version

2023.5.0

What operating system are you using?

Windows

Operating System Version

Windows 10 Pro 19045.3324 and Windows 11 Enterprise 22621.1992

Installation method

Automatic Upgrade form Previous Version

Last Known Working Insomnia version

2023.3.0

@smheaton smheaton added B-bug Bug: general classification S-unverified Status: Unverified by maintainer labels Aug 15, 2023
@ignaciospeicys
Copy link

ignaciospeicys commented Aug 15, 2023

I am experiencing the exact same issue since an hour ago or less.

Alongside this, after the recent automatic upgrade, I've observed a problem where modifications to a request aren't being saved. Specifically, after editing a request, if I navigate to view a different request and then return to the previously modified request, all the changes seem to have been discarded.

@smheaton
Copy link
Author

Thanks for confirming what I see, @ignaciospeicys ! I also have seen behaviors where changes to requests haven't been getting saved, but I can't repro it consistently (i.e. sometimes it seems to work okay but I have lost a few too). Hopefully they can get our issues worked out.

@jackkav
Copy link
Contributor

jackkav commented Aug 15, 2023

@smheaton Thanks for the report, seems like it could be an issue with the httpsnippet and ajv dependency, and a difference between the local dev and packaged release. Will investigate further and get a minor bump out as soon as we can. (I suspect its a bundling issue)

@ignaciospeicys Could you provide more information about the particular fields that didn't persist. We recently moved our state management mechanism from redux to remix-run so I'm very curious if we missed anything in the migration.

@vhd-luke
Copy link

Also having this issue when trying to Copy as cURL

@jackkav
Copy link
Contributor

jackkav commented Aug 15, 2023

This issue is fixed in 2023.5.2 which will be available shortly.

@jackkav jackkav closed this as completed Aug 15, 2023
@smheaton
Copy link
Author

Upgraded to 2023.5.2 and both features work great for me now. Thanks for the quick turnaround, @jackkav !

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