bruno icon indicating copy to clipboard operation
bruno copied to clipboard

[BUG] Unable to create or import environments with names like DEV or QA.

Open Sergi0Martin opened this issue 1 year ago • 10 comments

An error is thrown on create, rename or import the environment with name dev or qa.

image

image

image

Sergi0Martin avatar Dec 12 '23 12:12 Sergi0Martin

@Sergi0Martin Isn't it because you already have environments with those names ? Haven't been able to reproduce your error without have duplicate names. We could correct "An error occured while created" btw. image

bpoulaindev avatar Dec 12 '23 14:12 bpoulaindev

@Sergi0Martin Isn't it because you already have environments with those names ? Haven't been able to reproduce your error without have duplicate names. We could correct "An error occured while created" btw. image

No, I have not environments with those names. What I did first was try to import from postman environment and the error was thrown, after that either create nor rename wasn't possible. I downloaded the app yesterday so it should be the last version.

Sergi0Martin avatar Dec 12 '23 15:12 Sergi0Martin

Could you provide a screen record or the exact process you used to reproduce this issue ? I tried importing a postman environment named DEV, renaming it to DEV2, renaming it back to DEV

bpoulaindev avatar Dec 12 '23 15:12 bpoulaindev

@bpoulaindev Here is the video and the environment file generated by postman, I removed some values for security reasons: Bruno_xFwqfwxi9e

DEV.postman_environment.json

Sergi0Martin avatar Dec 13 '23 14:12 Sergi0Martin

@Sergi0Martin I see what's happening, first time importing the env works fine but it doesn't appear in collection. image The second import crashes because we're importing with the same name as the previous one, however the file still exists in the directory it's just unreadable, i'll see what i can do. image

Edit: API_URL was set on two lines, everything seems to resolve when working on.a single line : image

bpoulaindev avatar Dec 13 '23 15:12 bpoulaindev

I think it should not persist that file if the import failed. And some kind of error message in the devtool console would be also great.

Thanks @bpoulaindev.

Sergi0Martin avatar Dec 13 '23 15:12 Sergi0Martin

I will like to add on to this issue. I tried to create environment name Localhost or localhost, it failed with the error message An error occurred while created the environment, but there is no error message in the console.

I can't create it even though I don't have any environments.

Screenshot 2024-04-01 at 12 56 07 PM

EDIT: I just reread the whole thread, I do have the envs in my folder, but it is not shown in Bruno client. Screenshot 2024-04-01 at 1 10 20 PM Screenshot 2024-04-01 at 1 10 52 PM

jiaming10 avatar Apr 01 '24 05:04 jiaming10

@jiaming10 are you sure the environment isn't corrupted ? i can use the "localhost" name withut any issue, although it's with a very basic env file image

bpoulaindev avatar Apr 02 '24 07:04 bpoulaindev

@jiaming10 are you sure the environment isn't corrupted ? i can use the "localhost" name withut any issue, although it's with a very basic env file image

Sorry for the misunderstanding. I do have the envs in my folder, but it is not shown in Bruno client. So this leads to the confusion where:

  1. Bruno unable to detect the localhost env in the folder.
  2. Bruno unable to create localhost, because the env existed in the folder.

jiaming10 avatar Apr 03 '24 02:04 jiaming10

@bpoulaindev you are right that the environment is corrupted. The imported Postman environment has variables with spaces in the name.

vars {
  User PasswordRecoveryToken: 
  User PasswordRecoveryTokenMobilePin: 
  User ChangeEmailTokenMobilePin: 
}

jiaming10 avatar Apr 03 '24 03:04 jiaming10

Closing the issue as it seems to be resolved. Please open a new issue if it isn't!

sanjai0py avatar Jul 03 '24 13:07 sanjai0py