Closed JesseWeb closed 4 years ago
The wechaty.start()
should return a Promise
which will be resolved after it initialized all the tasks for starting.
If it not resolved at all, then it should be treated as a BUG.
I guess it might be related to https://github.com/wechaty/wechaty-puppet-padplus/issues/189
Sorry, this problem will be fixed when the padplus server update tonight.
one question.
are these lifecycles(down below) consistent?
if is not then what's the different between these two.
bot.start().then(()=>{
//context
})
bot.on("login",()=>{
//context
})
bot.on(event, callback)
listener on event
bot.start()
start the bot
bot.on(event, callback)
listener on event
bot.start()
start the bot
is start method resolved after it initialized contains first login
event?
No, there's no guarantee of any order to be consistent.
It is heavily depends on the puppet implementation.
@JesseWeb The server has already updated, please check this issue again, if there's no problem about it, please close it. Thank you very much.
@su-chang Aye-Aye, Captain!
1. Versions
What is your wechaty version? Answer: ^0.38.4
Which puppet are you using for wechaty? (padchat/puppeteer/padpro/...) Answer:padplus
What is your wechaty-puppet-XXX(padchat/puppeteer/) version? Answer:^0.6.1
What is your node version? (run
node --version
) Answer:10.15.3What os are you using Answer:macOS Catalina 10.15.4
2. Describe the bug and reproduce
wechaty instance method
start
got blocked!3. To Reproduce
4. Expected behavior
terminal will print
bot just get online
5. Actual behavior
none of has been printed.
6. Additional context
in fact. the process are stuck at
await wechaty.start()
but in the documentation. it says
i am confused!!! am i doing the wrong way?
[bug]