usebruno / bruno

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

Saved requests in collection are not appearing in the UI #3306

Open Hazz223 opened 1 week ago

Hazz223 commented 1 week ago

I have checked the following:

Describe the bug

As of version 1.33.0, creating a new request in a collection will save it to the directory and display it in the UI. When reopening Bruno, the request is no longer there. I can see the .bru file in the directory. Closing and reopening the collection doesn't work. However, creating a new request with the same name as the previous one, doesn't work due to it saying the name has already been taken.

Any one else seen this issue?

I'm using a Macbook Pro 2019, with an intel processor.

.bru file to reproduce the bug

Cannot share.

Screenshots/Live demo link

Will share soon

s13g3lb4um commented 1 week ago

I’m experiencing the same issue, and additionally, it also occurs with the saved environments. Could you provide further guidance or support on this?

.bru file to reproduce the bug

Download Reports.bru

Screenshots/Live demo link image image

In this example, the requests for 'Search Items' and 'Download Reports' have been omitted.

ulph0 commented 1 week ago

i have the same issue. requests are disappearing, sometimes also collections. to get the requests back, i have to close the collections and reload them. very unstable and nearly unusable, had lots of hassle with it. i itried it with downgrading, but it's the same there. since al longer time. i am running ubuntu 24.04 with gnome. are there people without that problem? is bruno still in development? is there a more stable fork?

yannleretaille commented 1 week ago

Same issue here. The collection is still in the list after re-opening bruno (1.33), but all requests have disspeared. If I try to open the collection manually I get an error and the console log shows:

ValidationError
    at Object.createError (_app-5b55a57df7ed022e.js:52:106730)
    at Object.test (_app-5b55a57df7ed022e.js:55:18238)
    at validate (_app-5b55a57df7ed022e.js:52:106987)
    at runTests (_app-5b55a57df7ed022e.js:52:104378)
    at _app-5b55a57df7ed022e.js:55:758
    at _app-5b55a57df7ed022e.js:52:104111
    at _app-5b55a57df7ed022e.js:52:104631
    at _app-5b55a57df7ed022e.js:52:107051
407-ca3247c8a0362824.js:1 BrunoError: The Collection file is corrupted
    at 407-ca3247c8a0362824.js:1:6101
yannleretaille commented 1 week ago

OK, it seems there were two problems:

  1. the collection had a ":" in the name field set in bruno.json, that's why trying to open it resulted in the validation error above. I had no issues creating the collection with that name before, and I'm not really sure why such a common character is not allowed in the name. And if it really is an issue the creation dialog should not allow it.
  2. now that I manually renamed it, I can get around the bug by closing the collection and re-opening it. If I restart bruno, there will again be zero requests in the collection until I close and re-open it again.
Pragadesh-45 commented 1 week ago

Hey @yannleretaille,

Thanks for reporting this bug. There is a high chance that your .bru file is corrupted, as you mentioned. However, for other requests, it must be displayed in the UI. If possible, please attach a .zip file of the lookalike collection that has this bug, or provide us with a solid set of steps to reproduce it.

ulph0 commented 6 days ago

when my bru file(s) are corrupt why should they load sometiimes but most of the time not, but when i close the collection and reopen? i can't send my collections, they contain private data. maybe someone else could.

ardadylan commented 6 days ago

same issue here! I think this happend due to syncing issues after using a different code editor like vscode or cursor. I could send you the specific get request file, however I cannot send the whole collection.

ardadylan commented 6 days ago

Error invoking remote method 'renderer:bru-to-json': Error: Line 11, col 3: 10 | auth: inherit

11 | } when { !bru.getVar('skip_lead_creation') } ^ 12 | Expected end of input, "docs", "tests", "script:post-response", "script:pre-request", "assert", "vars:post-response", "vars:pre-request", "body", "body:multipart-form", "body:form-urlencoded", "body:graphql:vars", "body:graphql", "body:sparql", "body:xml", "body:text", "body:json", "auth:apikey", "auth:wsse", "auth:oauth2", "auth:digest", "auth:bearer", "auth:basic", "auth:awsv4", "headers", "params:query", "params:path", "query", "trace", "connect", "head", "options", "patch", "delete", "put", "post", "get", or "meta"

Found this error in Bruno when I copy pasted my code into Bruno. Basically shouldn't be using a "when" condition within the bruno file structure.

Spark198rus commented 5 days ago

I have the same issue, but re-opening the collection makes everything reappear. PS: just got V 1.33.1 , my issue was resolved in this. PPS: whoops, it did not.