This is a list of issues that could occur when you develop Mini Programs for WeChat with GeneXus, and instructions/directions to solve them:
The following error occurs:
[ app.json file content error] miniprogram/app.json: ["pages"][0] could not find the corresponding file: "app/SamplePanel/samplepanel_level_detail.js"
The javascript could not be generated based on the typescript. Make sure the “Enable Custom Processing Commands” is enabled on the WeChat Mini Program IDE, recompile the project.
The following error occurs
Error executing script: MiniProgramError
module "app/MainObject/lib/gx/base/gx-page.js" is not defined
Error: module "app/MainObject/lib/gx/base/gx-page.js" is not defined
Recompile the project, close and reopen the WeChat Mini Program IDE.
The following error occurs while executing npm install:
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/ruby232/web-standard-functions.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
Check the requirements, git is not installed or not available from the command line.
The following error occurs while start executing the main object:
request url: https://servicewechat.com/wxa/ci/testSourceURL?codeprotect=0&type=miniProgram&appid=wx123&version=0.0.1&desc=robot%201%20use%20miniprogram-ci%20to%20upload%20at%202021%2F11%2F16%2010%3A19%3A31&robot=1&debugLaunchInfo=%7B%22scene%22%3A1011%7D
20003 Error: {"errCode":-1,"errMsg":"inner test source fail with errcode: 80051, errmsg: source size 2770KB exceed max limit 2MB"}
CodeError: Error: {"errCode":-1,"errMsg":"inner test source fail with errcode: 80051, errmsg: source size 2770KB exceed max limit 2MB"}
at Object.innerUpload (C:\Users\test\AppData\Roaming\npm\node_modules\miniprogram-ci\dist\ci\upload.js:1:3477)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async preview (C:\Users\test\AppData\Roaming\npm\node_modules\miniprogram-ci\dist\ci\preview.js:1:965)
at async Object.preview (C:\Users\test\AppData\Roaming\npm\node_modules\miniprogram-ci\dist\utils\report.js:1:1399)
at async run (C:\Users\test\AppData\Roaming\npm\node_modules\miniprogram-ci\dist\cli.js:1:10536) {
code: 2
The maximum length for the Mini Program was reached, please remove objects from the main.
The project does not generate a QR code, the following error is detailed:
Termianl qrcode generate failed, but you can still visit the dev version on your cell phone
If using your cell phone, go directly to the last Mini Program used, otherwise run the object again.
The following error occurs when running the project:
20003 Error: {"errCode":-1,"errMsg":"get new ticket fail: innerCode: -80011"}
Review the parameters for the project, double-check the private key is correct for the current wxID used. Some further help.
The following error occurs when running a main object:
verbose stack Error: An unknown git error occurred
verbose stack at makeError (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\git\lib\make-error.js:28:13)
verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\git\lib\spawn.js:36:26
verbose stack at processTicksAndRejections (node:internal/process/task_queues:96:5)
verbose cwd c:\fullgx\kbaux\SampleKB\mobile\WeChatMiniProgram\MainObjectName
verbose Windows_NT 10.0.19041
verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
verbose node v16.13.2
verbose npm v8.1.2
error code ENOENT
error syscall spawn git
error path git
error errno -4058
error enoent An unknown git error occurred
error enoent This is related to npm not being able to find a file.
verbose exit -4058
git for windows is not installed, check the requirements section.
The following error occurs when running the project
error fatal: unable to access 'https://github.com/ruby232/class-transformer.git/': OpenSSL SSL_read: Connection was reset, errno 10054
Execute the following command
git config --global url."git://".insteadOf https://
Execute npm install again
The following error appears when executing npm install, particularly when executing the packaging of the project:
stack Error: sampleKB@1.0.0 preview: `miniprogram-ci preview --pp . --appid wx123 -r 1 --pkp D:/models/v17/sampleKB --uv 0.0.1 --enable-minify true --qrcode-format image --qrcode-output-dest './sampleKB_Level_Detail.jpg'`
stack Exit status 1
stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
stack at EventEmitter.emit (events.js:375:28)
stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
stack at ChildProcess.emit (events.js:375:28)
stack at maybeClose (internal/child_process.js:1055:16)
stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
pkgid sampleKB@1.0.0
The problem is related to the --pp parameter, notice it uses "." and needs to be a complete fullpath to the signature key downloaded from the platform. Check the GeneXus properties and make sure the Private Key full path is correct, build the main object.
The following error appears when executing npm run IDE:
√ IDE server started successfully, listening on http://127.0.0.1:31615
[error] {
code: 10,
message: 'Error: Error Login is required (code 10)Error: Error Login is required (code 10)\n' +
' at Object.GENERIC_ERROR (C:\\Program Files (x86)\\Tencent\\WeChatMiniProgram\\code\\package.nw\\core.wxvpkg\\7201d239ccdbdc262e2ecf5fe0c8aca3.js:2:93)\n' +
' at Proxy.exports.getAppInfo (C:\\Program Files (x86)\\Tencent\\WeChatMiniProgram\\code\\package.nw\\core.wxvpkg\\b3effda444fe34caae1384305e9562c6.js:2:1063)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:93:5)\n' +
' at async Proxy.exports.getProjectInfo (C:\\Program Files (x86)\\Tencent\\WeChatMiniProgram\\code\\package.nw\\core.wxvpkg\\9d9d19a87db58211a644d4d305c488d5.js:2:2334)\n' +
' at async C:\\Program Files (x86)\\Tencent\\WeChatMiniProgram\\code\\package.nw\\core.wxvpkg\\7a975443f52e91830ae1d65cdf8c86db.js:2:3477\n' +
' at async f.<anonymous> (C:\\Program Files (x86)\\Tencent\\WeChatMiniProgram\\code\\package.nw\\core.wxvpkg\\7a975443f52e91830ae1d65cdf8c86db.js:2:2983)'
}
Run the WeChat DevTools and manually login, retry the operation.
illegal operation on a directory
The following error appears when executing npm upload:
10000 Error: EISDIR: illegal operation on a directory, read
CodeError: Error: EISDIR: illegal operation on a directory, read
at new Project (c:\models\KBSample\TargetFolder\mobile\WeChatMiniProgram\MainObject\node_modules\miniprogram-ci\dist\ci\project.js:2:1488)
at run (c:\models\KBSample\TargetFolder\mobile\WeChatMiniProgram\MainObject\node_modules\miniprogram-ci\dist\cli.js:2:9871)
at c:\models\KBSample\TargetFolder\mobile\WeChatMiniProgram\MainObject\node_modules\miniprogram-ci\dist\cli.js:2:12325
at Object.<anonymous> (c:\models\KBSample\TargetFolder\mobile\MainObject\TravelAgencyWebAngularMenu\node_modules\miniprogram-ci\dist\cli.js:3:2)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
Check the Private Key file exists and is correctly set, rebuild the sample if you changed the GeneXus WeChat MiniProgram front-end properties.
The following error appears when tapping a panel
WAServiceMainContext.js:2 {errMsg: "navigateTo:fail webview count limit exceed"
There is a restriction in the navigation stack up to 10 panels, you will need to redesign your logic, use the back/return option whenever possible.
The following error appears when compiling an application using the Design System object and a style using
margin-right: max(calc(50vw - 111px), 40px);
margin-left: max(calc(50vw - 111px), 40px);
The error details is as follows
calc(50vw - 120px) is not a number for max
Error: "calc(50vw - 120px)" is not a number for max
from line 166 of scss/Apps/Sample/UI/_base_design.scss, in mixin `apps-classname`
from line 11 of scss/Apps/Sample/UI/design.scss
margin-right:max(calc(50vw - 120px), 40px);
Remove the max function in conjuntion with calc or wrap it around the unqoute function as follows:
margin-right: unquote("max(calc(50vw - 111px), 40px)");
margin-left: unquote("max(calc(50vw - 111px), 40px)");