In the process of doing wechat small program development, we will always encounter all kinds of strange problems. Today I encountered a variety of problems in the process of small program development, and the corresponding solutions summarized here, convenient for their own review later, but also convenient for everyone to view.
Cloud development related
First, the cloud function call failure problem
[cloud function] [login] call failure Error: errCode: – 404011 cloud function execution Error | errMsg: cloud.callFunction:fail requestID , cloud function service error code -504002, error message Function not found: [login]; at cloud.callFunction api;
The following are specific solutions to these two problems
1. The cloud function is not deployed or has not been successfully deployed
Select the cloud function we want to deploy and right click, as shown in the red box above. If you can’t upload it once, repeat it several times until the following dialog box appears
2. You have created multiple cloud development environments without setting their environment ids
If you are creating multiple cloud development environments, sometimes developer tools will be confused as to which cloud development environment to use. In this case, we need to specify the cloud development environment.