WeChat applet "errMsg": "request:fail -200:net::ERR_CERT_COMMON_NAME_INVALID"

There is no problem when the applet is tested in the developer tool, but the following error is reported in the real device test, and the sending request fails.

wrong request

Since there is no problem in the developer tool, the problem of wrongly written domain name is ruled out, and the development environment can run should be set to not detect legal problems.

Do not check legitimate domain names

After canceling the settings, run the developer tool again to see the following error.

Invalid certificate error

And you can also see the error by putting the error request interface into the browser to run.

certificate invalid

This confirms that it is a certificate issue. For me, it is caused by the inconsistency between the certificate and the domain name. Just put the new certificate on the server.

Guess you like

Origin blog.csdn.net/m0_49343686/article/details/114277069