-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
remark(null) doesn't work #130
Comments
Good catch. Just had a commit for it, please let me know if it fixed this bug, thanks! |
@zixia js error is fixed, but remark is not truly cleared. my code is:
output is:
the user's remark does not be cleared. |
const ret = await contact.remark(null)
if (ret) {
console.log('ok!')
} else {
console.error('fail!')
}
Thanks. |
well.... I tried again, exception disappear... silly log as follows: SILL Contact remark()
VERB PuppetWebBridge proxyWechaty(contactRemarkAsync, @c379eff781a7d1f8ed7eb8fbb12bbd78, )
SILL PuppetWebBridge execute()
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL StateMonitor Browser:target() - open
SILL StateMonitor Browser:current() - open
SILL PuppetWebBrowser Browser.executeAsync( const callback = arguments[arguments.length - 1]
const isAsync = (typeof )
SILL StateMonitor Browser:target() - open
SILL StateMonitor Browser:current() - open
WARN PuppetWebBrowser executeAsync() exception: javascript error: Cannot read property 'replace' of null
JavaScript stack:
TypeError: Cannot read p
WARN PuppetWebBridge executeAsync() exception: javascript error: Cannot read property 'replace' of null
JavaScript stack:
TypeError: Cannot read property 'replace' of null
at Object.formatHTMLToSend (https://res.wx.qq.com/zh_CN/htmledition/v2/js/webwxApp31e225.js:4:6941)
at contactRemarkAsync (<anonymous>:829:34)
at eval (eval at executeAsyncScript (:329:5), <anonymous>:6:16)
at eval (eval at executeAsyncScript (:329:5), <anonymous>:11:8)
at executeAsyncScript (<anonymous>:329:26)
at <anonymous>:345:29
at callFunction (<anonymous>:237:33)
at <anonymous>:247:23
at <anonymous>:248:3
(Session info: chrome=54.0.2840.98)
(Driver info: chromedriver=2.25.426935 (820a95b0b81d33e42712f9198c215f703412e1a1),platform=Mac OS X 10.10.5 x86_64)
VERB PuppetWebBridge proxyWechaty(contactRemarkAsync, @c379eff781a7d1f8ed7eb8fbb12bbd78, )
WARN PuppetWebBridge proxyWechaty() exception: javascript error: Cannot read property 'replace' of null
JavaScript stack:
TypeError: Cannot read property 'replace' of null
at Object.formatHTMLToSend (https://res.wx.qq.com/zh_CN/htmledition/v2/js/webwxApp31e225.js:4:6941)
at contactRemarkAsync (<anonymous>:829:34)
at eval (eval at executeAsyncScript (:329:5), <anonymous>:6:16)
at eval (eval at executeAsyncScript (:329:5), <anonymous>:11:8)
at executeAsyncScript (<anonymous>:329:26)
at <anonymous>:345:29
at callFunction (<anonymous>:237:33)
at <anonymous>:247:23
at <anonymous>:248:3
(Session info: chrome=54.0.2840.98)
(Driver info: chromedriver=2.25.426935 (820a95b0b81d33e42712f9198c215f703412e1a1),platform=Mac OS X 10.10.5 x86_64)
ERR PuppetWebBridge contactRemarkAsync() exception: javascript error: Cannot read property 'replace' of null
JavaScript stack:
TypeError: Cannot read property 'replace' of null
at Object.formatHTMLToSend (https://res.wx.qq.com/zh_CN/htmledition/v2/js/webwxApp31e225.js:4:6941)
at contactRemarkAsync (<anonymous>:829:34)
at eval (eval at executeAsyncScript (:329:5), <anonymous>:6:16)
at eval (eval at executeAsyncScript (:329:5), <anonymous>:11:8)
at executeAsyncScript (<anonymous>:329:26)
at <anonymous>:345:29
at callFunction (<anonymous>:237:33)
at <anonymous>:247:23
at <anonymous>:248:3
(Session info: chrome=54.0.2840.98)
(Driver info: chromedriver=2.25.426935 (820a95b0b81d33e42712f9198c215f703412e1a1),platform=Mac OS X 10.10.5 x86_64)
WARN PuppetWeb contactRemark(@c379eff781a7d1f8ed7eb8fbb12bbd78, null) rejected: javascript error: Cannot read property 'replace' of null
JavaScript stack:
TypeError: Cannot read property 'replace' of null
at Object.formatHTMLToSend (https://res.wx.qq.com/zh_CN/htmledition/v2/js/webwxApp31e225.js:4:6941)
at contactRemarkAsync (<anonymous>:829:34)
at eval (eval at executeAsyncScript (:329:5), <anonymous>:6:16)
at eval (eval at executeAsyncScript (:329:5), <anonymous>:11:8)
at executeAsyncScript (<anonymous>:329:26)
at <anonymous>:345:29
at callFunction (<anonymous>:237:33)
at <anonymous>:247:23
at <anonymous>:248:3
(Session info: chrome=54.0.2840.98)
(Driver info: chromedriver=2.25.426935 (820a95b0b81d33e42712f9198c215f703412e1a1),platform=Mac OS X 10.10.5 x86_64)
ERR Contact remark(null) rejected: javascript error: Cannot read property 'replace' of null
JavaScript stack:
TypeError: Cannot read property 'replace' of null
at Object.formatHTMLToSend (https://res.wx.qq.com/zh_CN/htmledition/v2/js/webwxApp31e225.js:4:6941)
at contactRemarkAsync (<anonymous>:829:34)
at eval (eval at executeAsyncScript (:329:5), <anonymous>:6:16)
at eval (eval at executeAsyncScript (:329:5), <anonymous>:11:8)
at executeAsyncScript (<anonymous>:329:26)
at <anonymous>:345:29
at callFunction (<anonymous>:237:33)
at <anonymous>:247:23
at <anonymous>:248:3
(Session info: chrome=54.0.2840.98)
(Driver info: chromedriver=2.25.426935 (820a95b0b81d33e42712f9198c215f703412e1a1),platform=Mac OS X 10.10.5 x86_64)
fail > wechaty@0.6.52 doctor /Users/lijiarui/Documents/git/wechaty
> ts-node bin/doctor
#### Wechaty Doctor
1. Wechaty version: #git[4543b8f 0.6.52]
2. Darwin x64 version 14.5.0 memory 543/16384 MB
3. Docker: false
4. Node version: v7.0.0 |
@lijiarui Can you tell me how could wechaty/src/puppet-web/wechaty-bro.js Line 572 in 133a6f8
|
@zixia I have try to use code:
log:
|
Hi @zfben , sorry for the confusing result, I had found the problem finally. Your code indeed works, the remark should already be cleared if you check on your phone. The browser & Wechaty still got the old remark value is because my code forgot to refresh some values in the browser, and when you called Should be fixed in my last commit, I had tested with your code without any problem. Please let me know if it works for you, thanks. |
it works! thx a lot 👍 |
Run
¡
orwechaty run doctor
(for docker user), paste output hereExpected behavior
contact.remark(null)
to clear remark.Actual behavior
Steps to reproduce the behavior (and fixes, if any)
Paste the full output logs here with
WECHATY_LOG=silly
setThe text was updated successfully, but these errors were encountered: