TypeError: Cannot read property 'toLocaleLowerCase' of undefined

Creator versions: 3.6.1 and 3.7.1

Target platform: WeChat Mini Games

Reproduction method: Create a new project in 2d, add a button, the webpage runs fine, but after the WeChat mini-game is built, the WeChat developer tool fails to run. The relevant errors are as follows
The basic library version 2.20.1 has been deprecated. Please use wx.getSystemSetting, wx.getAppAuthorizeSetting, wx.getDeviceInfo, wx.getWindowInfo, wx.getAppBaseInfo instead

Synchronous version of wx.getSystemInfo
TypeError: Cannot read property ‘toLocaleLowerCase’ of undefined
at game.js? [sm]:81

Question: What is the code logic for generating game.js by RunoseAI creator based on? The target seems to have generated an API call that is no longer supported by WeChat. What should I do?

2 Likes

It depends on whose browser it is. If it is your own app + webview, just define the interface on the app side.