wechaty / wechaty-puppet-padplus

DEPRECATED: One puppet based on iPad protocal for Wechaty
https://wechaty.js.org/docs/puppet-services/
313 stars 64 forks source link

Error: Message.say() received unknown msg: FileBox#Base64 #310

Open treeguard opened 3 years ago

treeguard commented 3 years ago

Important:Please file the issue follow the template, or we won't help you to solve the problem.

0. Report Issue Guide

  1. Please run the following command and check whether the problem has been fixed:
npm install wechaty-puppet-padplus@next
  1. Please search in the issue first, and make sure your problem had not been reported before

1. Versions

2. Describe the bug

I think the bug was introduced recently since my code ran well before.

(node:4548) UnhandledPromiseRejectionWarning: Error: Message.say() received unknown msg: FileBox#Base64<test.png>
    at WechatifiedMessage.say (/.../node_modules/wechaty/dist/src/user/message.js:439:19)

3. To Reproduce

Here is my code

  let data =  FileBox.fromDataURL(dataURL, "test.png")
  await msg.say(data)

4. Expected behavior

The bot is expected to send the png image but fails now.

5. Actual behavior

If applicable, add screenshots to help explain your problem. But do not paste log screenshots here.

6. Full Output Logs

Set env WECHATY_LOG=silly in order to set log level to silly, then we can get the full log (If you dosen't set log env, log level is info as default, we cannot get the full log)

We need full log instead of log screenshot or log fragments!

Show Logs ```shell $ WECHATY_LOG=silly node yourbot.js Question: Paste your FULL(DO NOT ONLY PROVIDE FRAGMENTS) log messages Answer: ```

7. Additional context

Add any other context about the problem here.

[bug]

treeguard commented 3 years ago

@su-chang do you mind taking at a look this issue

su-chang commented 3 years ago
function process(fileBox: FileBox, name: string) {
  return FileBox.fromBase64(await fileBox.toBase64(), name)
}

Please have a try in this way, and share your result in comment, thank you.

treeguard commented 3 years ago

@su-chang just tried it again, I tried the same way a few days ago, it has the same error:

(node:4548) UnhandledPromiseRejectionWarning: Error: Message.say() received unknown msg: FileBox#Base64<test.png>
    at WechatifiedMessage.say (/.../node_modules/wechaty/dist/src/user/message.js:439:19)

The thing I did recently was to upgrade my wechaty libraries to fix some other issues, so I guess it's a library issue since my code works well before?

yiouyou commented 3 years ago

@su-chang with "wechaty-puppet-padplus": "^0.6.6", I met the same problem:

let f_path = path.resolve(__dirname, "./imgs/pay.png")
const pay_png = FileBox.fromFile(f_path)
await msg.say(pay_png)
log.info('Bot', `onMessage: 打赏 ${f_path}`)
log.info('Bot', `onMessage: 打赏 -> ${pay_png}`)

log.info:

16:02:55 INFO Bot onMessage: 打赏 /mnt/d/wxBot-dorm-seller/bot/imgs/pay.png
16:02:55 ERR Bot onMessage: Error: Message.say() received unknown msg: FileBox#File<pay.png>

As I remember, it was working before, but it fails very time now. Could you help us? Thanks

su-chang commented 3 years ago

@yiouyou Sorry, I have not reproduced this problem, please upgrade wechaty@0.48.10 and wechaty-puppet-padplus@0.6.6.

BTW, please try these commands:

rm -rf node_modules package-lock.json
npm i wechaty
npm i wechaty-puppet-padplus
npm i
yiouyou commented 3 years ago

@su-chang After to do exactly the same commands, there still is the problem, Error: Message.say() received unknown msg: FileBox#File . All I can do now is to bypass it using UrlLink.

code

...
else if (content === "打赏" || parseInt(content) === 5) {
    //打赏,这里换成自己的赞赏二维码
    //FileBox
    let f_path = path.resolve(__dirname, "./imgs/pay.png")
    log.info('Bot', `onMessage: 打赏 ${f_path}`)
    let pay_png = FileBox.fromFile(f_path) //FileBox.fromUrl('https://wechaty.github.io/wechaty/images/bot-qr-code.png')
    try {
      await delay(400)
      await msg.say(pay_png)
      log.info('Bot', `onMessage: 打赏 -> ${pay_png}`)
    } catch (e) {
      log.error('Bot', 'onMessage: %s', e)
    }
    //UrlLink
    let pay_png_link = "https://images.shobserver.com/news/690_390/2019/9/4/5b5d2b74-cced-4cbd-8828-75ccc1724a37.jpg"
    let urlLink = new UrlLink({
      title: '二维码',
      description: 'image',
      thumbnailUrl: "https://s1.ax1x.com/2020/09/08/wQALpq.jpg",
      url: pay_png_link
    })
    await delay(400)
    await msg.say(urlLink)
    log.info('Bot', `onMessage: 打赏 -> ${urlLink}`)
    //多谢老板
    await delay(400)
    await msg.say("多谢老板 🙏")
  }
... 

printout:

sz@pc:/mnt/d/wxBot-dorm-seller/bot$ rm -rf node_modules/
sz@pc:/mnt/d/wxBot-dorm-seller/bot$ cat package.json
{
  "name": "wxbot-test",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "sz <zhuosong@gmail.com>",
  "license": "MIT",
  "dependencies": {
    "cheerio": "^1.0.0-rc.3",
    "file-box": "^0.12.8",
    "finis": "^0.4.4",
    "hot-import": "^0.2.14",
    "js-md5": "^0.7.3",
    "node-fetch": "^2.6.1",
    "node-schedule": "^1.3.2",
    "path": "^0.12.7",
    "qrcode-terminal": "^0.12.0",
    "superagent": "^6.1.0",
    "urlencode": "^1.1.0",
    "wechaty": "^0.48.10",
    "wechaty-puppet-padplus": "^0.6.6"
  }
}
sz@pc:/mnt/d/wxBot-dorm-seller/bot$ cnpm install wechaty
✔ Installed 1 packages
✔ Linked 366 latest versions
[1/3] scripts.postinstall wechaty@0.48.10 › opencollective@1.0.3 › babel-polyfill@6.23.0 › core-js@^2.4.0 run "node -e \"try{require('./postinstall')}catch(e){}\"", root: "/mnt/d/wxBot-dorm-seller/bot/node_modules/_core-js@2.6.11@core-js"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

[1/3] scripts.postinstall wechaty@0.48.10 › opencollective@1.0.3 › babel-polyfill@6.23.0 › core-js@^2.4.0 finished in 38ms
[2/3] scripts.install wechaty@0.48.10 › wechaty-puppet-hostie@0.10.2 › @chatie/grpc@0.17.4 › grpc@^1.24.2 run "node-pre-gyp install --fallback-to-build --library=static_library", root: "/mnt/d/wxBot-dorm-seller/bot/node_modules/_grpc@1.24.3@grpc"
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp http GET https://cdn.npm.taobao.org/dist/grpc/v1.24.3/node-v72-linux-x64-glibc.tar.gz
node-pre-gyp http 200 https://cdn.npm.taobao.org/dist/grpc/v1.24.3/node-v72-linux-x64-glibc.tar.gz
[grpc] Success: "/mnt/d/wxBot-dorm-seller/bot/node_modules/_grpc@1.24.3@grpc/src/node/extension_binary/node-v72-linux-x64-glibc/grpc_node.node" is installed via remote
[2/3] scripts.install wechaty@0.48.10 › wechaty-puppet-hostie@0.10.2 › @chatie/grpc@0.17.4 › grpc@^1.24.2 finished in 3s
[3/3] scripts.postinstall wechaty@^0.48.10 run "opencollective-postinstall", root: "/mnt/d/wxBot-dorm-seller/bot/node_modules/_wechaty@0.48.10@wechaty"
Thank you for using wechaty!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/wechaty/donate

[3/3] scripts.postinstall wechaty@^0.48.10 finished in 53ms
✔ Run 3 scripts
peerDependencies WARNING wechaty@0.48.10 › ws@^7.3.1 requires a peer of bufferutil@^4.0.1 but none was installed
peerDependencies WARNING wechaty@0.48.10 › ws@^7.3.1 requires a peer of utf-8-validate@^5.0.2 but none was installed
deprecate wechaty@0.48.10 › open-graph@0.2.4 › request@2.88.2 › har-validator@~5.1.3 this library is no longer supported
deprecate wechaty@0.48.10 › wechaty-puppet@0.32.3 › memory-card@0.10.1 › esdk-obs-nodejs@3.20.7 › log4js@3.0.6 › circular-json@^0.5.5 CircularJSON is in maintenance only, flatted is its successor.
deprecate wechaty@0.48.10 › opencollective@1.0.3 › babel-polyfill@6.23.0 › core-js@^2.4.0 core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
Recently updated (since 2020-09-09): 5 packages (detail see file /mnt/d/wxBot-dorm-seller/bot/node_modules/.recently_updates.txt)
  Today:
    → wechaty@0.48.10 › wechaty-puppet@0.32.3 › memory-card@0.10.1 › aws-sdk@^2.620.0(2.753.0) (02:21:37)
    → wechaty@0.48.10 › wechaty-puppet-hostie@0.10.2 › @chatie/grpc@0.17.4 › grpc@1.24.3 › @types/bytebuffer@5.0.41 › @types/node@*(14.10.2) (02:23:28)
✔ All packages installed (410 packages installed from npm registry, used 30s(network 26s), speed 303.4kB/s, json 367(1.27MB), tarball 6.41MB)
sz@pc:/mnt/d/wxBot-dorm-seller/bot$ cnpm install wechaty-puppet-padplus
✔ Installed 1 packages
✔ Linked 140 latest versions
[1/2] scripts.install wechaty-puppet-padplus@0.6.6 › flash-store@0.14.5 › rocksdb@^4.1.0 run "node-gyp-build", root: "/mnt/d/wxBot-dorm-seller/bot/node_modules/_rocksdb@4.1.0@rocksdb"
[1/2] scripts.install wechaty-puppet-padplus@0.6.6 › flash-store@0.14.5 › rocksdb@^4.1.0 finished in 170ms
[2/2] scripts.postinstall wechaty-puppet-padplus@0.6.6 › wechaty-puppet-cache@0.1.10 › wechaty-puppet@0.24.0 › file-box@0.12.8 › jimp@0.10.3 › core-js@^3.4.1 run "node -e \"try{require('./postinstall')}catch(e){}\"", root: "/mnt/d/wxBot-dorm-seller/bot/node_modules/_core-js@3.6.5@core-js"
[2/2] scripts.postinstall wechaty-puppet-padplus@0.6.6 › wechaty-puppet-cache@0.1.10 › wechaty-puppet@0.24.0 › file-box@0.12.8 › jimp@0.10.3 › core-js@^3.4.1 finished in 32ms
✔ Run 2 scripts
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_gif@0.10.3@@jimp/gif unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-dither@0.10.3@@jimp/plugin-dither unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_types@0.10.3@@jimp/types unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-displace@0.10.3@@jimp/plugin-displace unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-fisheye@0.10.3@@jimp/plugin-fisheye unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_jpeg@0.10.3@@jimp/jpeg unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_png@0.10.3@@jimp/png unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-circle@0.10.3@@jimp/plugin-circle unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-cover@0.10.3@@jimp/plugin-cover unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-blur@0.10.3@@jimp/plugin-blur unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-crop@0.10.3@@jimp/plugin-crop unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-contain@0.10.3@@jimp/plugin-contain unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/plugin-crop@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-cover@0.10.3@@jimp/plugin-cover unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-crop(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-color@0.10.3@@jimp/plugin-color unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_bmp@0.10.3@@jimp/bmp unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_tiff@0.10.3@@jimp/tiff unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-scale@0.10.3@@jimp/plugin-scale unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/plugin-scale@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-contain@0.10.3@@jimp/plugin-contain unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-scale(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-blit@0.10.3@@jimp/plugin-blit unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/plugin-resize@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-contain@0.10.3@@jimp/plugin-contain unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-resize(0.13.0)
peerDependencies link @jimp/plugin-blit@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-contain@0.10.3@@jimp/plugin-contain unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-blit(0.13.0)
peerDependencies link @jimp/plugin-resize@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-scale@0.10.3@@jimp/plugin-scale unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-resize(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-resize@0.10.3@@jimp/plugin-resize unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugins@0.10.3@@jimp/plugins unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-invert@0.10.3@@jimp/plugin-invert unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/plugin-resize@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-cover@0.10.3@@jimp/plugin-cover unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-resize(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-normalize@0.10.3@@jimp/plugin-normalize unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-mask@0.10.3@@jimp/plugin-mask unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-gaussian@0.10.3@@jimp/plugin-gaussian unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-flip@0.10.3@@jimp/plugin-flip unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-rotate@0.10.3@@jimp/plugin-rotate unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/plugin-scale@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-cover@0.10.3@@jimp/plugin-cover unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-scale(0.13.0)
peerDependencies link @jimp/plugin-blit@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-rotate@0.10.3@@jimp/plugin-rotate unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-blit(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-shadow@0.10.3@@jimp/plugin-shadow unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-threshold@0.10.3@@jimp/plugin-threshold unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/plugin-resize@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-rotate@0.10.3@@jimp/plugin-rotate unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-resize(0.13.0)
peerDependencies link @jimp/plugin-crop@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-rotate@0.10.3@@jimp/plugin-rotate unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-crop(0.13.0)
peerDependencies link @jimp/plugin-resize@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-shadow@0.10.3@@jimp/plugin-shadow unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-resize(0.13.0)
peerDependencies link @jimp/plugin-rotate@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-flip@0.10.3@@jimp/plugin-flip unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-rotate(0.13.0)
peerDependencies link @jimp/plugin-color@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-threshold@0.10.3@@jimp/plugin-threshold unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-color(0.13.0)
peerDependencies link @jimp/plugin-blit@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-print@0.10.3@@jimp/plugin-print unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-blit(0.13.0)
peerDependencies link @jimp/custom@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-print@0.10.3@@jimp/plugin-print unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/custom(0.13.0)
peerDependencies link @jimp/plugin-blur@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-shadow@0.10.3@@jimp/plugin-shadow unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-blur(0.13.0)
peerDependencies link @jimp/plugin-resize@0.10.3 in /mnt/d/wxBot-dorm-seller/bot/node_modules/_@jimp_plugin-threshold@0.10.3@@jimp/plugin-threshold unmet with /mnt/d/wxBot-dorm-seller/bot/node_modules/@jimp/plugin-resize(0.13.0)
Recently updated (since 2020-09-09): 2 packages (detail see file /mnt/d/wxBot-dorm-seller/bot/node_modules/.recently_updates.txt)
✔ All packages installed (100 packages installed from npm registry, used 11s(network 10s), speed 69.64kB/s, json 141(709.96kB), tarball 0B)
sz@pc:/mnt/d/wxBot-dorm-seller/bot$ cnpm install
✔ Installed 13 packages
✔ Linked 34 latest versions
✔ Run 0 scripts
✔ All packages installed (29 packages installed from npm registry, used 1s(network 1s), speed 164.08kB/s, json 44(184.59kB), tarball 0B)
sz@pc:/mnt/d/wxBot-dorm-seller/bot$ node app.js

=============== Welcome to wxBot-dorm-seller ===============
------- https://github.com/yiouyou/wxBot-dorm-seller -------

Please wait... I'm trying to login in...

11:21:53 INFO Bot token: puppet_padplus_9de87ed9769b1cc3
11:21:57 INFO PuppetPadplus start()
11:21:58 INFO Bot onLogin: Contact<丁丁> login
11:21:59 INFO Bot app: 已启动
config.perNumMenu: 3
11:22:13 INFO Bot onMessage: []<qq26048067(sz)>{7}'打赏'
11:22:13 INFO Bot onMessage: 打赏 /mnt/d/wxBot-dorm-seller/bot/imgs/pay.png
11:22:14 ERR Bot onMessage: Error: Message.say() received unknown msg: FileBox#File<pay.png>
11:22:14 INFO Bot onMessage: 打赏 -> UrlLink<https://images.shobserver.com/news/690_390/2019/9/4/5b5d2b74-cced-4cbd-8828-75ccc1724a37.jpg>

Appreciate your help!

su-chang commented 3 years ago

"file-box": "^0.12.8"

I think you should not need install this module, please uninstall it and try again.

BTW, if you want to use FileBox, you can import it from wechaty.

yiouyou commented 3 years ago

Wow, it does fix the problem! Thanks!! @su-chang

su-chang commented 3 years ago

Glad to know that, you are welcome.

treeguard commented 3 years ago

@su-chang I also remove the file-box dependency but do you know why it causes the issue. The file-box in wehcaty is different with the external file-box module?

su-chang commented 3 years ago

wechaty should be dependent on the inner FileBox, the FileBox which you import to your project is not same to it, so it's the reason for this issue.