{"record":{"id":"9ae4f0b0eed577c8","repo":"googleapis/mcp-toolbox","slug":"unable-to-initialize-auth-service-q-w","errorCode":null,"errorMessage":"unable to initialize auth service %q: %w","messagePattern":"unable to initialize auth service %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/server/server.go","lineNumber":146,"sourceCode":"\tfor name := range sourcesMap {\n\t\tsourceNames = append(sourceNames, name)\n\t}\n\tl.InfoContext(ctx, fmt.Sprintf(\"Initialized %d sources: %s\", len(sourcesMap), strings.Join(sourceNames, \", \")))\n\n\t// initialize and validate the auth services from configs\n\tauthServicesMap := make(map[string]auth.AuthService)\n\tfor name, sc := range cfg.AuthServiceConfigs {\n\t\ta, err := func() (auth.AuthService, error) {\n\t\t\t_, span := instrumentation.Tracer.Start(\n\t\t\t\tctx,\n\t\t\t\t\"toolbox/server/auth/init\",\n\t\t\t\ttrace.WithAttributes(attribute.String(\"auth_type\", sc.AuthServiceConfigType())),\n\t\t\t\ttrace.WithAttributes(attribute.String(\"auth_name\", name)),\n\t\t\t)\n\t\t\tdefer span.End()\n\t\t\ta, err := sc.Initialize()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"unable to initialize auth service %q: %w\", name, err)\n\t\t\t}\n\t\t\treturn a, nil\n\t\t}()\n\t\tif err != nil {\n\t\t\treturn nil, nil, nil, nil, nil, nil, err\n\t\t}\n\t\tauthServicesMap[name] = a\n\t}\n\n\tauthServiceNames := make([]string, 0, len(authServicesMap))\n\tfor name := range authServicesMap {\n\t\tauthServiceNames = append(authServiceNames, name)\n\t}\n\tl.InfoContext(ctx, fmt.Sprintf(\"Initialized %d authServices: %s\", len(authServicesMap), strings.Join(authServiceNames, \", \")))\n\n\t// Initialize and validate embedding models from configs.\n\tembeddingModelsMap := make(map[string]embeddingmodels.EmbeddingModel)\n\tfor name, ec := range cfg.EmbeddingModelConfigs {","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/server.go#L128-L164","documentation":"Error \"unable to initialize auth service %q: %w\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/server/server.go:146 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}