{"record":{"id":"42d4abfe45309af6","repo":"googleapis/mcp-toolbox","slug":"no-active-firestore-rules-were-found-in-project","errorCode":null,"errorMessage":"no active Firestore rules were found in project '%s' and database '%s'","messagePattern":"no active Firestore rules were found in project '(.+?)' and database '(.+?)'","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/firestore/firestore.go","lineNumber":465,"sourceCode":"\t\t// If this is a subcollection, include parent information\n\t\tif collRef.Parent != nil {\n\t\t\tcollData[\"parent\"] = collRef.Parent.Path\n\t\t}\n\t\tresults[i] = collData\n\t}\n\treturn results, nil\n}\n\nfunc (s *Source) GetRules(ctx context.Context) (any, error) {\n\t// Get the latest release for Firestore\n\treleaseName := fmt.Sprintf(\"projects/%s/releases/cloud.firestore/%s\", s.GetProjectId(), s.GetDatabaseId())\n\trelease, err := s.FirebaseRulesClient().Projects.Releases.Get(releaseName).Context(ctx).Do()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get latest Firestore release: %w\", err)\n\t}\n\n\tif release.RulesetName == \"\" {\n\t\treturn nil, fmt.Errorf(\"no active Firestore rules were found in project '%s' and database '%s'\", s.GetProjectId(), s.GetDatabaseId())\n\t}\n\n\t// Get the ruleset content\n\truleset, err := s.FirebaseRulesClient().Projects.Rulesets.Get(release.RulesetName).Context(ctx).Do()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get ruleset content: %w\", err)\n\t}\n\n\tif ruleset.Source == nil || len(ruleset.Source.Files) == 0 {\n\t\treturn nil, fmt.Errorf(\"no rules files found in ruleset\")\n\t}\n\n\treturn ruleset, nil\n}\n\n// SourcePosition represents the location of an issue in the source\ntype SourcePosition struct {\n\tFileName      string `json:\"fileName,omitempty\"`","sourceCodeStart":447,"sourceCodeEnd":483,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/firestore/firestore.go#L447-L483","documentation":"Error \"no active Firestore rules were found in project '%s' and database '%s'\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/sources/firestore/firestore.go:465 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"}