Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Just importing this package in a non-GCP environment logs errors to console #800

@jonahsnider

Description

@jonahsnider

Description

Just importing this package (not calling .start()) in a non-GCP environment causes the following message to be printed to the console:

failed to set logging project id Error: Unable to detect a Project Id in the current environment.
To learn more about authentication and Google APIs, visit:
https://cloud.google.com/docs/authentication/getting-started

Introduced in #780

Reproduction

  1. Clone this repo, npm install, npm run compile
  2. Run node .
  3. Wait ~8s as the profiler initializes
  4. The message should be printed to the console immediately before the program exits without error

Metadata

Metadata

Assignees

No one assigned

    Labels

    🚨This issue needs some love.api: cloudprofilerIssues related to the googleapis/cloud-profiler-nodejs API.triage meI really want to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions