Home  >  Article  >  WeChat Applet  >  Talk about some common errors and troubleshooting methods in small program development

Talk about some common errors and troubleshooting methods in small program development

青灯夜游
青灯夜游forward
2020-04-23 09:36:404159browse

This article will talk about some common errors encountered in the process of mini programs and provide a series of troubleshooting methods. For different situations, solutions can be found from the technical environment or some unofficial methods. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

Talk about some common errors and troubleshooting methods in small program development

You may encounter various problems during the development of small programs. Many people have encountered countless pitfalls. What are the common mistakes in the development process of small programs? Here are some that are more difficult to troubleshoot. Possibilities are listed to help developers better eliminate errors.

1: The official document sample code is wrong. Sometimes there will be problems in the official document sample code, such as wrong capitalization, or other missing parameters;

2: Official document; Official document It is the best choice to solve the problem. It is recommended that when solving the problem, you should constantly read the official documents, read them carefully, and try to find the solution from the official documents;

3: Misspelled letters, including spelling of letters Error, no attention is paid to capitalization; in WeChat mini-programs, there are a large number of code examples like this, with a capital letter emerging from the middle, such as appId

4 in payment: WeChat cache; WeChat cache can lead to many unknown bugs , currently discovered are the inability to preview on a real device, and pop-up errors: You need to clear the application cache, or use a second phone to test to eliminate this problem;

On PageReadycan not find XXXXXX, app service not ready

5: Debugging tools: official developer tools and On the mobile phone, debugging tools are provided, which are basically the same as the debugging tools commonly used by everyone. You can use the debugging tools to do more debugging to avoid troubleshooting problems; for debugging methods, novices can search for relevant firebug tutorials or browser debugging tutorials on the Internet or Debugging tutorial;

6: ES6; Using es6 may cause many problems during real-machine debugging on Android, as well as other unknown problems; the cause is unknown;

7: Official BUG, ​​you encounter The problem may be an official bug that has not yet been solved. For details, you can refer to the official documentation. For beginners, the series "IV" official documentation provides a list of bugs, tips and QA prompts, as well as the latest official answers. There are currently two official helpers, and more updates. You can search for the keyword "official" on this site or go to the official developer community to inquire; official help for WeChat mini programs is available.

8: https, this pit is currently encountered by the most people. First of all, let me explain the settings of the tool.

Talk about some common errors and troubleshooting methods in small program development

This setting has some unique functions. , allowing you to avoid some local restrictions; however, this setting is not valid for real machines, so if there is an https problem, check it and it will be affected.

9: Unable to log in: You can wait a moment; when there is an account login problem, you can try to use other people's WeChat IDs, or ask other people if they have encountered the same situation, don't worry;

10: Proxy setting; Proxy setting should be a relatively deep pit, but many people have been tricked. If your machine is set up with a proxy, the developer tools may also bring the proxy by default, and then follow. Many login, blank and other problems;

Talk about some common errors and troubleshooting methods in small program development

11: Use search; now this site has aggregated a large amount of WeChat applet-related content, you can consider using this site’s search to obtain If you want to find something or use it to solve a problem, when searching, please use the main keywords or similar keywords to search instead of searching for a sentence directly. For example, if you need appid, you can search for "appid" and you encounter login For problems, you should search for "login". If you encounter a problem with the real device preview, you can search for "real device". If you encounter an upload problem, you can search for "uploadfile"

12: WeChat version problem, with the WeChat version update, Different unknown BUGs may appear between different WeChat versions;

13: Restart Dafa: Sometimes some inexplicable BUGs will appear in the editor. For example, it was fine yesterday, but various problems are opened today, etc. You can consider recompiling or restarting the tool multiple times or restarting the computer;

14: Unofficial methods are used; using some unofficial methods such as Object.assign may cause unknown problems. It is recommended Prioritize the use of official components for implementation;

The above is a collection of some common problems during the development of small programs and a series of troubleshooting methods provided. Solutions can be found from the technical environment or some unofficial methods for different situations. .

Recommendation: " Mini Program Development Tutorial"

The above is the detailed content of Talk about some common errors and troubleshooting methods in small program development. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:jisuapp.cn. If there is any infringement, please contact admin@php.cn delete