INVALID_ENV
Encountering an error? Get help with AI tools
Error Cause
The environment ID is invalid or the corresponding CloudBase environment cannot be found. This may be due to one of the following situations:
- Environment not specified
- Environment ID does not exist or has been deleted
- Environment has been isolated
Solutions
Explicitly Specify Environment
- When initializing the SDK, explicitly specify the environment ID, replace
your-env-idwith your actual environment ID// Example code
cloudbase.init({
env: 'your-env-id' // Replace with your environment ID
}); - When using HTTP API, explicitly specify the environment ID, replace
your-env-idin the URL with your actual environment IDhttps://your-env-id.api.tcloudbasegateway.com/v1/
Check if Environment ID is Correct
Log in to CloudBase Platform to verify that the Environment ID is correct
Confirm Environment is Not Overdue
If the environment has been isolated due to overdue payment, please renew it as soon as possible to prevent data loss caused by environment destruction
Mini Program Scenario
For mini program users, if none of the above situations apply, check whether the current CloudBase environment is bound to the mini program
If the environment was opened on the Tencent Cloud side and you want to use it in a mini program, you need to bind the mini program to the CloudBase environment first. For details, refer to Bind Mini Program to CloudBase Environment