usebruno/bruno · error · Error
Environment with the same name already exists
Error message
Environment with the same name already exists
What it means
Error "Environment with the same name already exists" thrown in usebruno/bruno.
Source
Thrown at packages/bruno-electron/src/store/global-environments.js:135
if (!workspacePath) return;
const key = posixifyPath(workspacePath);
const mapping = this.store.get('activeGlobalEnvironmentUidByWorkspace', {});
delete mapping[key];
this.store.set('activeGlobalEnvironmentUidByWorkspace', mapping);
}
setGlobalEnvironments(globalEnvironments) {
globalEnvironments = this.filterValidEnvironments(globalEnvironments);
globalEnvironments = this.encryptGlobalEnvironmentVariables({ globalEnvironments });
return this.store.set('environments', globalEnvironments);
}
addGlobalEnvironment({ uid, name, variables = [], color }) {
let globalEnvironments = this.getGlobalEnvironments();
const existingEnvironment = globalEnvironments.find((env) => env?.name == name);
if (existingEnvironment) {
throw new Error('Environment with the same name already exists');
}
globalEnvironments.push({
uid,
name,
variables,
color
});
this.setGlobalEnvironments(globalEnvironments);
}
saveGlobalEnvironment({ environmentUid: globalEnvironmentUid, variables, color }) {
let globalEnvironments = this.getGlobalEnvironments();
const environment = globalEnvironments.find((env) => env?.uid == globalEnvironmentUid);
globalEnvironments = globalEnvironments.filter((env) => env?.uid !== globalEnvironmentUid);
if (environment) {
environment.variables = variables;
if (color !== undefined) {
environment.color = color;View on GitHub (pinned to 9bdd81c7bd)
Solutions
- Choose a unique environment name.
- Rename or delete the existing global environment first.
When it happens
Trigger: Thrown at packages/bruno-electron/src/store/global-environments.js:135 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13).
Data as JSON: /api/errors/33f180321f86859d.
Report an issue: GitHub.