usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
27.83k stars 1.29k forks source link

.bru file present, not displayed in Bruno #1771

Open kalimbra opened 8 months ago

kalimbra commented 8 months ago

When I opened bruno, a script I created lately didn't show. When I look in files, the file (CreateCertif.bru) is present, but not displayed.

I tried to create an "empty" query , and copy paste the content of the "ghost" one in this new script (all the parts after the "meta" part) and next run of Bruno, the new script was missing too.

Do not know if it can help, here is the content of the .bru files.

meta {
  name: CreateCertif
  type: http
  seq: 2
}

post {
  url: {{endpoint}}certificate/issued-certs?sharing_id={{sharing_id}}
  body: json
  auth: none
}

query {
  sharing_id: {{sharing_id}}
}

headers {
  Authorization: {{AuthCode}}
  Content-Type: application/json
  ~Dry-Run: 1
}

body:json {
  {
    "package": "cert_std_1_0_0",
    "cn": "currywurst.org",
     "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIICrTCCAZUCAQAwaDELMAkGA1UEBhMCRlIxFjAUBgNVBAgMDUlsZSBkZSBmcmFu\nY2UxDjAMBgNVBAcMBVBhcmlzMQswCQYDVQQKDAJRQTELMAkGA1UECwwCSVQxFzAV\nBgNVBAMMDmN1cnJ5d3Vyc3Qub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEA2p6Y6DcMBeoG1guAYVJhtAxOPy/px6bhxkZBxxPDfLUwDdhFwphsI/JA\nzR+rwNbzP4on9OJ3j8oH4j9qH9Z40zoQ/KohN6GFIu9KoOAYldvGugFEPjF8jXK9\nDxXgcJLmtQ2/cvapokDW/HS9VdWpbUXPKsLbdHFNkfHKpb0rhg02qkLlNGGIM5EC\n/RBwCT4fwVB4O7I4G19SZSI03jePAan95nJ/J1AH9um9ovOK/+Cog2bnUlwkG9E1\nnaFzTYsVRR65Dq3ADmSqRj/mH93kCpFZzpjNACzg2bPNo0uztvTJ/NkBbawJ7apF\n7dKxwM2eYLVjaToLrXbIPxhld2WHnwIDAQABoAAwDQYJKoZIhvcNAQELBQADggEB\nALb4ITgWiLBMm/LPs5IKjZanDRGroZLUiQEO7gCs3zhHh3j7w/odq4EOqHOE7/vv\nRQuGWZYM//h7KkrFXhCM50slJImlBh4p8Z00jqaxiVUQSCHo1PArB7GoC0EyC9Kk\nJASJhlL61FRhocyz5LXMBEVzOE+h9Tn8PH8thg/vmv387zcXIC+XN9M9O5Aqspcd\n2HDwFeVikW2No5rfw6me5y4AV4jypJftJ02nlyv44e/XkJi+aCjex03xGTwP5ioU\no/BooBZXqn4Xs9vjpKTwvADLq+ZQQ0jjG0JtkEe6qSTPB5MaTBNcgDfOb4jXJJe1\nTWvGeqVLPa5mBiGwiFlgRQs=\n-----END CERTIFICATE REQUEST-----\n",
    "dcv_method": "dns",
    "duration": 1
  }
}

vars:pre-request {
  packageName: "cert_std_1_0_0"
  cn: "currywurst.org"
  csr: "-----BEGIN CERTIFICATE REQUEST-----
  MIICrTCCAZUCAQAwaDELMAkGA1UEBhMCRlIxFjAUBgNVBAgMDUlsZSBkZSBmcmFu
  Y2UxDjAMBgNVBAcMBVBhcmlzMQswCQYDVQQKDAJRQTELMAkGA1UECwwCSVQxFzAV
  BgNVBAMMDmN1cnJ5d3Vyc3Qub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
  CgKCAQEAv3yHCRApCPSEJBTs/rGdPdgug7LwA6s+RExnMsVPu1Dtrk9Mj2pk9Sar
  4fH3NRxchitzbbGTtQUiqIUC5/OGv4IwKU2wYEE7K+Egjd+kxOlGaa1G4y0D7ZwB
  5Rm8OOQ2KHM+Lw0h8vsUczP4Tzf6Ngocnfp7XleKRhAkuoKRxb/OlwwWhx3tSkzs
  qJ2QvFwlaaR+SENmzf+3GDOI2bkqNc3OdjDdBAifwhIWwXpnVEv885pipolralNu
  maQ5Q9NNqCKaQ7RUjCk+ToLvgkNhSMla2NhWBlbA+nX7KNVeEdOcCMvLqxGV3UKL
  ZNQ4SWOSN2FpbgyEsZMHX4NZzpjJ9wIDAQABoAAwDQYJKoZIhvcNAQELBQADggEB
  AFtR5yzjoXMI5kKc7+3/HsxeUQUxNGfKT7to8Jr4WHwhTd7pKAh3iFv6E9nUHDrC
  1T3/l+yr157V0gwYkctVDk03cLAuIw8S2Jci/N0buXhx19Jvw7MUaLkSEfiZmgN7
  kkD98Xc0W6x4u6GP/enQldoIq9jGEVtUO3C+57TvK+qYrUhHU0KH0NkyrGkZBO+I
  5hM2jkgYr2pX2+a9kDiBo2vfzEJMCa9jGb6doLPNgNA/+SNLGc57atJ7XNScX90+
  JuoaBVy7PBZGA+hyaVxVER4ANkB8E7pZJ5fsuK0r9C6XyivGYA0g/fP4E2RT7/yn
  ckfmR7Bs7mTVwMsu73tUsss=
  -----END CERTIFICATE REQUEST-----
  "
  dcv: "dns"
  duration: 1
}

I run bruno v1.6.1 on Description: Ubuntu 20.04.6 LTS

Healkiss commented 8 months ago

Same with all .bru file. My bruno can't show any request. I tried to reinstall and upgrade, with no success. No request come back

Ubuntu 22.04.4 LTS Bruno 1.9.0 and 1.10.0

kalimbra commented 8 months ago

Luckily I just "loose" one of my last queries. Will do a backup this evening in case one or more is missing tomorrow.

Healkiss commented 8 months ago

All the .bru files remain in the filesystem. But Bruno don't display them, and I can watch them on another computer with Bruno. The .bru files are not corrupted. There is no error in the console.

A reboot is enough to solve the problem

pchtsp commented 6 months ago

Had the same issue in Ubuntu 22.04.4 and Bruno 1.18.0. I can confirm that rebooting solves the problem. Thanks!

a-potap commented 3 months ago

Same issue. Reboot does not help.

sanjai0py commented 3 months ago

Hey @a-potap, could you please let me know which OS and version of Bruno you are using? Also, if possible, could you share the .bru file?

skajfes commented 3 months ago

I have the same problem. The issue with me was that files edited with another editor were disappearing from Bruno. Turns out that the external editor saved the files as UTF-8 with BOM. Removing the byte order mark makes Bruno see the file again.

DMcBeal commented 3 months ago

In my case, it was a space in a Vars name that was rendering the file unreadable. I got an error message in Bruno saying variable names cannot have spaces, but it seams it still created the variable. I removed the space (From uploaded by: to uploadedby: and the file was readable again in Bruno.No reboot needed, just closed reopened it.

macOS 14.6.1 - Bruno 1.25.0

Edit: I took the OP code and try to find if I was able to replicate the issue and it was not showing up on my setup as well. In their code the issue is the csr: variable having more than one line of text. Every time I reduced the certificate line to only one line, the file was readable again.

tho-gru-38 commented 2 months ago

I have the same issue here. In my case I edited the .bru file externally. I figured out two reason for a .bru file not showing up in the Bruno UI:

  1. Line break in the query parameter
  2. Empty docs section
    docs {
    }

This is a show stopper: There exists some .bru files within a collection but Bruno reject loading/displaying them silently. My expectation is that Bruno shows some message, when switching to a collection. Such messages must list all the filenames of not loaded files containing same errors. Based on the list of files containing errors I can try to change these files by using an external editor.

asirota commented 1 month ago

Same issue here -- I lost track of an endpoint as I was organizing endpoints into folder - it becaame "undefined"

Then I got a back up .bru file and added it to the folder but restarting Bruno doesn't make the file reappear in the folder or anywhere. Restarting the app didn't help either.

Windows app v 1.33.0

hairullana commented 1 month ago

I had the same issue because I imported a collection from a Postman export. In the path parameters, some parameter names contained spaces.

Previously, the parameters were named "laporan id" and "kelompok pertanyaan id". I changed them to "laporan_id" and "kelompok_pertanyaan_id" (replacing spaces with underscores), and the issue was resolved.

You can modify the parameters by editing the file with the .bru extension.

After making the changes, close and reopen the Bruno app.

image image