Skip to content

Stats reports use wrong GCS bucket prefix (pubsite_prod_rev_ instead of pubsite_prod_) #117

@hanamizuki

Description

@hanamizuki

Bug

gplay reports stats list returns 404 bucket does not exist because it uses the wrong GCS bucket prefix.

Root cause

bucketName() in internal/cli/reports/financial.go always returns pubsite_prod_rev_<id>, but stats reports live in pubsite_prod_<id> (no rev).

Google Play Console uses two different GCS buckets:

  • Financial reports: gs://pubsite_prod_rev_<developer_id>/
  • Stats reports: gs://pubsite_prod_<developer_id>/

Since stats.go calls the same bucketName() function, stats queries hit the wrong bucket.

Steps to reproduce

gplay reports stats list --developer <id> --type installs
# Error: googleapi: Error 404: The specified bucket does not exist., notFound

The actual bucket (visible in Play Console → Download reports) is:

gs://pubsite_prod_<developer_id>/stats/installs/

Suggested fix

Use pubsite_prod_rev_ for financial reports and pubsite_prod_ for stats reports. For example:

func statsBucketName(developerID string) string {
    return "pubsite_prod_" + developerID
}

func financialBucketName(developerID string) string {
    return "pubsite_prod_rev_" + developerID
}

Environment

  • gplay version: dev (installed via install.sh on 2026-03-08)
  • OS: macOS (arm64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions