{"record":{"id":"dd848b5a2566decb","repo":"temporalio/temporal","slug":"unexpected-frontend-service-name","errorCode":null,"errorMessage":"Unexpected frontend service name","messagePattern":"Unexpected frontend service name","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"temporal/fx.go","lineNumber":604,"sourceCode":"\tparams ServiceProviderParamsCommon,\n\tserviceName primitives.ServiceName,\n) (ServicesGroupOut, error) {\n\tif _, ok := params.ServiceNames[serviceName]; !ok {\n\t\tparams.Logger.Info(\"Service is not requested, skipping initialization.\", tag.Service(serviceName))\n\t\treturn ServicesGroupOut{}, nil\n\t}\n\n\tapp := fx.New(\n\t\tparams.GetCommonServiceOptions(serviceName),\n\t\tfx.Supply(params.CustomFrontendInterceptors),\n\t\tfx.Decorate(func() authorization.ClaimMapper {\n\t\t\tswitch serviceName {\n\t\t\tcase primitives.FrontendService:\n\t\t\t\treturn params.ClaimMapper\n\t\t\tcase primitives.InternalFrontendService:\n\t\t\t\treturn authorization.NewInternalClaimMapper()\n\t\t\tdefault:\n\t\t\t\tpanic(\"Unexpected frontend service name\")\n\t\t\t}\n\t\t}),\n\t\tfx.Decorate(func() log.SnTaggedLogger {\n\t\t\t// Use \"frontend\" for logs even if serviceName is \"internal-frontend\", but add an\n\t\t\t// extra tag to differentiate.\n\t\t\ttags := []tag.Tag{tag.Service(primitives.FrontendService)}\n\t\t\tif serviceName == primitives.InternalFrontendService {\n\t\t\t\ttags = append(tags, tag.Bool(\"internal-frontend\", true))\n\t\t\t}\n\t\t\treturn log.With(params.Logger, tags...)\n\t\t}),\n\t\tfrontend.Module,\n\t)\n\n\treturn NewService(app, serviceName, params.Logger), app.Err()\n}\n\nfunc WorkerServiceProvider(","sourceCodeStart":586,"sourceCodeEnd":622,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/temporal/fx.go#L586-L622","documentation":"During fx (Uber Fx) dependency wiring in temporal/fx.go, the claim mapper provider selects a claim mapper implementation based on the running service name. Only FrontendService and InternalFrontendService are valid; any other service name reaching this provider means the app was assembled incorrectly, so fx panics at startup.","triggerScenarios":"Raised in the fx.Provide factory for the claim mapper (temporal/fx.go:604) when serviceName is neither \"frontend\" nor \"internal-frontend\" — i.e. this provider was registered in an app for history/matching/worker, or the service name constant was mistyped in the binary's service bootstrap.","commonSituations":"Reusing the frontend fx app options to build another service; custom binaries wiring fx options from the wrong template; typos in --service flag values or renamed service primitives.","solutions":["Start the binary with the frontend service (or internal-frontend) — this provider only applies to those services","Use the correct fx options for history/matching/worker instead of frontend options","Check the --service flag / primitives.ServiceName passed at startup for typos"],"exampleFix":"// before: wrong service name in bootstrap\ntemporal-server start --service=fronend\n// after\ntemporal-server start --service=frontend","handlingStrategy":"validation","validationCode":"switch serviceName {\ncase primitives.FrontendService, primitives.InternalFrontendService:\n    // ok to build frontend fx app\ndefault:\n    return fmt.Errorf(\"claim mapper provider only supports frontend services, got %q\", serviceName)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Match fx options to the service being started (frontend options only for frontend/internal-frontend)","Validate the --service flag against primitives.ServiceName before app assembly","Never copy frontend fx app builders for history/matching/worker binaries","Add a startup smoke test that boots each service with its correct options"],"tags":["panic","fx-dependency-injection","startup","authorization","config"],"backgroundTag":"invalid-service-name","analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}