Error reporting - applet: errMsg: “getUserProfile: fail privacy permission is not authorized”

1. Problem description

When the applet wx.getUserProfile method is called, the error is as follows

errMsg: "getUserProfile:fail privacy permission is not authorized"

The reason for the problem is that the version library that the new version depends on does not support it. Here, it is adjusted to 2.18.1, and it can be used normally.

In the same way, if there are other methods of WeChat applets that report errors, then it may be that the dependent version library does not support it. You can check it from this perspective.

2. Related content

2.1. What is the basic library for small program debugging

Mini programs are lightweight applications that can run on platforms such as WeChat and Alipay. The basic library for debugging applets refers to the basic library for debugging and running applets in the applet developer tools. The basic library refers to the core library of the applet, including the running environment of the applet and basic APIs, such as network requests and data storage. The debugging basic library refers to the library used in the applet developer tool to simulate the running environment of the applet and provide the corresponding API. By debugging the basic library, developers can debug the code and functions of the applet in the developer tool, check and fix problems.

2.2. What is the WeChat Mini Program Debugging Basic Library

The WeChat Mini Program Debugging Basic Library is a library for simulating the running environment of Mini Programs and providing corresponding APIs for developers to debug the code and functions of Mini Programs in the WeChat Mini Program Developer Tool.

WeChat applets are applications running in the WeChat client, which are characterized by light weight, convenience, and low development threshold. In order to facilitate rapid development and testing for developers, WeChat provides developer tools, including debugging basic libraries. The debugging base library provides the same APIs as the running environment of the applet, such as network requests, data storage, interface rendering, etc., and can also simulate different device types and network environments to help developers better debug and optimize applets.

When using the WeChat Mini Program Developer Tools, developers can adapt to different WeChat client versions by switching the debugging base library version, and check the compatibility of Mini Programs between different versions.

3. Welcome to exchange and correct

reference link

Introduction and Changes of WeChat Mini Program Basic Library_WeChat Mini Program Debug Basic Library_UserGuan's Blog-CSDN Blog

Mini Program Basic Library (Mini Program Basic Library corresponds to WeChat version) - Orange

Can the version of the WeChat mini-program basic library be reduced (the mini-program basic library corresponds to the WeChat version)-Protest free sharing network

Guess you like

Origin blog.csdn.net/snowball_li/article/details/132312909