Error invoking remote method 'send-http-request': TypeError: Cannot read properties of undefined (reading 'data')
I have checked the following:
- [X] I use the newest version of bruno.
- [X] I've searched existing issues and found nothing related to my issue.
Describe the bug
Using Bruno 1.13.1. Trying to execute a POST-Request.
Getting the error (in the Response tab): "Error invoking remote method 'send-http-request': TypeError: Cannot read properties of undefined (reading 'data')"
Seems to be related to the response.
I get this error message when the server cannot be reached (e.g. missing VPN connection or not started local server and trying to access localhost).
Not a blocker, but did lead to confusion as the error message is not clear enough. Maybe this can be improved.
No message / error in console.
.bru file to reproduce the bug
No response
Screenshots/Live demo link
Seems like baseUrl is undefined, so it's displayed in red. What URL is actually shown in the timeline tab?
Seems like
baseUrlis undefined, so it's displayed in red. What URL is actually shown in the timeline tab?
yes, when I took the screenshot I didn't select an according environment. I have updated the screenshot now, still having the same issue with a selected environment (timeline tab shows the complete url, no placeholder).
EDIT: I now was able to narrow it down, indeed it's not a major issue but did lead to confusion on my side. Did update the ticket.
Sorry for any inconvenience caused.
I just installed Bruno and also getting this same error with the first endpoint that I entered (the open-ai completion endpoint).
I am not sure where "data" is being referenced, but I am using a variable for my Open AI token, although the variable is showing as green, so I guess it is reading it correctly.
I think my issue ^ is related to the environment, as I was able to fix this by restarting Bruno and creating a new environment with my api token. Note that when I restarted Bruno, the initial environment that I created had disappeared. I tried to recreate the environment with the same name, and it threw an error. Only when I created a new environment with a different name did it create, and adding the api_token environment variable worked this second time.
I am also getting the same error. I am running on v1.13.1 in windows.
I have the same issue. It was caused by SSL cert validation failure (issue with ZScaler). Error message should be definitely improved.
work around: disable "SSL/TLS Certificate Verification" via Bruno > Preferences > General
work around: disable "SSL/TLS Certificate Verification" via Bruno > Preferences > General
Thanks Felix, for me it worked!
Disabling SSL/TLS Certificate validation did not work for me. I'm still getting the error on my login request. Our certificat is old, but that is only because this is for a localhost instance. Not sure if there is another workaround. I'm getting the error for 'get' instead of 'data'
Problem is just as relevant. Disabling SSL/TLS Certificate did not help. It can be cured by restarting the application, but after 4-5 requests the error returns.
An example of a test where I have the same problem.
expect(jsonData.active[bru.getEnvVar("test")].status).to.eql("ACTIVE");
Cannot read properties of undefined (reading 'status')
Same error message also appears when trying to send a https request to a http endpoint
Faced same issue after importing postman collection which has code under Tests. Issue resolved after commenting script code under Tests.
I had some issues with Postman tests too. Removing those fixed for me as well
i have the same issue, but it do not appear in postman, holely shit
Same issue here. I was setting some variables in the Pre-Request section of my collection. Commenting out the script solved the problem.
As a side note: It would be nice if you could set variables on collection level.
I also have this issue, it's a post request and following the instructions above does not help
I get this issue with non-ascii characters in the body JSON.
Same here. It seems to happen with my domain name in particular
Using e.g. google.com and it works just fine
also affected for http communication to localhost:
http://localhost:3500/test
In my case, the problem was with the redirect of the endpoint (301). I added a pre script to disable automatic redirect and fixed. Based on https://github.com/usebruno/bruno/issues/1376#issuecomment-1888729172
For me, I had a debug tool throwing a bunch of error information in the headers.
I had to go back to my RapidAPI client to actually see/get the response to see what was going on.
Disabled the debug tool and it worked in Bruno again.
It looks like my requests were successful - Bruno just couldn't handle/process the large headers of gibberish maybe? Not sure.
I'm triggering this issue from a post-response script when the response is unexpectedly a 400 Bad Request. I do expect the script to fail (missing field in body), but it shouldn't prevent me from seeing the details of the bad request response.
Error invoking remote method 'send-http-request': Error: Error: 'bruno' is not defined
Can Anyone please help me above issue
Hey there, has anybody resolved this issue? I've tried all suggestions without success (I'm behind a corporate proxy):
- I've disabled SSL/TLS Certificate Verification
- I've setup proxy configuration
I have to mention that I can do calls from postman or from curl over a WSL terminal. I can also make calls to company internal URLs, but not external because then I get the error mentioned in this thread.
Error invoking remote method 'send-http-request': Error: Error: 'bruno' is not defined
Can Anyone please help me above issue
Your script doesn't seem to be correct. For example, it should be bru.setEnvVar instead of bruno.setEnvVar. Can you update and try again?
You can refer to the documentation for reference: https://docs.usebruno.com/testing/script/getting-started
I'm triggering this issue from a post-response script when the response is unexpectedly a 400 Bad Request. I do expect the script to fail (missing field in body), but it shouldn't prevent me from seeing the details of the bad request response.
Also we are updating the post response script error logs, these will no longer effect the actual response https://github.com/usebruno/bruno/pull/4082
We're also updating the timeline to display more details, including request headers, body, response headers, and more. Hopefully, this will help with debugging these issues.
Can Anyone please help me above issue