wechaty / wechaty-puppet-padplus

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

发送图片模块 报错 InvalidAccessKeyId #288

Closed IvanEvan closed 4 years ago

IvanEvan commented 4 years ago

1. Versions

What is your wechaty version?

wechaty@0.38.4

Which puppet are you using for wechaty? (hostie/puppeteer/padchat/...)

padplus

What is your wechaty-puppet-XXX(padchat/puppeteer/) version?

wechaty-puppet-padplus@0.6.3

What is your node version? (run node --version)

12.16.3

What os are you using

windows & linux

2. Describe the bug

在初次使用 FileBox.fromFile 时报错 InvalidAccessKeyId

3. To Reproduce

This part is very important: if you can not provide any reproduce steps, then the problem will be very hard to be recognized.

Steps to reproduce the behavior:

  1. 按照文档示例 添加如下代码
  2. const { FileBox } = require("wechaty")
  3. const fileBox = FileBox.fromFile(E:\\code\\trash\\pyplot-table-demo.png)
  4. await msg.say(fileBox)
  5. 保存后 node bot.js 运行

4. Expected behavior

成功发出图片

5. Actual behavior

报错 InvalidAccessKeyId 且未发出

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!

(node:16580) UnhandledPromiseRejectionWarning: InvalidAccessKeyId: The AWS Access Key Id you provided does not exist in our records. at Request.extractError (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\services\s3.js:831:35) at Request.callListeners (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\sequential_executor.js:106:20) at Request.emit (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\sequential_executor.js:78:10) at Request.emit (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\request.js:683:14) at Request.transition (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\request.js:22:10) at AcceptorStateMachine.runTo (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\state_machine.js:14:12) at E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\state_machine.js:26:10 at Request. (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\request.js:38:9) at Request. (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\request.js:685:12) at Request.callListeners (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\sequential_executor.js:116:18) at Request.emit (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\sequential_executor.js:78:10) at Request.emit (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\request.js:683:14) at Request.transition (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\request.js:22:10) at AcceptorStateMachine.runTo (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\state_machine.js:14:12) at E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\state_machine.js:26:10 at Request. (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\request.js:38:9) at Request. (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\request.js:685:12) at Request.callListeners (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\sequential_executor.js:116:18) at callNextListener (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\sequential_executor.js:96:12) at IncomingMessage.onEnd (E:\wechaty-Robot-master\wechaty-Robot-master\my-bot\node_modules\aws-sdk\lib\event_listeners.js:307:13) at IncomingMessage.emit (events.js:322:22) at IncomingMessage.EventEmitter.emit (domain.js:482:12) at endReadableNT (_stream_readable.js:1187:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) (node:16580) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:16580) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ```shell $ WECHATY_LOG=silly node yourbot.js -> PASTE YOUR FULL(DO NOT ONLY PROVIDE FRAGMENTS) LOG MESSAGES HERE ```
su-chang commented 4 years ago

Please upgrade wecahty-puppet-padplus@0.7.34, it could help you resolve this problem.

IvanEvan commented 4 years ago

It worked !!! Thx !!!