{"record":{"id":"4f68ff87eb5d16b4","repo":"usebruno/bruno","slug":"unable-to-create-default-workspace-too-many-exist","errorCode":null,"errorMessage":"Unable to create default workspace: too many existing workspace directories","messagePattern":"Unable to create default workspace: too many existing workspace directories","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-electron/src/store/default-workspace.js","lineNumber":242,"sourceCode":"\n    return this.initializationPromise;\n  }\n\n  async initializeDefaultWorkspace(options = {}) {\n    const { migrateFromPreferences = true, recoveredData = null } = options;\n\n    const configDir = app.getPath('userData');\n    const baseWorkspacePath = path.join(configDir, 'default-workspace');\n\n    let workspacePath = baseWorkspacePath;\n    let counter = 1;\n    while (fs.existsSync(workspacePath) && counter < MAX_WORKSPACE_CREATION_ATTEMPTS) {\n      workspacePath = `${baseWorkspacePath}-${counter}`;\n      counter++;\n    }\n\n    if (counter >= MAX_WORKSPACE_CREATION_ATTEMPTS) {\n      throw new Error('Unable to create default workspace: too many existing workspace directories');\n    }\n\n    fs.mkdirSync(workspacePath, { recursive: true });\n    fs.mkdirSync(path.join(workspacePath, 'collections'), { recursive: true });\n    fs.mkdirSync(path.join(workspacePath, 'environments'), { recursive: true });\n\n    const workspaceConfig = {\n      opencollection: OPENCOLLECTION_VERSION,\n      info: {\n        name: 'My Workspace',\n        type: WORKSPACE_TYPE\n      },\n      collections: [],\n      specs: [],\n      docs: ''\n    };\n\n    // Copy recovered environments to new workspace","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-electron/src/store/default-workspace.js#L224-L260","documentation":"Error \"Unable to create default workspace: too many existing workspace directories\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-electron/src/store/default-workspace.js:242 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove or archive old default workspace directories, then restart Bruno.","Point Bruno to an existing workspace manually."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9bdd81c7bdc57006e5f5ebffb79321a8d979f712","analyzedAt":"2026-08-13T04:09:25.751Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}