Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot send pdf file using MediaMessage #710

Closed
lijiarui opened this issue Aug 7, 2017 · 2 comments
Closed

Cannot send pdf file using MediaMessage #710

lijiarui opened this issue Aug 7, 2017 · 2 comments

Comments

@lijiarui
Copy link
Member

lijiarui commented Aug 7, 2017

Cannot send pdf file, It can send pic successfully but not pdf file.
related to #538
It says pdf file sending 0 data.
get the following sending result:
image

log as follows:

TaskList: #TALK #3 #SUCCEED #interval: 3 #taskLog: broadcast file
21:02:29 SILL Message constructor() SN:6
21:02:29 VERB Room say(5步获得AWS的6万云服务代金券.pdf, )
TALK Task Done
21:02:29 VERB PuppetWebBridge getBaseRequest()
21:02:29 VERB PuppetWebBridge proxyWechaty(getBaseRequest, )
21:02:29 SILL PuppetWebBridge execute()
21:02:29 SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
21:02:29 SILL StateSwitch Browser:target() is open
21:02:29 SILL StateSwitch Browser:current() is open
21:02:29 SILL PuppetWebBridge execute()
21:02:29 SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof  ... ")
21:02:29 SILL StateSwitch Browser:target() is open
21:02:29 SILL StateSwitch Browser:current() is open
21:02:29 VERB PuppetWebBridge getPassticket()
21:02:29 VERB PuppetWebBridge proxyWechaty(getPassticket, )
21:02:29 SILL PuppetWebBridge execute()
21:02:29 SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
21:02:29 SILL StateSwitch Browser:target() is open
21:02:29 SILL StateSwitch Browser:current() is open
21:02:29 SILL PuppetWebBridge execute()
21:02:29 SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof  ... ")
21:02:29 SILL StateSwitch Browser:target() is open
21:02:29 SILL StateSwitch Browser:current() is open
21:02:29 VERB PuppetWebBridge getUploadMediaUrl()
21:02:29 VERB PuppetWebBridge proxyWechaty(getUploadMediaUrl, )
21:02:29 SILL PuppetWebBridge execute()
21:02:29 SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
21:02:29 SILL StateSwitch Browser:target() is open
21:02:29 SILL StateSwitch Browser:current() is open
21:02:29 SILL PuppetWebBridge execute()
21:02:29 SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof  ... ")
21:02:29 SILL StateSwitch Browser:target() is open
21:02:29 SILL StateSwitch Browser:current() is open
21:02:29 VERB PuppetWebBrowserCookie read()
21:02:29 SILL PuppetWebBrowserCookie read() webwx_data_ticket,MM_WX_SOUND_STATE,webwx_auth_ticket,MM_WX_NOTIFY_STATE,mm_lang,wxloadtime,wxpluginkey,pgv_si,wxsid,wxuin,webwxuvid,pgv_pvi
21:02:29 VERB PuppetWebBrowser hostname()
21:02:29 SILL PuppetWebBrowser Browser.execute("return document.domain")
21:02:29 SILL StateSwitch Browser:target() is open
21:02:29 SILL StateSwitch Browser:current() is open
21:02:29 SILL PuppetWebBrowser hostname() got qq.com
21:02:29 VERB PuppetWeb self()
21:02:31 SILL PuppetWebEvent onServerDing(heartbeat@browser)
21:02:31 SILL PuppetWebWatchdog onFeed: 60000, HEARTBEAT[heartbeat@browser]
21:02:31 SILL StateSwitch Puppet:target() is live
21:02:31 SILL StateSwitch Puppet:inprocess() is false
21:02:31 SILL PuppetWebWatchdog clearWatchDogTimer() [45] seconds left
21:02:31 SILL PuppetWebWatchdog setWatchDogTimer(60000, HEARTBEAT:[heartbeat@browser])
21:02:31 SILL PuppetWebWatchdog monitorScan(HEARTBEAT)
21:02:31 SILL PuppetWebWatchdog autoSaveSession()
21:02:31 SILL PuppetWebWatchdog memoryCheck() free: 29 MB, require: 4 MB
21:02:31 SILL PuppetWeb send() destination: @@688884a466d382ba5040e2c0bfbe7fa327ac813f4edb6169b2620431f8a385ee, mediaId: @crypt_351c728f_7f1c3d10846338c49d6439fbd8905cd9e6f2b2af3b04e4e4d5ab428c45bdc809ee7c083f0c5581866c6160b38618077469013b833539b6fb6df8342bf10281537534ec64a4e84e630902eb0702007606)
21:02:31 VERB PuppetWebBridge proxyWechaty(sendMedia, @@688884a466d382ba5040e2c0bfbe7fa327ac813f4edb6169b2620431f8a385ee, @crypt_351c728f_7f1c3d10846338c49d6439fbd8905cd9e6f2b2af3b04e4e4d5ab428c45bdc809ee7c083f0c5581866c6160b38618077469013b833539b6fb6df8342bf10281537534ec64a4e84e630902eb0702007606, 49)
21:02:31 SILL PuppetWebBridge execute()
21:02:31 SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
21:02:31 SILL StateSwitch Browser:target() is open
21:02:31 SILL StateSwitch Browser:current() is open
21:02:31 SILL PuppetWebBridge execute()
21:02:31 SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof  ... ")
21:02:31 SILL StateSwitch Browser:target() is open
21:02:31 SILL StateSwitch Browser:current() is open
@lijiarui
Copy link
Member Author

lijiarui commented Aug 7, 2017

Donate for this issue $20 here :
https://www.bountysource.com/issues/48000926-cannot-send-pdf-file-using-mediamessage

Anyone who solve this problem will get the donation.

@binsee
Copy link
Member

binsee commented Aug 8, 2017

已解决,发图占坑,稍后pr
image

binsee pushed a commit to binsee/wechaty that referenced this issue Aug 8, 2017
Fix can't send pdf and more type file.
Now, you can use `m.say(new MediaMessage(file))` send any type file.

Fix wechaty#710
@huan huan closed this as completed in #714 Aug 10, 2017
huan pushed a commit that referenced this issue Aug 10, 2017
* fix(puppet-web): send any type file.

Fix can't send pdf and more type file.
Now, you can use `m.say(new MediaMessage(file))` send any type file.

Fix #710

* fix(puppet-web): Delete unused comments

* fix(puppet-web): add interface MediaData

* fix(puppet-web): formData.id Allocation error

* fix(wechaty-bro): remove trailing comma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants