{"record":{"id":"5c41b0f501cf3d7b","repo":"cli/cli","slug":"error-opening-browser-w","errorCode":null,"errorMessage":"error opening browser: %w","messagePattern":"error opening browser: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/codespace/create.go","lineNumber":395,"sourceCode":"\t\t\t\tOptions: choices,\n\t\t\t\tDefault: choices[0],\n\t\t\t},\n\t\t\tValidate: survey.Required,\n\t\t},\n\t}\n\n\tvar answers struct {\n\t\tAccept string\n\t}\n\n\tif err := prompter.Ask(permsSurvey, &answers); err != nil {\n\t\treturn nil, fmt.Errorf(\"error getting answers: %w\", err)\n\t}\n\n\t// if the user chose to continue in the browser, open the URL\n\tif answers.Accept == choices[0] {\n\t\tif err := a.browser.Browse(allowPermissionsURL); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error opening browser: %w\", err)\n\t\t}\n\n\t\t// Poll until the user has accepted the permissions or timeout\n\t\tif err := a.pollForPermissions(ctx, createParams); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error polling for permissions: %w\", err)\n\t\t}\n\t} else {\n\t\t// If the user chose to create the codespace without the permissions,\n\t\t// we can continue with the create opting out of the additional permissions\n\t\tcreateParams.PermissionsOptOut = true\n\t}\n\n\tvar codespace *api.Codespace\n\terr := a.RunWithProgress(\"Creating codespace\", func() (err error) {\n\t\tcodespace, err = a.apiClient.CreateCodespace(ctx, createParams)\n\t\treturn\n\t})\n","sourceCodeStart":377,"sourceCodeEnd":413,"githubUrl":"https://github.com/cli/cli/blob/0eeec0b92edbe70199f9768522f831d3534f41ad/pkg/cmd/codespace/create.go#L377-L413","documentation":"Error \"error opening browser: %w\" thrown in cli/cli.","triggerScenarios":"Thrown at pkg/cmd/codespace/create.go:395 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Open the printed URL manually in a browser to accept the permissions."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eeec0b92edbe70199f9768522f831d3534f41ad","analyzedAt":"2026-08-15T12:31:05.478Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}