-
-
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
Fix Puppet Memory Multiplex Problem with Multi-Instance Wechaty and Pre-Instanced Puppet #1516
Comments
I had observed that the two Wechaty bot are sharing one puppet, which I believe it should not work. You need two puppet for two Wechaty bot, like this: import { Wechaty } from 'wechaty'
import PuppetPadchat from 'wechaty-puppet-padchat'
const puppet1 = new PuppetPadchat({
token: '1111111'
})
const puppet2 = new PuppetPadchat({
token: '222222'
})
new Wechaty({ profile: 'one', puppet: puppet1 }).start()
new Wechaty({ profile: 'two', puppet: puppet2 }).start() Or let Wechaty instanciate your puppet: import { Wechaty } from 'wechaty'
new Wechaty({
profile: 'one',
puppet: 'wechaty-puppet-padchat',
puppetOptions: { token: '1111111' },
).start()
new Wechaty({
profile: 'two',
puppet: 'wechaty-puppet-padchat',
puppetOptions: { token: '2222222' },
}).start() |
puppet
should only be used for one Wechaty bot
Sorry, my code is like this, but not auto login import { Wechaty } from 'wechaty'
import PuppetPadchat from 'wechaty-puppet-padchat'
const puppet1 = new PuppetPadchat({
token: '1111111'
})
const puppet2 = new PuppetPadchat({
token: '222222'
})
new Wechaty({ profile: 'one', puppet: puppet1 }).start()
new Wechaty({ profile: 'two', puppet: puppet2 }).start() auto login to work, like this: import { Wechaty } from 'wechaty'
new Wechaty({
profile: 'one',
puppet: 'wechaty-puppet-padchat',
puppetOptions: { token: '1111111' },
).start()
new Wechaty({
profile: 'two',
puppet: 'wechaty-puppet-padchat',
puppetOptions: { token: '2222222' },
}).start() |
Thanks for updating. What's the Wechaty version you are using, could you please try the latest version of v0.19.119? |
Thanks, work in v0.19.119 |
puppet
should only be used for one Wechaty bot
Glad to hear that. Can we close this issue for now? |
yes, thnaks |
versions
first
end the process, run again
I think it is related to PuppetPadchat#toString
one.memory-card.json
two.memory-card.json
The text was updated successfully, but these errors were encountered: