Tag Archives: uniapp

[Solved] Uniapp packaging IOS error: Apple root certificate is not installed in the current system

Hbuilderx: for IOS peace of mind packaging, MacOSX 10.14 and below systems need to install relevant certificates

Treatment method:

1. Open the certificate directory

2. Click the certificate, enter the computer password, allow the key chain to access, and confirm that the certificate is valid in the key chain

3. Other certificates in the certificate directory should also be obtained

[Solved] HBuilderX Run uniapp Error: SassError: Invalid CSS after “}”: expected selector, was “,”

After the hbuilderx editor is updated to the latest version, sass reports an error. If you switch to the previous version, there will be no error

Error message:

Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Invalid CSS after " }": expected selector, was ","

Problems and solutions:

There is a problem with CSS writing. There may be a deviation between the prompted position and the actual position

The verification of the new version of hbuilderx editor is more strict. Just remove the comma at the corresponding position

uniapp Use picker Error: Error in render: “TypeError: Cannot read property ‘XXX’ of undefined”

In uniapp, picker is used to render the object array, and the data is obtained from the background. The page code is as follows:

The data acquisition code is as follows:

Error report encountered:

The mistake here is that the property ProjectName is undefined, so you only need to add this property to the object array:

Previously:

Replace with:

If you use the hbuilder built-in browser, you may not see the error until you refresh it twice;

above;

Uniapp cloud storage {“errmsg”: “cloudpath is illegal”}

Upload pictures to cloud storage.

uni.chooseImage({
                    count:1,
                    success:res=>{
                        this.src=res.tempFilePaths[0]
                        console.log(res.tempFilePaths[0])
                        uniCloud.uploadFile({
                            filePath:res.tempFilePaths[0],
                            cloudPath:res.tempFilePaths[0]+res.tempFiles[0].name,
                            success: (res) => {
                                console.log(res)
                            },
                            fail: (err) => {
                                console.log(JSON.stringify(err))
                            }
                        })
                    }
                    
                })

 

Error reported: {errmsg “:” cloudpath is illegal “}

Reason: cloudpath  –  when using alicloud, cloudpath is the cloud file name. Do not use the illegal character

(cloudpath: res.tempfilepaths [0] + res.tempfiles [0]. Name -- & gt; is illegal)

Solution: change to cloudpath: res.tempfiles [0]. Name

 

An error is reported on the white screen of the uniapp on the app side

question:

There is no problem with the H5 terminal. The app terminal has a white screen (except for the native tabbar), and the console outputs the following error reports, looking confused

[ERROR] reportJSException >>>> exception function:createInstanceContext, exception:white screen cause create instanceContext failed,check js stack ->RangeError: Maximum call stack size exceeded.

getTemplateInfo== template md5 726779f58920978db2f629e5e90b6599 length 5234452 base64 md5 cmd59Ykgl42y9inl6QtlmQ== response header {"templateSourceBase64MD5":["cmd59Ykgl42y9inl6QtlmQ=="],"templateSourceMD5":["726779f58920978db2f629e5e90b6599"]}

  Solution process:

Reference https://blog.csdn.net/weixin_43343144/article/details/98085487

The reason for his problem is that this is used in props

 

But I didn’t operate props like this… No, I directly used this in the data of a component:

 

I want to transfer this to a function to solve a callback problem

 

  Replace with the following:

 

 

  Don’t report errors ~ solve