cannot send images / this.puppet.getBaseRequest is not a function
Created by: dcsan
related to sending images PR #337
npm run doctor
or wechaty run doctor
(for docker user), paste output here
Run > wechaty@0.7.51 doctor /Users/dc/dev/xx/wechaty
> npm run check-node-version && ts-node bin/doctor
> wechaty@0.7.51 check-node-version /Users/dc/dev/xx/wechaty
> check-node-version --node ">= 6.9"
node: 6.9.3
npm: 3.10.10
yarn: 0.21.3
#### Wechaty Doctor
1. Wechaty version: #git[1bb2b9f Merge branch 'Chatie-master']
2. Darwin x64 version 16.3.0 memory 416/8192 MB
3. Docker: false
4. Node version: v6.9.3
5. Tcp IPC TEST: PASS
Expected behavior
should be able to run the ding-img-bot
example and send images
Actual behavior
fails with this.puppet.getBaseRequest is not a function
Steps to reproduce the behavior (and fixes, if any)
I tested out this PR using:
git fetch origin pull/337/head
git checkout -b send-image-pr FETCH_HEAD
for some reason I first need to npm run dist
as ts-node xx
doesn't seem to rebuild all wechaty code?
anyway so then created a new task to run ts-node from an npm script
"demo-image": "ts-node example/ding-img-bot.ts",
and got the error below. TypeError: this.puppet.getBaseRequest is not a function
I also tried the plain text ding bot to check if there is a problem with the Puppet, or chromedriver, but that example runs fine.
Separately also just to check the puppet is instantiated
I logged it before the call and this.puppet
logs as
puppet Class PuppetWeb({browser:Browser({head:chrome),port:19671})
WECHATY_LOG=silly
set
Paste the full output logs here with [bot test dc]<DC>:{TEXT}dc-alias:Ding
23:35:53 INFO Bot REPLY: img
TypeError: this.puppet.getBaseRequest is not a function
at Wechaty.<anonymous> (/Users/dc/dev/xx/wechaty/src/wechaty.ts:458:41)
at next (native)
at fulfilled (/Users/dc/dev/xx/wechaty/dist/src/wechaty.js:4:58)
at process._tickDomainCallback (internal/process/next_tick.js:129:7)