-
Notifications
You must be signed in to change notification settings - Fork 73
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
fix request error when image sending too fast #185
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the tests/puppeteer-attachment.spec.ts
file permission to be 100755
so that it can be executed directly under Linux.
If an In order to catch it, we can use: wechaty.on('error', e => {
console.error(e)
}) to catch it. Please let me know if you have more questions, thank you very much. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please feel free to help yourself to merge this PR when you believe everything is OK with it, thank you very much!
Thanks, I will. |
Finally I figured out where
wx2.qq.comundefined
come from:puppet-wechat/src/wechaty-bro.js
Lines 332 to 347 in 035e904
https://github.com/wechaty/webwx-app-tracker/blob/a12c78fb8bd7186c0f3bb0e18dd611151e6b8aac/formatted/webwxApp.js#L2100-L2106
some
getMsgImg
call returnedundefined
andFileBox
requested the url.If I send images one by one and save them, everything is fine, if I sending images too fast, an error will be occurred and crash the process when exception be passed to wechaty.
It should be fixed in #183, but I made a mistake, I thought
$watch
will works like Vue watch API, but it's not, the watch handler will be called immediately in first time even thoughMMStatus
doesn't change.#183 should always fail in my manual tests, but it does work, and it should not happen in #184 tests(I think the error cause by the default value of
MMStatus
change to 'SENDING' in #183), which is weird.Other Enhancements
file.mediaType
to ensure that user behavior is not overwrittenpuppet-wechat/src/puppet-wechat.ts
Line 1245 in 035e904