Skip to main content

INVALID_ENV

I'm encountering an error and reviewing the docs to understand what's happening. Please help me resolve this.

Fix Error with AI Tool

Error Cause

Environment ID is invalid or corresponding CloudBase environment not found, may be one of the following situations:

  1. Environment not specified
  2. Environment ID does not exist or has been deleted
  3. Environment has been isolated

Solution

Explicitly specify environment

  • When initializing SDK, explicitly specify environment ID, replace your-env-id with your environment ID
    // Example code
    cloudbase.init({
    env: 'your-env-id' // Replace with your environment ID
    });
  • When using HTTP API, explicitly specify environment ID, replace your-env-id in URL with your environment ID
    https://your-env-id.api.tcloudbasegateway.com/v1/

Check if environment ID is correct

Login to CloudBase Platform, verify if Environment ID is correct

Verify environment is not in arrears

If environment has been isolated due to arrears, please renew promptly to prevent environment destruction and data loss