bruno icon indicating copy to clipboard operation
bruno copied to clipboard

Strange error message: `url` argument is not a string or URL.

Open giovanni-nic-kuama opened this issue 2 months ago • 5 comments

I have checked the following:

  • [x] I have searched existing issues and found nothing related to my issue.

This bug is:

  • [x] making Bruno unusable for me
  • [ ] slowing me down but I'm able to continue working
  • [x] annoying
  • [ ] this feature was working in a previous version but is broken in the current release.

Bruno version

2.13.2

Operating System

Windows 11

Describe the bug

Some kind of url don't work for me, receiving a strange error message: url argument is not a string or URL.

I'm working on some API on 2 environments, test and staging. The api is the same, same path, same variables, same query params, the base url is different

On test environment it works correctly:

Working URL: https://apps-test...it/some-path-variables-and-query-params

Not working URL: https://apps-coll...it/some-path-variables-and-query-params

For the second environment even pre-request scripts doesn't work. These urls works both correctly on postman or curl.

.bru file to reproduce the bug

Private api, so can't publish them.

Screenshots/Live demo link

Image

giovanni-nic-kuama avatar Oct 24 '25 10:10 giovanni-nic-kuama

Sharing my observations for same issue on same version - In my case, it is not different URLs behaving but all those URLs that were working fine, suddenly started giving this error. Restarting Bruno or creating new requests without copy pasting the URLs, but typing in required information fresh, gives same error. Is there a way to generate debug logs that I can share?

WinCPP avatar Nov 04 '25 03:11 WinCPP

I have the same issue on v2.14.2 using this bruno config. The same configuration was working previously.

meta {
  name: [AUS] Get monthly details
  type: http
  seq: 8
}

get {
  url: https://data.gov.au/data/api/3/action/datastore_search?resource_id=b58082e7-2728-4a17-9500-6f044687a3c6
  body: none
  auth: none
}

params:query {
  resource_id: b58082e7-2728-4a17-9500-6f044687a3c6
}

headers {
  Content-Type: application/json
  User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36
}

Using the same URL and headers with curl returns a HTTP 200 and a HTML response:

curl -X GET "https://data.gov.au/data/api/3/action/datastore_search?resource_id=b58082e7-2728-4a17-9500-6f044687a3c6" \
  -H "Content-Type: application/json" \
  -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36"

Janosch avatar Nov 14 '25 13:11 Janosch

@Janosch Yes, I can reproduce this issue. We will look into it. You mentioned that this was working before. Could you please let us know at which version it was working fine?

Pragadesh44-Bruno avatar Nov 14 '25 13:11 Pragadesh44-Bruno

I am also seeing this same issue, it just started happening about 10 minutes ago. I am on Bruno 2.14.1.

greggbjensen avatar Nov 14 '25 21:11 greggbjensen

I upgraded to 2.14.2 and I have the same issue. I also tried VS Code with the extension.

Image

greggbjensen avatar Nov 14 '25 21:11 greggbjensen

@Janosch Yes, I can reproduce this issue. We will look into it. You mentioned that this was working before. Could you please let us know at which version it was working fine?

@Pragadesh44-Bruno I dont know. I tried the following version, none of them worked: 2.14.2 2.12.0 2.10.0 2.3.0

In 2.3.0 the Response is [object Object], so still an error but a different message.

I am afraid I cannot test more versions

Janosch avatar Nov 19 '25 10:11 Janosch

@Janosch Thanks a lot for testing it out in the other versions. I was able to reproduce the issue from the snippet you've provided. I'll work on writing validations for this, investigate further, and share my findings with the team so we can implement a fix

Pragadesh44-Bruno avatar Nov 27 '25 08:11 Pragadesh44-Bruno

I noticed that the snippet's request returns a 302, which could be causing the issue, as it might not be resolved properly. This seems related to issue #5064. Could anyone in the thread confirm the URL’s status code by running it in curl?

 curl -s -o /dev/null -w "%{http_code}" https://data.gov.au/data/api/3/action/datastore_search\?resource_id\=b58082e7-2728-4a17-9500-6f044687a3c6

Pragadesh44-Bruno avatar Nov 27 '25 10:11 Pragadesh44-Bruno

Also, in Bruno, when a redirection occurs, we expect a Location header to be present, indicating the final destination. However, in curl and Postman, if the Location header is missing, we are showing the actual 302 status, which essentially results in a malformed response. We can implement similar behavior in Bruno and will look into it.

Additionally, I tested with https://relentless.com, which was Amazon's old home URL. Since it has moved to https://www.amazon.com:443/, I can clearly see the Location header in the timeline. This is how a proper 302 redirection should be handled. I'm attaching the timeline data below

Preparing request to https://relentless.com
Current time is 2025-11-27T10:33:17.474Z
GET https://relentless.com
Accept: application/json, text/plain, */*
Content-Type: application/json
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36
SSL validation: enabled
ALPN: offers h2, http/1.1
CA Certificates: 150 root, 1 system, 0 extra, 1 custom
Trying relentless.com:443...
DNS lookup: relentless.com -> 35.71.184.76
DNS lookup: relentless.com -> 52.223.38.30
Connected to relentless.com (35.71.184.76) port 443
SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 (TLSv1/SSLv3)
ALPN: server accepted None
Server certificate:
 subject: CN=www.amazonmembers.com
 start date: Sep 27 00:00:00 2025 GMT
 expire date: Oct 26 23:59:59 2026 GMT
 subjectAltName: DNS:www.amazonmembers.com, DNS:www.thaiamazon.com, DNS:amazon.cg, DNS:www.ammzon.com, DNS:mmazon.com, DNS:amazon.sn, DNS:www.friendclick.com, DNS:amazonstore.com, DNS:amozan.us, DNS:www.bookmatcher.com, DNS:amazpmn.com, DNS:amazon.biz.pk, DNS:www.akmazon.com, DNS:amazon.cx, DNS:www.amazon-exchange.com, DNS:www.amazon.com.gt, DNS:amazon.net.pk, DNS:filmchat.com, DNS:earthsbiggestbookstore.com, DNS:www.amazon500.com, DNS:amazon.to, DNS:www.amazon-toy.com, DNS:amazonjr.com, DNS:amkazon.com, DNS:amazonm.com, DNS:amazonexchange.com, DNS:cheapobooks.com, DNS:www.auctionamazon.com, DNS:amazonmovies.com, DNS:musichat.com, DNS:amnazon.ca, DNS:amazonmembers.com, DNS:moviematcher.com, DNS:www.amaozn.com, DNS:findamazon.com, DNS:www.amaqzon.com, DNS:www.asmaszon.com, DNS:amazobn.com, DNS:thaiamazon.com, DNS:www.amazon.bi, DNS:www.amazon.biz.pk, DNS:www.amazon.rw, DNS:amazon.com.gt, DNS:amdazon.com, DNS:aqmazon.com, DNS:www.aqmazon.com, DNS:www.amazokn.com, DNS:www.amzazon.com, DNS:www.mmazon.com, DNS:www.amazon.kn, DNS:www.amazon.cg, DNS:friend-click.com, DNS:www.amazobn.com, DNS:www.musicchat.com, DNS:amazon-electronics.com, DNS:amaxzon.com, DNS:www.amazon.to, DNS:amqazon.com, DNS:www.amazon.org, DNS:www.amnazon.com, DNS:www.awardwinners.com, DNS:www.amazon-electronic.com, DNS:www.amjazon.com, DNS:www.amazon.off.ai, DNS:www.moviematcher.com, DNS:www.aomzon.com, DNS:www.amazon-electronics.com, DNS:www.amazkon.com, DNS:www.musichat.com, DNS:www.azmazon.com, DNS:gift-click.com, DNS:www.amazon-toys.com, DNS:www.amazion.com, DNS:amazion.com, DNS:www.amazoin.com, DNS:www.amazon.mn, DNS:www.amazpmn.com, DNS:amxzomn.com, DNS:amnazon.com, DNS:amazon.off.ai, DNS:www.amazojn.com, DNS:www.amazopn.com, DNS:www.amaxzon.com, DNS:amaozn.com, DNS:azmazon.com, DNS:www.amazon.biz, DNS:auctionamazon.com, DNS:www.amozan.us, DNS:amazkon.com, DNS:relentless.com, DNS:asmaszon.com, DNS:amjazon.com, DNS:www.awmazon.com, DNS:www.amazon.org.kn, DNS:friendclick.com, DNS:amazopn.com, DNS:akmazon.com, DNS:www.amazonmovies.com, DNS:www.amqazon.com, DNS:bookmatcher.com
 issuer: C=US, O=Amazon, CN=Amazon RSA 2048 M01
SSL certificate verify ok.
there was an error executing the request!
HTTP/1.1 302 Moved Temporarily
server: awselb/2.0
date: Thu, 27 Nov 2025 10:33:18 GMT
content-type: text/html
content-length: 110
connection: keep-alive
location: https://www.amazon.com:443/
request-duration: 1041
Request completed in 1041 ms
Changed method from GET to GET for 302 redirect and removed request body
SSL validation: enabled
Preparing request to https://www.amazon.com:443/
Current time is 2025-11-27T10:33:18.516Z
GET https://www.amazon.com:443/
Accept: application/json, text/plain, */*
Content-Type: undefined
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36
request-start-time: 1764239597474
Accept-Encoding: gzip, compress, deflate, br
SSL validation: enabled
ALPN: offers h2, http/1.1
CA Certificates: 150 root, 1 system, 0 extra, 1 custom
Trying www.amazon.com:443...
DNS lookup: www.amazon.com -> 18.161.209.56
Connected to www.amazon.com (18.161.209.56) port 443
SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 (TLSv1/SSLv3)
ALPN: server accepted None
Server certificate:
 subject: CN=www.amazon.com
 start date: Oct 24 00:00:00 2025 GMT
 expire date: Oct 20 23:59:59 2026 GMT
 subjectAltName: DNS:amazon.com, DNS:amzn.com, DNS:uedata.amazon.com, DNS:us.amazon.com, DNS:www.amazon.com, DNS:www.amzn.com, DNS:corporate.amazon.com, DNS:buybox.amazon.com, DNS:iphone.amazon.com, DNS:yp.amazon.com, DNS:home.amazon.com, DNS:origin-www.amazon.com, DNS:buckeye-retail-website.amazon.com, DNS:huddles.amazon.com, DNS:p-nt-www-amazon-com-kalias.amazon.com, DNS:p-yo-www-amazon-com-kalias.amazon.com, DNS:p-y3-www-amazon-com-kalias.amazon.com, DNS:yellowpages.amazon.com, DNS:www.m.amazon.com, DNS:www.cdn.amazon.com, DNS:test-www.amazon.com, DNS:mp3recs.amazon.com, DNS:konrad-test.amazon.com, DNS:shop.business.amazon.com
 issuer: C=US, O=DigiCert Inc, CN=DigiCert Global CA G2
SSL certificate verify ok.
HTTP/1.1 200 OK
content-type: text/html;charset=UTF-8
transfer-encoding: chunked
connection: keep-alive
server: Server
date: Thu, 27 Nov 2025 10:33:18 GMT
x-amz-rid: 7J0HRBYRVD001HMZTPDE
set-cookie: session-id=137-3443141-6285263; Domain=.amazon.com; Expires=Fri, 27-Nov-2026 10:33:18 GMT; Path=/; Secure,session-id-time=2082787201l; Domain=.amazon.com; Expires=Fri, 27-Nov-2026 10:33:18 GMT; Path=/; Secure,i18n-prefs=USD; Domain=.amazon.com; Expires=Fri, 27-Nov-2026 10:33:18 GMT; Path=/,lc-main=en_US; Domain=.amazon.com; Expires=Fri, 27-Nov-2026 10:33:18 GMT; Path=/,sp-cdn="L5Z9:IN"; Version=1; Domain=.amazon.com; Max-Age=31536000; Expires=Fri, 27-Nov-2026 10:33:18 GMT; Path=/; Secure; HttpOnly,skin=noskin; path=/; domain=.amazon.com
accept-ch-lifetime: 86400
content-language: en-US
cache-control: no-cache
pragma: no-cache
expires: -1
content-security-policy-report-only: default-src 'self' blob: https: data: mediastream: 'unsafe-eval' 'unsafe-inline';report-uri https://metrics.media-amazon.com/
content-security-policy: upgrade-insecure-requests;report-uri https://metrics.media-amazon.com/
accept-ch: ect,rtt,downlink,device-memory,sec-ch-device-memory,viewport-width,sec-ch-viewport-width,dpr,sec-ch-dpr,sec-ch-ua-platform,sec-ch-ua-platform-version
x-xss-protection: 1;
x-ua-compatible: IE=edge
x-content-type-options: nosniff
strict-transport-security: max-age=47474747; includeSubDomains; preload
vary: Content-Type,Accept-Encoding,User-Agent
x-frame-options: SAMEORIGIN
x-cache: Miss from cloudfront
via: 1.1 40c1ab430a24c7f7e45ddf358c27219e.cloudfront.net (CloudFront)
x-amz-cf-pop: BLR50-P2
alt-svc: h3=":443"; ma=86400
x-amz-cf-id: ElcXoM1G3rlvFuMLORy4fHACUcb9mklwvRYtZwiNR-WAn3qlOCufpQ==
request-duration: 387
Request completed in 387 ms

Pragadesh44-Bruno avatar Nov 27 '25 10:11 Pragadesh44-Bruno

I noticed that the snippet's request returns a 302, which could be causing the issue, as it might not be resolved properly. This seems related to issue #5064. Could anyone in the thread confirm the URL’s status code by running it in curl?

 curl -s -o /dev/null -w "%{http_code}" https://data.gov.au/data/api/3/action/datastore_search\?resource_id\=b58082e7-2728-4a17-9500-6f044687a3c6

I get an HTTP 302 code when I run this command.

Janosch avatar Nov 27 '25 12:11 Janosch

@greggbjensen @Janosch Can you confirm whether this issue did not occur in earlier versions of Bruno and only appeared in the latest releases? I want to make sure this is indeed a regression.

helloanoop avatar Nov 27 '25 14:11 helloanoop

@helloanoop I am not sure. As I said, I even tried version 2.3.0 and the problem still occurred. However, this could be also due to the fact that the host changed its behaviour and started to respond with HTTP 302.

Janosch avatar Nov 27 '25 14:11 Janosch

@Janosch Look at the URL you had shared - https://data.gov.au/data/api/3/action/datastore_search?resource_id=b58082e7-2728-4a17-9500-6f044687a3c6

The endpoint is returning a 302, but nit returning a Location to redirect to. So it appears that the host has changed its behavior

That said, the current error message - url argument is not a string or URL is misleading and incorrect. We are working on fixing this.

helloanoop avatar Nov 27 '25 14:11 helloanoop