usebruno / bruno

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

.bru files keep getting corrupted #2719

Open gtlsgamr opened 1 month ago

gtlsgamr commented 1 month ago

I have checked the following:

Describe the bug

If there is any body or query param in a request, it gets corrupted sometimes. I have to manually remove all that data to be able to see the request in bruno.

.bru file to reproduce the bug

This works

meta {
  name: Create QR
  type: http
  seq: 1
}

post {
  url: {{baseUrl}}/qr
  body: json
  auth: bearer
}

This doesn't

meta {
  name: Create QR
  type: http
  seq: 1
}

post {
  url: {{baseUrl}}/qr?quantity=20
  body: json
  auth: bearer
}

params:query {
  quantity: 20
}

auth:bearer {
  token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjE5MzEyMDUsImlhdCI6MTcyMTkyOTQwNSwiaWQiOjEsInBob25lIjoiODE0MTQwMzIzNiIsInJvbGUiOiJvcmdhbml6ZXIiLCJ1c2VybmFtZSI6ImhpdGFydGgifQ.lV2HBuRP3bfHM_2xzKaYFpZC3qi0sZdjAHZsTQaNswE
}

body:json {
  {
    "event_id": 1,
    "class": "VIP",
    "price": 420,
    "current_owner_id": 1
  }
}

Screenshots/Live demo link

No screenshots, because the file doesn't show in bruno at all.

arturbacilla commented 1 month ago

probably related to #2417

sanjai0py commented 1 month ago

Hey @gtlsgamr, I tried copying and pasting the .bru contents you provided, but I couldn't reproduce the bug. I'm not sure how to do it, so please share the OS you're using and any error logs from the console!

gtlsgamr commented 1 month ago

Hey @sanjai0py , that's the thing! It happens sometimes and sometimes it doesn't. No way to reproduce it repeatedly.

I use macOS. I will share the error logs next time it happens. I have to start bruno manually to see the console.