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

Unable to send any requests since the latest update #8380

Open
StephenM-J opened this issue Feb 19, 2025 · 22 comments
Open

Unable to send any requests since the latest update #8380

StephenM-J opened this issue Feb 19, 2025 · 22 comments
Assignees
Labels
B-bug Bug: general classification S-verified Status: Verified by maintainer

Comments

@StephenM-J
Copy link

The response I get no matter what type of request (GET, POST, PUT, DELETE) returns the following error:

message: undefined; stack: Error: message: (unknown path) [Line 1, Column 12]
attempted to output null or undefined value; stack: Template render error: (unknown path) [Line 1, Column 12]
attempted to output null or undefined value
at Object.P [as _prettifyError] (file:///Applications/Insomnia.app/Contents/Resources/app.asar/sentry-RNTkbMCO.js:5:39127)
at file:///Applications/Insomnia.app/Contents/Resources/app.asar/sentry-RNTkbMCO.js:19:7018
at ae.root [as rootRenderFunc] (eval at ie._compile (file:///Applications/Insomnia.app/Contents/Resources/app.asar/sentry-RNTkbMCO.js:19:7663), :20:3)
at ie.render (file:///Applications/Insomnia.app/Contents/Resources/app.asar/sentry-RNTkbMCO.js:19:6932)
at ie.renderString (file:///Applications/Insomnia.app/Contents/Resources/app.asar/sentry-RNTkbMCO.js:19:4938)
at M5.render (file:///Applications/Insomnia.app/Contents/Resources/app.asar/sentry-RNTkbMCO.js:76:16068)
at $V.replaceIn (file:///Applications/Insomnia.app/Contents/Resources/app.asar/sentry-RNTkbMCO.js:89:1270)
at vre (file:///Applications/Insomnia.app/Contents/Resources/app.asar/sentry-RNTkbMCO.js:89:10187)
at h (file:///Applications/Insomnia.app/Contents/Resources/app.asar/hiddenBrowserWindow-Cz0sW5QM.js:1:747)
at file:///Applications/Insomnia.app/Contents/Resources/app.asar/hiddenBrowserWindow-Cz0sW5QM.js:1:374
at port.onmessage (/Applications/Insomnia.app/Contents/Resources/app.asar/hidden-window-preload.js:128771:36)
at port.onmessage (/Applications/Insomnia.app/Contents/Resources/app.asar/preload.js:92:18)

@Kiyo5hi
Copy link

Kiyo5hi commented Feb 19, 2025

Got the same error. I noticed that all the requests with pre-request scripts are having this problem.

@Maxim1720
Copy link

I have the same error:

message: undefined; stack: Error: message: (unknown path) [Line 1, Column 15]
attempted to output null or undefined value; stack: Template render error: (unknown path) [Line 1, Column 15]
attempted to output null or undefined value
at Object.P [as _prettifyError] (file:///opt/insomnia/resources/app.asar/sentry-RNTkbMCO.js:5:39127)
at file:///opt/insomnia/resources/app.asar/sentry-RNTkbMCO.js:19:7018
at ae.root [as rootRenderFunc] (eval at ie._compile (file:///opt/insomnia/resources/app.asar/sentry-RNTkbMCO.js:19:7663), :19:3)
at ie.render (file:///opt/insomnia/resources/app.asar/sentry-RNTkbMCO.js:19:6932)
at ie.renderString (file:///opt/insomnia/resources/app.asar/sentry-RNTkbMCO.js:19:4938)
at M5.render (file:///opt/insomnia/resources/app.asar/sentry-RNTkbMCO.js:76:16068)
at $V.replaceIn (file:///opt/insomnia/resources/app.asar/sentry-RNTkbMCO.js:89:1270)
at vre (file:///opt/insomnia/resources/app.asar/sentry-RNTkbMCO.js:89:10187)
at h (file:///opt/insomnia/resources/app.asar/hiddenBrowserWindow-Cz0sW5QM.js:1:747)
at file:///opt/insomnia/resources/app.asar/hiddenBrowserWindow-Cz0sW5QM.js:1:374
at port.onmessage (/opt/insomnia/resources/app.asar/hidden-window-preload.js:128695:36)
at port.onmessage (/opt/insomnia/resources/app.asar/preload.js:92:18)

It's appears when I send request with a After-response script.

@notjaywu
Copy link
Contributor

the 10.3.2-beta.0 release has the complete fix in it, so upgrading to that early release or the 11.0.0-beta.0 release will fix this issue

@kdallas
Copy link

kdallas commented Feb 20, 2025

I believe my issue is connected with the OP's although I've tried both 10.3.2-beta.0 and 11.0.0-beta.0 and the problem is still repeatable on those versions.

Any time I add a Pre-request script of any value (even comments), an extra forward-slash is added to the request URI and I get back a 404 response.

Here's a good working example:

Image

And here's what happens when I populate something in Pre-request:

Image

Whether it is commented code or not, as long as Pre-request is populated with some value, the outcome is the same.

@ihexxa
Copy link
Contributor

ihexxa commented Feb 20, 2025

@kdallas This seems to be another issue which was discussed in this thread: #7603, will look into it in the next.

@notjaywu
Copy link
Contributor

I believe my issue is connected with the OP's although I've tried both 10.3.2-beta.0 and 11.0.0-beta.0 and the problem is still repeatable on those versions.

Any time I add a Pre-request script of any value (even comments), an extra forward-slash is added to the request URI and I get back a 404 response.

Here's a good working example:

Image

And here's what happens when I populate something in Pre-request:

Image

Whether it is commented code or not, as long as Pre-request is populated with some value, the outcome is the same.

As a workaround, you can remove the path /ohip.html from the environment. So, the url should be {{ partnerRatesURL }}/ohip.html, in this way, you should be able to use scripts. Hope it works for you.

@kdallas
Copy link

kdallas commented Feb 20, 2025

As a workaround, you can remove the path /ohip.html from the environment. So, the url should be {{ partnerRatesURL }}/ohip.html, in this way, you should be able to use scripts. Hope it works for you.

Ah I didn't consider that -- will give it a try tomorrow @notjaywu, thanks.

@StephenM-J
Copy link
Author

Can confirm, removing any pre-request scripts have worked for me, will do for the meantime

@JdKock
Copy link

JdKock commented Feb 24, 2025

So it seems the scripts are broken and we can't use it until there is a new version of Insomnia with a fix.

If I put anything (console.log('welcome') or only a comment line) in the Pre-request script I get the error "Error: SSL connect error"

@notjaywu
Copy link
Contributor

@JdKock Which version are you using? Did you send a request with a self-signed certificate, and the url has tags? Thanks!

@JdKock
Copy link

JdKock commented Feb 24, 2025

@notjaywu I'm using Insomnia v10.3.1 and never had issues but also never used scripts before. When I add something to the scripts I get this error. When I leave the scripts totally empty there is no issue at all.
It's a simple post query to an endpoint, the url uses a environment variable for the domain.

@victoraugustofd
Copy link

I just faced the same issue. What I don't understand is that I have two requests, one of them worked using an after-request script and the second one failed, even the script being very simple (setting a variable value with the response json body).

Is there any workaround? I really need to rely on the after-request scripts on a daily basis.

I am using version 10.3.1.

@mjlamora
Copy link

Same issue here, very similar error messages after updating to 10.3.1. Reverting to 10.3.0 (and disabling future updates) does fix the issue. Removing my after-response script (a template snippet checking for response code 200) also fixes the issue.

This thread has traffic but is not tagged as a bug. I know that the title of the post is a little vague. Does anyone know if there is a relevant bug to be tracking?

@kdallas
Copy link

kdallas commented Feb 25, 2025

Does anyone know if there is a relevant bug to be tracking?

I would expect that to be for the developers to manage. As you say, enough activity on the thread to get their eyeballs on it so hopefully it'll be prioritised accordingly. If that's not how things work around here, tag away... I guess.

@kdallas
Copy link

kdallas commented Feb 25, 2025

As a workaround, you can remove the path /ohip.html from the environment. So, the url should be {{ partnerRatesURL }}/ohip.html, in this way, you should be able to use scripts. Hope it works for you.

Ah I didn't consider that -- will give it a try tomorrow @notjaywu, thanks.

This workaround was successful in my specific case, but not likely much help to those with broader issues for pre/after scripts breaking requests.

@JdKock
Copy link

JdKock commented Feb 25, 2025

Same issue here, very similar error messages after updating to 10.3.1. Reverting to 10.3.0 (and disabling future updates) does fix the issue. Removing my after-response script (a template snippet checking for response code 200) also fixes the issue.

For me reverting to v10.3.0 is not helping. Still the same issue when I add some pre-request script. I also removed the environment variable in the url. But nothing helped.

@ryan-willis ryan-willis added B-bug Bug: general classification S-verified Status: Verified by maintainer labels Feb 25, 2025
@ryan-willis ryan-willis self-assigned this Feb 25, 2025
@ryan-willis
Copy link
Contributor

If you're able, upgrade to the latest beta version: https://github.com/Kong/insomnia/releases/tag/core%4011.0.0-beta.1 it has a fix for the scripting issues

@kdallas I'm looking into your trailing slash side-effect caused by the scripts.

@JdKock are you using mTLS with client certificates?

@JdKock
Copy link

JdKock commented Feb 25, 2025

@ryan-willis I installed 11.0.0-beta.1 and created a GET request to url: https://randomuser.me/api/ with:

  • no parameters
  • no body
  • auth none
  • no extra headers only the 2 default
  • pre-request script: console.log('welcome')

Response:
Error: SSL connect error

Console:

  • warn: The URL contains tags or no matched certificate found, insomnia.request.certificate is initialized as an empty certificate.
  • log: welcome
  • Preparing request to https://randomuser.me/api/
  • Current time is 2025-02-25T19:48:47.070Z
  • Enable automatic URL encoding
  • Using default HTTP version
  • Enable network proxy for https:
  • Enable timeout of 30000ms
  • Enable SSL validation
  • Enable cookie sending with jar of 32 cookies
  • Hostname in DNS cache was stale, zapped
  • Trying 127.0.0.1:3128...
  • Connected to (nil) (127.0.0.1) port 3128 (Should ignore response after switch request #17)
  • ALPN: offers http/1.1
  • CAfile: /etc/ssl/cert.pem
  • CApath: none
  • TLSv1.0 (OUT), TLS header, Certificate Status (22):
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
  • (5454) (IN), , Unknown (72):
  • error:0A00010B:SSL routines::wrong version number
  • Closing connection 17

If I remove the pre-request script and leave it empty I get a normal response.

@victoraugustofd
Copy link

From which version of Insomnia did this error start happening, and which version should I install to downgrade?

@notjaywu
Copy link
Contributor

notjaywu commented Mar 4, 2025

@ryan-willis I installed 11.0.0-beta.1 and created a GET request to url: https://randomuser.me/api/ with:

  • no parameters
  • no body
  • auth none
  • no extra headers only the 2 default
  • pre-request script: console.log('welcome')

Response: Error: SSL connect error

Console:

  • warn: The URL contains tags or no matched certificate found, insomnia.request.certificate is initialized as an empty certificate.
  • log: welcome
  • Preparing request to https://randomuser.me/api/
  • Current time is 2025-02-25T19:48:47.070Z
  • Enable automatic URL encoding
  • Using default HTTP version
  • Enable network proxy for https:
  • Enable timeout of 30000ms
  • Enable SSL validation
  • Enable cookie sending with jar of 32 cookies
  • Hostname in DNS cache was stale, zapped
  • Trying 127.0.0.1:3128...
  • Connected to (nil) (127.0.0.1) port 3128 (Should ignore response after switch request #17)
  • ALPN: offers http/1.1
  • CAfile: /etc/ssl/cert.pem
  • CApath: none
  • TLSv1.0 (OUT), TLS header, Certificate Status (22):
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
  • (5454) (IN), , Unknown (72):
  • error:0A00010B:SSL routines::wrong version number
  • Closing connection 17

If I remove the pre-request script and leave it empty I get a normal response.

@JdKock Could you verify if this version v10.1.1 works for you?

@JdKock
Copy link

JdKock commented Mar 4, 2025

@notjaywu I installed version 10.1.1 and did the same test as above, that means I added a simple log statement to the pre-request.
With this version I now get a normal response as expected. No more "Error: SSL connect error".

Now this fix must to be merged to v11.0.0?

@ihexxa
Copy link
Contributor

ihexxa commented Mar 5, 2025

@JdKock If you still have v10.3.1 installed, you could also check if your https proxy works well by removing all https proxy addresses. Because the error "wrong version number" seems telling that the https proxy is actually providing http service.

Image

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-verified Status: Verified by maintainer
Projects
None yet
Development

No branches or pull requests

10 participants