GithubHelp home page GithubHelp logo

wechaty / friday Goto Github PK

View Code? Open in Web Editor NEW
81.0 102.0 19.0 989 KB

Friday is an Assistant BOT Built on Wechaty for Serving our Community

Home Page: http://friday.chatie.io:5200

License: Apache License 2.0

JavaScript 5.57% TypeScript 93.69% Shell 0.53% Dockerfile 0.13% Procfile 0.07%
bot5 wechaty assistant chatbot

friday's Introduction

Wechaty Join Wechaty Discord Developer Community NPM Version NPM Docker

Wechaty

Downloads GitHub stars Docker Pulls ES Modules

TypeScript JavaScript Python Go Java .NET PHP Rust Scala

WeChat Whatsapp

Elevator Pitch

Wechaty is a conversational RPA SDK that simplifies the process of building chatbots. It's like a Swiss Army knife for chatbot development, providing a universal interface to various messaging platforms such as WhatsApp, WeChat, and more. With Wechaty, you write your bot code once, and it runs on any of the supported platforms. This means you can focus on creating engaging conversational experiences without worrying about the underlying complexities of each platform's API. It's open-source, easy to use, and backed by a vibrant community that's ready to help you bring your chatbot ideas to life.

Connecting Chatbots

Wechaty is an RPA (Robotic Process Automation) SDK for Chatbot Makers which can help you create a bot in 6 lines of JavaScript, Python, Go, and Java, with cross-platform support including Linux, Windows, MacOS, and Docker.

🕸️ https://wechaty.js.org
:octocat: https://github.com/Wechaty/wechaty
🪲 https://github.com/Wechaty/wechaty/issues
📖 https://github.com/Wechaty/wechaty-getting-started
🐳 https://hub.docker.com/r/wechaty/wechaty

Breaking News

Voice of Developers

"Wechaty is a great solution; I believe there would be much more users who recognize it." link
— @Gcaufy, Tencent Engineer, Author of WePY

"太好用,好用的想哭"
— @xinbenlv, Google Engineer, Founder of HaoShiYou.org

”好用到哭“——你们对得起这个评价! link
@bigbrother666sh, creator of《社长不见了》剧本杀 NPC DM

"最好的微信开发库" link
— @Jarvis, Baidu Engineer

"Wechaty让运营人员更多的时间思考如何进行活动策划、留存用户,商业变现" link
— @lijiarui, Founder & CEO of Juzi.BOT.

"If you know js ... try Wechaty. It's easy to use."
— @Urinx Uri Lee, Author of WeixinBot(Python)

"Wechaty is a good project; I hope it can continue! Therefore, I became a contributor in open collective."
@Simple

See more at Wiki:Voice Of Developer

Join Us on Discord

Join Wechaty Discord Developer Community Wechaty Discord

Wechaty is used in many ChatBot projects by thousands of developers. To talk with other developers, scan the QR Code below and join our Wechaty Developer Community.

Wechaty Discord Community QR Code

Scan now because other Wechaty developers want to talk with you, too!

Resource

Wechaty has already held lots of talks and got a lot of blogs in the past years; here are all of the wechaty resources:

🚀 The World's Shortest ChatBot Code: 6 lines of JavaScript

import { WechatyBuilder } from 'wechaty'

const wechaty = WechatyBuilder.build() // get a Wechaty instance
wechaty
  .on('scan', (qrcode, status) => console.log(`Scan QR Code to login: ${status}\nhttps://wechaty.js.org/qrcode/${encodeURIComponent(qrcode)}`))
  .on('login',            user => console.log(`User ${user} logged in`))
  .on('message',       message => console.log(`Message: ${message}`))
wechaty.start()

Notice: Wechaty requires Node.js version >= 16

This bot can log all messages to the console after login by the scan.

You can find Wechaty's Official Examples at examples/ding-dong-bot.ts and more from our Example Directory.

🏁 Requirements

  1. Node.js version 16+
  2. NPM version 7+
  3. TypeScript version 4.4+

Getting Started

node

We have a Wechaty starter repository for beginners with the simplest setting. It will be work out-of-the-box after you clone & npm install & npm start.

If you are new to Wechaty and want to try it the first time, we'd like to strong recommend you starting from this repository, and using it as your starter template for your project.

Otherwise, please saved the above The World's Shortest ChatBot Code: 6 lines of JavaScript example to a file named bot.js before you can use either NPM or Docker to run it.

1. Npm

NPM Version npm (tag)

Downloads install size

npm init
npm install wechaty

# create your first bot.js file, you can copy/paste from the above "The World's Shortest ChatBot Code: 6 lines of JavaScript"
# then:
node bot.js

2. Docker

Docker Pulls Docker Layers

Wechaty Docker supports both JavaScript and TypeScript. To use TypeScript just write in TypeScript and save with extension name .ts, no need to compile because we use ts-node to run it.

2.1. Run JavaScript

# for JavaScript
docker run -ti --rm --volume="$(pwd)":/bot wechaty/wechaty bot.js

2.2. Run TypeScript

# for TypeScript
docker run -ti --rm --volume="$(pwd)":/bot wechaty/wechaty bot.ts

Learn more about Wechaty Docker at Wiki:Docker.

3. Switch Protocol(Puppet)

Wechaty is very powerful that it can run over different protocols. You can specify the protocol by set the environment variable WECHATY_PUPPET to different puppet provider.

If you cannot use Web protocol, you can apply other protocal following the instruction here: https://github.com/wechaty/wechaty/wiki/Support-Developers We provide free token to support developers build a valuable WeChat chatbot.

Currently we support the following puppet providers :

Protocol Puppet Provider Environment Variable
Web PuppetPuppeteer export WECHATY_PUPPET=wechaty-puppet-puppeteer
Windows PuppetWorkPro export WECHATY_PUPPET=wechaty-puppet-service
Mock PuppetMock export WECHATY_PUPPET=wechaty-puppet-mock
Web PuppetWechat4u export WECHATY_PUPPET=wechaty-puppet-wechat4u
iPad PuppetRock export WECHATY_PUPPET=wechaty-puppet-service
iPad PuppetPadLocal export WECHATY_PUPPET=wechaty-puppet-service
Windows PuppetDonut export WECHATY_PUPPET=wechaty-puppet-service
iPad PuppetPadpro DEPRECATED export WECHATY_PUPPET=wechaty-puppet-padpro
iPad PuppetPadchat DEPRECATED export WECHATY_PUPPET=wechaty-puppet-padchat
iPad PuppetPadplus DEPRECATED export WECHATY_PUPPET=wechaty-puppet-padplus
Mac PuppetMacpro DEPRECATED export WECHATY_PUPPET=wechaty-puppet-macpro
Windows PuppetWxwork DEPRECATED export WECHATY_PUPPET=wechaty-puppet-service

Learn more about Wechaty Puppet from the Puppet Wiki:

  1. Puppet Directory: https://github.com/Wechaty/wechaty-puppet/wiki/Directory
  2. Puppet Compatibility: https://github.com/Wechaty/wechaty-puppet/wiki/Compatibility

🎸 API

Read the Full Documentation at Wechaty Official API Reference

1 Class Wechaty

Main bot class.

A Bot is a Wechaty instance that control a specific wechaty-puppet.

Wechaty API Description
event login emit after bot login full successful
event logout emit after the bot log out
event friendship emit when someone sends bot a friend request
event message emit when there's a new message
event room-join emit when anyone join any room
event room-topic emit when someone change room topic
event room-leave emit when anyone leave the room
event room-invite emit when there is a room invitation
event scan emit when the bot needs to show you a QR Code for scanning
method start(): Promise<void> start the bot
method stop(): Promise<void> stop the bot
method logonoff(): boolean bot login status
method logout(): Promise<void> logout the bot
method currentUser(): ContactSelf get the login-ed bot contact
method say(text: string): Promise<void> let bot say text to itself

2 Class Contact

All wechat contacts(friends/non-friends) will be encapsulated as a Contact.

Contact API Description
static find(query: string): Promise<null | Contact> find contact by name or alias, if the result more than one, return the first one.
static findAll(query: string): Promise<Contact[]> find contact by name or alias
static load(query: string): Contact get contact by id
property id: readonly string get contact id
method sync(): Promise<void> force reload data for contact , sync data from lowlevel API again
method say(text: string): Promise<void | Message> send text, Contact, or file to contact, return the message which the bot sent (only puppet-padplus supported).
method self(): boolean check if contact is self
method name(): string get the name from a contact
method alias(): Promise<string> get the alias for a contact
method alias(newAlias: string): Promise<void> set or delete the alias for a contact
method friend(): boolean check if contact is friend
method type(): ContactType return the type of the Contact
method province(): string get the region 'province' from a contact
method city(): string get the region 'city' from a contact
method avatar(): Promise<FileBox> get avatar picture file stream
method gender(): ContactGender get gender from a contact

2.1 Class ContactSelf

Class ContactSelf is extended from Contact.

ContactSelf API Description
method avatar(file: FileBox): Promise<void> set avatar for bot
method qrcode(): Promise<string> get qrcode for bot
method signature(text: string): Promise<void> set signature for bot

2.2 Class Friendship

Send, receive friend request, and friend confirmation events.

Friendship API Description
static add(contact: Contact, hello?: string): Promise<void> send a friend invitation to contact
method accept(): Promise<void> accept Friend Request
method hello(): string get the hello string from a friendship invitation
method contact(): Contact get the contact from friendship
method type(): FriendshipType return the Friendship Type(unknown, confirm, receive, verify)

3 Class Message

All wechat messages will be encapsulated as a Message.

Message API Description
static find(query: string): Promise<null | Message> find message in cache and return the first one
static findAll(query: string): Promise<Message[]> find messages in cache, return a message list
method from(): Contact get the sender from a message
method to(): Contact get the destination of the message
method room(): null | Room get the room from the message.(If the message is not in a room, then will return null)
method text(): string get the text content of the message
method say(text: string): Promise<void | Message> reply a Text, Media File , or contact message to the sender, return the message which the bot sent (only puppet-padplus supported).
method type(): MessageType get the type from the message
method self(): boolean check if a message is sent by self
method mention(): Contact[] get message mentioned contactList.
method mentionSelf(): boolean check if a message is mention self
method forward(to: Contact): Promise<void> Forward the received message
method age(): number the number of seconds since it has been created
method date(): Date the time it was created
method toFileBox(): Promise<FileBox> extract the Media File from the Message, and put it into the FileBox.
method toContact(): Promise<Contact> get Share Card of the Message

4 Class Room

All wechat rooms(groups) will be encapsulated as a Room.

Room API Description
static create(contactList: Contact[], topic?: string): Promise<Room> create a new room
static find(query: string): Promise<null | Room> Try to find a room by filter. If get many, return the first one.
static findAll(query: string): Promise<Room[]> Find all contacts in a room
static load(query: string): Room load room by room id
property id: readonly string
event join emit when anyone join any room
event topic emit when someone change room topic
event leave emit when anyone leave the room
event invite emit when receive a room invitation
method sync(): <Promise<void> force reload data for room, sync data from lowlevel API again.
method say(text: string): Promise<void | Message> Send text,media file, contact card, or text with mention @mention contact inside Room, return the message which the bot sent (only puppet-padplus supported).
method add(contact: Contact): Promise<void> Add contact in a room
method del(contact: Contact): Promise<void> Delete a contact from the room
method quit(): Promise<void> Bot quit the room itself
method topic(): Promise<string> GET topic from the room
method topic(newTopic: string): Promise<void> SET topic from the room
method announce(text: string): Promise<void> SET/GET announce from the room
method qrcode(): Promise<string> Get QR Code of the Room from the room, which can be used as scan and join the room.
method alias(contact: Contact): Promise<string> Return contact's roomAlias in the room
method roomAlias(contact: Contact): Promise<string | null> Same as function alias
method has(contact: Contact): Promise<boolean> Check if the room has member contact
method memberAll(query?: string): Promise<Contact[]> Find all contacts or with specific name in a room
method member(query: string): Promise<null | Contact> Find all contacts in a room, if get many, return the first one.
method memberList():Promise<Contact[]> get all room member from the room
method owner(): null | Contact Get room's owner from the room.

4.1 Class RoomInvitation

Accept room invitation

RoomInvitation API Description
method accept(): Promise<void> accept Room Invitation
method inviter(): Contact get the inviter from room invitation
method roomTopic(): Promise<string> get the room topic from room invitation
method date(): Promise<Date> the time it was created
method age(): Promise<number> the number of seconds since it has been created

TEST

NPM Docker Coverage Status

Known Vulnerabilities

Wechaty is fully automatically tested by unit and integration tests, with Continious Integration & Continious Deliver(CI/CD) support powered by CI like Travis, Shippable and Appveyor.

To test Wechaty, run:

npm test

Get to know more about the tests from Wiki:Tests

CREATING WECHATY PLUGIN

Creating and publishing a Wechaty Plugin is simple. Simply expose your module as a function that takes 1 parameter: wechaty. When your plugin is imported by Wechaty, it will pass itself in as the argument, and so you are free to add any configuration that Wechaty supports.

import { WechatyPlugin } from 'wechaty'

export default const MyPlugin: WechatyPlugin = (wechaty: Wechaty) => {
  // ...
}

The config exist so the user can pass in customizations to your Plugin. In documenting your Wechaty Plugin, you would lay out your supported config for the user.

See:

  1. Wechaty Plugin Support with KickOut Example #1939
  2. Wechaty Plugins Contrib

📝 RELEASE NOTES

🎷 Views Since Feb 15, 2019

HitCount

💖 POWERED BY WECHATY

Powered by Wechaty

✨ Wechaty Badge

[![Powered by Wechaty](https://img.shields.io/badge/Powered%20By-Wechaty-brightgreen.svg)](https://wechaty.js.org)

Get more embed html/markdown code from Wiki:Badge

🌟 Projects Using Wechaty

  1. 一个用CNN深度神经网络给图片评分的wechaty项目
  2. Relay between Telegram and WeChat
  3. A chat bot managing the HaoShiYou wechat groups run by volunteers of haoshiyou.org
  4. An interactive chat bot to manage a TODO list
  5. Forward WeChat messages to telegram
  6. koa与wechaty实现的微信小助手,可定时提醒与发消息设定定时任务
  7. Wechaty Pay - 让线上没有难做的生意
  8. 开源社的微信机器人项目

Pull Request is welcome to add yours!

Learn more about Projects Using Wechaty at Wiki:Projects Using Wechaty

😇 Find a Good Server

The best practice for running Wechaty Docker/NPM is using a VPS(Virtual Private Server) outside of China, which can save you hours of time because npm install and docker pull will run smoothly without any problem.

The following VPS providers are used by the Wechaty team, and they worked perfectly in production. You can use the following link to get one in minutes. Also, doing this can support Wechaty because you are referred by us.

Location Price Ram Payment Provider
Singapore $5 512MB Paypal DigitalOcean
Japan $5 1GB Paypal Linode
Korea $10 1GB Alipay, Paypal Netdedi
Singapore $3.5 512MB Alipay, Wechat Vultr

🎶 See Also

💩 The Story

In 2017 ...

Huan's daily life/work depends on too much chat on wechat.

  • Almost 14,000 wechat friends in May 2014, before wechat restricts a total number of friends to 5,000.
  • Almost 400 wechat rooms, and most of them have more than 400 members.

Can you imagine that? He was dying...

So a tireless bot working for me 24x7 on wechat, monitoring/filtering the most important message is badly needed. For example, it highlights discussion which contains the KEYWORDS which he want to follow up(especially in a noisy room). ;-)

At last, It's built for huan's personal study purpose of Automatically Testing.

Stargazers over time

Stargazers over time

💕 Contributors

GitHub issues GitHub pull requests Open Collective Backers Open Collective Sponsors

contributor contributor contributor contributor contributor contributor contributor contributor

This project exists thanks to all the people who contribute. [Contribute].


Contribute

😎 Backers

Backers on Open Collective

Thank you to all our backers! 🙏 [Become a backer]

Open Collective Wechaty

😏 Sponsors

Sponsors on Open Collective

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Wechaty Sponsor

Multi-language Wechaty

Python Wechaty Go Wechaty Java(Kotlin) Wechaty Scala Wechaty PHP Wechaty .NET(C#) Wechatyin

History

main v1.11 (Nov 22, 2021)

Working on reduxify the Wechaty ecosystem for applying the CQRS pattern.

v1.10 (Nov 21, 2021)

Second beta release of Wechaty, with all ecosystem npm modules with version v1.10 (wechaty-puppet, wechaty-puppet-service, etc)

v1.0 (Sep 2021)

  • Release v1.0 of Wechaty is the first beta release of Wechaty.

v0.69

  1. v0.69: Supports ES Modules (with CJS dual support) (#2232)

v0.68 (Aug 27, 2021)

  1. TLS support (#2231)
  2. The latest CommonJS version

Creators

  1. Huan (LinkedIn), 🐧 Tencent TVP of Chatbot・🤖 Chatie Architect・⭐️ GitHub Star・🚀 YC W19・🌐 Microsoft RD & AI MVP・🦾 Google ML GDE ・🤠 Serial Entrepreneur・🔥 Burner
  2. Rui (李佳芮), Microsoft AI MVP & RD, Co-founder & CEO of Juzi.BOT (YC W19 Alumni)

Profile of Huan Li on StackOverflow

Cite Wechaty

To cite this project in publications:

@misc{Wechaty,
  author = {Huan Li, Rui Li},
  title = {Wechaty: Conversational SDK for Chatbot Makers},
  year = {2016},
  publisher = {GitHub},
  journal = {GitHub Repository},
  howpublished = {\url{https://github.com/wechaty/wechaty}},
}

Copyright & License

  • Code & Docs © 2016-now Huan, Rui, and Wechaty Community Contributors
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons

friday's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar greenkeeper[bot] avatar huan avatar lijiarui avatar qhduan avatar snyk-bot avatar windmemory avatar wj-mcat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

friday's Issues

Error: 13 INTERNAL: Cannot read property 'getRoomIds' of undefined

22:26:28 VERB Wechaty on(message, listener) registering... listenerCount: 2
22:26:28 VERB Room findAll({"topic":{}})
22:26:28 VERB Puppet roomSearch({"topic":{}})
22:26:28 VERB PuppetService roomList()
22:26:28 VERB StateSwitch <Wechaty> ready(off, noCross=false)
22:26:28 VERB StateSwitch <Wechaty> ready(off, noCross=false)
22:26:28 VERB Room findAll() rejected: 13 INTERNAL: Cannot read property 'getRoomIds' of undefined
Error: 13 INTERNAL: Cannot read property 'getRoomIds' of undefined
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:179:52)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:145:78
    at processTicksAndRejections (internal/process/task_queues.js:77:11) {
  code: 13,
  details: "Cannot read property 'getRoomIds' of undefined",
  metadata: Metadata {
    internalRepr: Map(1) { 'authorization' => [Array] },
    options: {}
  }
}
Error: friday.Room return 0 members
    at countRoomMembers (file:///home/friday/git/friday/dist/src/status-page/count-room-members.js:15:15)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
metrics { mo: 0, mt: 0 }

Related code

const topic = /Wechaty|BOT5/i
const roomList = await bots.friday.Room.findAll({ topic })

Error when reconnect to a existing Puppet Server

Wechaty Version

Puppet Service (client)

12:54:00 VERB PuppetLoginMixin login(wxid_4wkls7tu62ua12)
12:54:00 VERB PuppetService hookPayloadStore() this.on(login) contactId: "wxid_4wkls7tu62ua12"
12:54:00 VERB PayloadStore start(wxid_4wkls7tu62ua12)
12:54:00 VERB user/mixins/poolify poolifyMixin() PoolifiedMixin get pool() init pool
12:54:00 VERB PuppetService contactRawPayload(wxid_4wkls7tu62ua12)
12:54:00 VERB ContactSelf name()
12:54:00 INFO startBot onLogin(Contact<Friday BOT>) Friday BOT BOT5 [email protected] logged in
12:54:00 VERB Contact say(Friday BOT BOT5 [email protected] logged in)
12:54:00 VERB PuppetService messageSend(wxid_4wkls7tu62ua12, Friday BOT BOT5 [email protected] logged in)
12:54:00 INFO WechatyPluginContrib EventLogger login: Contact<Friday BOT>
12:54:00 VERB WechatyPluginContrib Heartbeat wechaty.on(login)
12:54:00 VERB user/mixins/poolify poolifyMixin() PoolifiedMixin get pool() init pool
12:54:00 VERB Room say(Der! I just got online!
Friday.BOT v0.12.11, )
12:54:00 VERB PuppetService messageSend(18131996049@chatroom, Der! I just got online!
Friday.BOT v0.12.11)
12:54:00 VERB Room ready()
12:54:00 VERB PuppetRoomMixin roomPayload(24980472405@chatroom)
12:54:00 VERB PuppetService roomRawPayload(24980472405@chatroom)
12:54:00 VERB PuppetService roomMemberList(24980472405@chatroom)
12:54:00 ERR Config ###########################
12:54:00 ERR Config unhandledRejection: Error: 13 INTERNAL: Cannot read properties of undefined (reading 'api')
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11) [object Promise]
12:54:00 ERR Config ###########################
12:54:00 ERR Config process.on(unhandledRejection) promise.catch(13 INTERNAL: Cannot read properties of undefined (reading 'api'))
Config Error: 13 INTERNAL: Cannot read properties of undefined (reading 'api')
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 13,
  details: "Cannot read properties of undefined (reading 'api')",
  metadata: Metadata {
    internalRepr: Map(1) { 'authorization' => [Array] },
    options: {}
  }
}
(node:1819303) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)
(Use `node --trace-warnings ...` to show where the warning was created)
12:54:00 VERB GError from("{"code":13,"details":"Cannot read properties of undefined (reading 'api')","metadata":{"authorization":["Wechaty undefined"]}}")
12:54:00 VERB GError constructor("{"code":13,"details":"Cannot read properties of undefined (reading 'api')","metadata":{"authorization":["Wechaty undefined"]}}")
12:54:00 ERR on-error onError(Error: 13 INTERNAL: Cannot read properties of undefined (reading 'api'))
GError: 13 INTERNAL: Cannot read properties of undefined (reading 'api')
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 2,
  details: [
    'Error',
    "Error: 13 INTERNAL: Cannot read properties of undefined (reading 'api')",
    '    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)',
    '    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)',
    '    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)',
    '    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)',
    '    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78',
    '    at processTicksAndRejections (node:internal/process/task_queues:78:11)'
  ]
}
Error: 13 INTERNAL: Cannot read properties of undefined (reading 'api')
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
12:54:00 INFO WechatyPluginContrib EventLogger error: Error: 13 INTERNAL: Cannot read properties of undefined (reading 'api')
12:54:00 ERR Config ###########################
12:54:00 ERR Config unhandledRejection: Error: 13 INTERNAL: Cannot read properties of undefined (reading 'getRoomMember')
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11) [object Promise]
12:54:00 ERR Config ###########################
12:54:00 ERR Config process.on(unhandledRejection) promise.catch(13 INTERNAL: Cannot read properties of undefined (reading 'getRoomMember'))
Config Error: 13 INTERNAL: Cannot read properties of undefined (reading 'getRoomMember')
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 13,
  details: "Cannot read properties of undefined (reading 'getRoomMember')",
  metadata: Metadata {
    internalRepr: Map(1) { 'authorization' => [Array] },
    options: {}
  }
}
(node:1819303) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 3)
^Cfinis: SIGNIT received.

Puppet Server

04:52:40 INFO Io on(jsonrpc): [object Object]
04:52:40 VERB Io on(jsonrpc) send({"id":-9007199254727037,"jsonrpc":"2.0","result":58788})
04:52:41 VERB PuppetServiceImpl event()
04:52:41 VERB EventStreamManager start(stream)
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() for Puppet#1<PuppetPadlocal>(insecure_7bda5366-9e72-4876-bf1a-e7f44d50a616)
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(friendship) (listenerCount:1) registering...
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(login) (listenerCount:2) registering...
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(logout) (listenerCount:2) registering...
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(message) (listenerCount:1) registering...
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-invite) (listenerCount:1) registering...
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-join) (listenerCount:1) registering...
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-leave) (listenerCount:1) registering...
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-topic) (listenerCount:1) registering...
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(scan) (listenerCount:2) registering...
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dirty) (listenerCount:1) registering...
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dong) (listenerCount:1) registering...
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(error) (listenerCount:1) registering...
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(heartbeat) (listenerCount:2) registering...
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(ready) (listenerCount:2) registering...
04:52:41 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(reset) (listenerCount:0) registering...
04:52:41 VERB EventStreamManager onStreamingCallEnd(callback)
04:52:41 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"Wechaty Puppet gRPC stream connect successfully"})
04:52:41 VERB EventStreamManager start() puppet is logged in, emit a login event for downstream
04:52:41 VERB PuppetLoginMixin get currentUserId()
04:52:41 VERB EventStreamManager grpcEmit(EVENT_TYPE_LOGIN[25], {"contactId":"wxid_4wkls7tu62ua12"})
04:52:41 VERB PuppetServiceImpl start()
04:52:41 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
04:52:41 VERB StateSwitch <PuppetState> on(pending) <- (false)
04:52:41 VERB PuppetServiceImpl messageSendText()
04:52:41 ERR PuppetServiceImpl grpcError() messageSendText() rejection: Cannot read properties of undefined (reading 'api')
04:52:41 VERB PuppetServiceImpl messageSendText()
04:52:41 ERR PuppetServiceImpl grpcError() messageSendText() rejection: Cannot read properties of undefined (reading 'api')
04:52:41 VERB PuppetServiceImpl roomMemberList()
04:52:41 ERR PuppetServiceImpl grpcError() roomMemberList() rejection: Cannot read properties of undefined (reading 'getRoomMember')
04:52:56 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
04:53:11 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
04:53:26 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
04:53:41 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
04:53:41 ERR PuppetServiceImpl grpcError() start() rejection: 4 DEADLINE_EXCEEDED: Deadline exceeded
04:53:46 VERB PuppetServiceImpl stop()
04:53:46 VERB EventStreamManager stop()
04:53:46 VERB StateSwitch <PuppetState> off(pending) <- (false)
04:53:46 ERR PuppetServiceImpl grpcError() stop() rejection: Cannot read properties of undefined (reading 'removeAllListeners')
04:53:46 VERB EventStreamManager this.onStreamingCallEnd() this.eventStream.on(finish) fired
04:53:46 VERB EventStreamManager connectPuppetEventToStreamingCall() offAll() 14 callbacks
04:53:46 WARN EventStreamManager this.onStreamingCallEnd() this.eventStream.on(finish) eventStream is undefined
04:53:46 VERB EventStreamManager this.onStreamingCallEnd() this.eventStream.on(close) fired
04:53:46 WARN EventStreamManager this.onStreamingCallEnd() this.eventStream.on(close) eventStream is undefined
04:53:46 VERB EventStreamManager this.onStreamingCallEnd() this.eventStream.on(cancelled) fired with arguments: {}
04:53:46 WARN EventStreamManager this.onStreamingCallEnd() this.eventStream.on(cancelled) eventStream is undefined
04:53:46 VERB PuppetServiceImpl logout()
04:53:46 ERR PuppetServiceImpl grpcError() logout() rejection: logout before login?
04:54:00 INFO Io on(jsonrpc): [object Object]
04:54:00 VERB Io on(jsonrpc) send({"id":-9007199254727027,"jsonrpc":"2.0","result":58788})
04:54:00 VERB PuppetServiceImpl event()
04:54:00 VERB EventStreamManager start(stream)
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() for Puppet#1<PuppetPadlocal>(insecure_7bda5366-9e72-4876-bf1a-e7f44d50a616)
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(friendship) (listenerCount:1) registering...
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(login) (listenerCount:2) registering...
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(logout) (listenerCount:2) registering...
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(message) (listenerCount:1) registering...
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-invite) (listenerCount:1) registering...
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-join) (listenerCount:1) registering...
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-leave) (listenerCount:1) registering...
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-topic) (listenerCount:1) registering...
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(scan) (listenerCount:2) registering...
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dirty) (listenerCount:1) registering...
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dong) (listenerCount:1) registering...
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(error) (listenerCount:1) registering...
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(heartbeat) (listenerCount:2) registering...
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(ready) (listenerCount:2) registering...
04:54:00 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(reset) (listenerCount:0) registering...
04:54:00 VERB EventStreamManager onStreamingCallEnd(callback)
04:54:00 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"Wechaty Puppet gRPC stream connect successfully"})
04:54:00 VERB EventStreamManager start() puppet is logged in, emit a login event for downstream
04:54:00 VERB PuppetLoginMixin get currentUserId()
04:54:00 VERB EventStreamManager grpcEmit(EVENT_TYPE_LOGIN[25], {"contactId":"wxid_4wkls7tu62ua12"})
04:54:00 VERB PuppetServiceImpl start()
04:54:00 VERB StateSwitch <PuppetState> on(pending) <- (false)
04:54:00 VERB PuppetServiceImpl messageSendText()
04:54:00 ERR PuppetServiceImpl grpcError() messageSendText() rejection: Cannot read properties of undefined (reading 'api')
04:54:00 VERB PuppetServiceImpl messageSendText()
04:54:00 ERR PuppetServiceImpl grpcError() messageSendText() rejection: Cannot read properties of undefined (reading 'api')
04:54:00 VERB PuppetServiceImpl roomMemberList()
04:54:00 ERR PuppetServiceImpl grpcError() roomMemberList() rejection: Cannot read properties of undefined (reading 'getRoomMember')
04:54:04 VERB PuppetServiceImpl messageSendText()
04:54:04 ERR PuppetServiceImpl grpcError() messageSendText() rejection: Cannot read properties of undefined (reading 'api')
04:54:06 VERB EventStreamManager this.onStreamingCallEnd() this.eventStream.on(cancelled) fired with arguments: {}
04:54:06 VERB EventStreamManager connectPuppetEventToStreamingCall() offAll() 14 callbacks
04:55:00 ERR PuppetServiceImpl grpcError() start() rejection: 4 DEADLINE_EXCEEDED: Deadline exceeded

FileBox with type UUID rejection with GitterPuppet

16:04:58 VERB Room say(FileBox#Uuid<message-6373229433108030603-image-normal.jpg>, )
16:04:59 VERB Message static load(7767906334958100053)
16:04:59 VERB Message constructor(7767906334958100053) for class WechatifiedMessageImpl
16:04:59 VERB Message ready()
16:04:59 VERB PuppetMessageMixin messagePayload(7767906334958100053)
16:04:59 VERB PuppetService messageRawPayload(7767906334958100053)
16:04:59 VERB Room ready()
16:04:59 VERB Message static load(3154338781840670693)
16:04:59 VERB Message constructor(3154338781840670693) for class WechatifiedMessageImpl
16:04:59 VERB Message ready()
16:04:59 VERB PuppetMessageMixin messagePayload(3154338781840670693)
16:04:59 VERB PuppetService messageRawPayload(3154338781840670693)
16:04:59 VERB Room ready()
16:04:59 VERB Message static load(2500017943533935764)
16:04:59 VERB Message constructor(2500017943533935764) for class WechatifiedMessageImpl
16:04:59 VERB Message ready()
16:04:59 VERB PuppetMessageMixin messagePayload(2500017943533935764)
16:04:59 VERB PuppetService messageRawPayload(2500017943533935764)
16:04:59 VERB Room ready()
16:05:00 ERR Config ###########################
16:05:00 ERR Config unhandledRejection: Error: need to call FileBox.setUuidLoader() to set UUID loader first.
    at FileBox.toStream (file:///home/friday/git/friday/node_modules/file-box/dist/esm/src/file-box.js:467:27)
    at FileBox.pipe (file:///home/friday/git/friday/node_modules/file-box/dist/esm/src/file-box.js:625:14)
    at FileBox.toBuffer (file:///home/friday/git/friday/node_modules/file-box/dist/esm/src/file-box.js:589:14)
    at PuppetGitter.messageSendFile (file:///home/friday/git/friday/node_modules/wechaty-puppet-gitter/dist/esm/src/puppet-gitter.js:339:43)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async file:///home/friday/git/friday/node_modules/wechaty/dist/esm/src/interface/sayable.js:49:17
    at async WechatifiedUserClass.say (file:///home/friday/git/friday/node_modules/wechaty/dist/esm/src/user/room.js:351:21)
    at async WechatyImpl.<anonymous> (file:///home/friday/git/friday/dist/src/cross-puppet.js:64:21) [object Promise]

群邀请过期了

扫二维码加了微信机器人,输入python wechaty后接收群邀请链接,但过期了

Move `isDuplicatedMessage` from Event Handler Class to Saga

I think the Event Handler Class will be instantiated from time to time when there's a new event, and will not keep/reuse the class instance for the next one.

So the isDuplicatedMessage will always forget the hash it calculated last time.

/**
* TODO: make sure it works as expected
* Huan(20220228)
*/
private async isDuplicatedMessage (message: WECHATY.Message): Promise<boolean> {
this.log.verbose('PuppetMessageReceivedHandler', 'isDuplicatedMessage(%s)', message.id)
const sayable = await WECHATY.helpers.messageToSayable(message)
if (typeof sayable === 'undefined') {
return false
}
const payload = await WECHATY.helpers.sayableToPayload(sayable)
if (typeof payload === 'undefined') {
return false
}
const hash = crypto.createHash('sha256').update(
JSON.stringify(payload),
).digest('hex')
if (this.lastMessageHash === hash) {
return true
}
this.lastMessageHash = hash
return false
}

Should move to Saga.

Enable ChatOps

  1. Send a message when started
  2. Send a message when quit.

With version number.

操作过于频繁,可稍后再试。

We have too many rooms with too many messages, which caused the Friday BOT to reach the rate limitation of the WeChat server:

17:07:39 INFO WechatyPluginContrib EventLogger message: Message#Unknown[🗣Contact<Friday BOT>@👥Room<ChatOps - Friday BOT>]      操作过于频繁,可稍后再试。

We need to start planning to load balance the traffic by adding another Friday BOT.

Background

We have sent too many UrlLink today because we are fighting with the backlog of GSoD'21 pull requests

make batch test for qna maker service in friday-bot

When we update the trian data for qna maker, we should keep qa accuracy for qna maker service. So, test data is essential.

We can follow the example journey from microsoft. But, the testing tools is based on .exe file, we can write a testing script which send restful generateAnswer request for every line testing data. And finnaly collect and analyze the test result. @huan How do you think about it ?

Wechaty v0.77: lost connection with docker pupet server

metrics { mo: 0, mt: 0 }
metrics { mo: 0, mt: 0 }
metrics { mo: 0, mt: 0 }
metrics { mo: 0, mt: 0 }
metrics { mo: 0, mt: 0 }
11:04:27 WARN Io initWebSocket() close event[1006: ]
11:04:27 VERB Io reconnect()
11:04:27 WARN Io reconnect() will reconnect after 0 s
11:04:27 VERB Io initWebSocket()
11:04:27 VERB Io initWebSocket() connected with protocol [io|0.0.1|b29c9136-28d4-4231-a914-1b3be057fb59||18788]
metrics { mo: 0, mt: 0 }
11:04:31 VERB PuppetService bridgeGrpcEventStream() eventStream.on(error) Error: 14 UNAVAILABLE: read ETIMEDOUT
11:04:31 ERR PuppetService ding() rejection: Error: 14 UNAVAILABLE: read ETIMEDOUT
11:04:31 ERR Puppet start() rejection: 14 UNAVAILABLE: read ETIMEDOUT
11:04:31 VERB StateSwitch <PuppetState> off(true) <- (pending)
11:04:31 VERB Room findAll() rejected: 14 UNAVAILABLE: read ETIMEDOUT
Error: 14 UNAVAILABLE: read ETIMEDOUT
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 14,
  details: 'read ETIMEDOUT',
  metadata: Metadata { internalRepr: Map(0) {}, options: {} }
} 
11:04:31 VERB Room findAll() rejected: 14 UNAVAILABLE: read ETIMEDOUT
Error: 14 UNAVAILABLE: read ETIMEDOUT
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 14,
  details: 'read ETIMEDOUT',
  metadata: Metadata { internalRepr: Map(0) {}, options: {} }
}
11:04:31 VERB Room findAll() rejected: 14 UNAVAILABLE: read ETIMEDOUT
Error: 14 UNAVAILABLE: read ETIMEDOUT
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 14,
  details: 'read ETIMEDOUT',
  metadata: Metadata { internalRepr: Map(0) {}, options: {} }
}
11:04:31 WARN PuppetStateMixin reset() rejection: Error: 14 UNAVAILABLE: read ETIMEDOUT
11:04:31 VERB PuppetError from("{"code":14,"details":"read ETIMEDOUT","metadata":{}}")
11:04:31 VERB PuppetError constructor("{"code":14,"details":"read ETIMEDOUT","metadata":{}}")
11:04:31 ERR on-error onError(Error: {"code":2,"details":["Error","Error: 14 UNAVAILABLE: read ETIMEDOUT","    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)","    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)","    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)","    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)","    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78","    at processTicksAndRejections (node:internal/process/task_queues:78:11)"],"message":"14 UNAVAILABLE: read ETIMEDOUT","name":"Error","stack":"Error: 14 UNAVAILABLE: read ETIMEDOUT\n    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)\n    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)\n    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)\n    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)\n    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78\n    at processTicksAndRejections (node:internal/process/task_queues:78:11)"})
Error: {"code":2,"details":["Error","Error: 14 UNAVAILABLE: read ETIMEDOUT","    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)","    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)","    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)","    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)","    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78","    at processTicksAndRejections (node:internal/process/task_queues:78:11)"],"message":"14 UNAVAILABLE: read ETIMEDOUT","name":"Error","stack":"Error: 14 UNAVAILABLE: read ETIMEDOUT\n    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)\n    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)\n    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)\n    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)\n    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78\n    at processTicksAndRejections (node:internal/process/task_queues:78:11)"}
    at PuppetService.<anonymous> (file:///home/friday/git/friday/node_modules/wechaty/dist/esm/src/wechaty.js:299:44)
    at PuppetService.emit (node:events:390:28)
    at PuppetService.reset (file:///home/friday/git/friday/node_modules/wechaty-puppet/dist/esm/src/mixins/state-mixin.js:61:22)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
Error: {"code":2,"details":["Error","Error: 14 UNAVAILABLE: read ETIMEDOUT","    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)","    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)","    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)","    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)","    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78","    at processTicksAndRejections (node:internal/process/task_queues:78:11)"],"message":"14 UNAVAILABLE: read ETIMEDOUT","name":"Error","stack":"Error: 14 UNAVAILABLE: read ETIMEDOUT\n    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)\n    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)\n    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)\n    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)\n    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78\n    at processTicksAndRejections (node:internal/process/task_queues:78:11)"}
    at PuppetService.<anonymous> (file:///home/friday/git/friday/node_modules/wechaty/dist/esm/src/wechaty.js:299:44)
    at PuppetService.emit (node:events:390:28)
    at PuppetService.reset (file:///home/friday/git/friday/node_modules/wechaty-puppet/dist/esm/src/mixins/state-mixin.js:61:22)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
11:04:31 INFO WechatyPluginContrib EventLogger error: Error: {"code":2,"details":["Error","Error: 14 UNAVAILABLE: read ETIMEDOUT","    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)","    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)","    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)","    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)","    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78","    at processTicksAndRejections (node:internal/process/task_queues:78:11)"],"message":"14 UNAVAILABLE: read ETIMEDOUT","name":"Error","stack":"Error: 14 UNAVAILABLE: read ETIMEDOUT\n    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)\n    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)\n    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)\n    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)\n    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78\n    at processTicksAndRejections (node:internal/process/task_queues:78:11)"}
11:04:31 VERB PuppetStateMixin reset() done
11:04:31 VERB StateSwitch <PuppetBusyIndicator> off(true) <- (false)
11:04:31 ERR Friday status-page count-room-member countRoomMembers(): friday.Room return 0 members
11:04:31 VERB Room memberList()
11:04:31 VERB PuppetGitter roomMemberList(573324fcc43b8c60197242bf)
11:04:31 ERR Friday status-page count-room-member countRoomMembers(): friday.Room return 0 members
11:04:31 VERB Room memberList()
11:04:31 VERB PuppetGitter roomMemberList(573324fcc43b8c60197242bf)
11:04:31 ERR Friday status-page count-room-member countRoomMembers(): friday.Room return 0 members
11:04:31 VERB Room memberList()
11:04:31 VERB PuppetGitter roomMemberList(573324fcc43b8c60197242bf)
11:04:32 VERB status-page/updater startUpdater/setInterval membersNumber: 0
11:04:32 VERB status-page/updater startUpdater/setInterval membersNumber: 0
11:04:32 VERB status-page/updater startUpdater/setInterval membersNumber: 0
metrics { mo: 0, mt: 0 }
metrics { mo: 0, mt: 0 }
...
metrics { mo: 0, mt: 0 }
metrics { mo: 0, mt: 0 }
11:06:17 VERB status-page/updater startUpdater/setInterval mo/mt: 0/0
11:06:17 VERB Room findAll({"topic":{}})
11:06:17 VERB PuppetRoomMixin roomSearch({"topic":{}})
11:06:17 VERB PuppetService roomList()
11:06:17 VERB Room findAll() rejected: 13 INTERNAL: Failed to start HTTP/2 stream with error: The session has been destroyed
Error: 13 INTERNAL: Failed to start HTTP/2 stream with error: The session has been destroyed
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 13,
  details: 'Failed to start HTTP/2 stream with error: The session has been destroyed',
  metadata: Metadata { internalRepr: Map(0) {}, options: {} }
}
11:06:17 ERR Friday status-page count-room-member countRoomMembers(): friday.Room return 0 members
11:06:17 VERB Room memberList()
11:06:17 VERB PuppetGitter roomMemberList(573324fcc43b8c60197242bf)
11:06:18 VERB status-page/updater startUpdater/setInterval membersNumber: 0
metrics { mo: 0, mt: 0 }
metrics { mo: 0, mt: 0 }
...
metrics { mo: 0, mt: 0 }
metrics { mo: 0, mt: 0 }
11:32:02 VERB Room findAll() rejected: 14 UNAVAILABLE: read ETIMEDOUT
Error: 14 UNAVAILABLE: read ETIMEDOUT
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client.js:180:52)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/build/src/call-stream.js:160:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 14,
  details: 'read ETIMEDOUT',
  metadata: Metadata { internalRepr: Map(0) {}, options: {} }
} 

Error: conversationId: 696864249 is neither QQ_USER_TYPE nor QQ_GROUP_TYPE

15:16:29 VERB Room say([Huan (李卓桓) @ WeChat]: 开会啦, )
15:16:29 ERR Config ###########################
15:16:29 ERR Config Wechaty unhandledRejection: Error: conversationId: 696864249 is neither QQ_USER_TYPE nor QQ_GROUP_TYPE
    at PuppetOICQ.messageSendText (file:///home/friday/git/friday/node_modules/wechaty-puppet-oicq/dist/esm/src/puppet-oicq.js:189:19)
    at WechatifiedUserClass.say (file:///home/friday/git/friday/node_modules/wechaty/dist/esm/src/user/room.js:368:47)
    at WechatyImpl.<anonymous> (file:///home/friday/git/friday/dist/src/cross-puppet.js:59:34)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) [object Promise]
15:16:29 ERR Config ###########################
15:16:29 ERR Config process.on(unhandledRejection) promise.catch(conversationId: 696864249 is neither QQ_USER_TYPE nor QQ_GROUP_TYPE)
Config Error: conversationId: 696864249 is neither QQ_USER_TYPE nor QQ_GROUP_TYPE
    at PuppetOICQ.messageSendText (file:///home/friday/git/friday/node_modules/wechaty-puppet-oicq/dist/esm/src/puppet-oicq.js:189:19)
    at WechatifiedUserClass.say (file:///home/friday/git/friday/node_modules/wechaty/dist/esm/src/user/room.js:368:47)
    at WechatyImpl.<anonymous> (file:///home/friday/git/friday/dist/src/cross-puppet.js:59:34)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
(node:2091744) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 5)

Error: connection refused: localtunnel.chatie.io

Need to catch this exception/rejection or the Node.js process will stop.

01:54:45 ERR Config ###########################
01:54:45 ERR Config Wechaty uncaughtException: Error: connection refused: localtunnel.chatie.io:44993 (check your firewall settings)
    at Socket.<anonymous> (/home/friday/git/friday/node_modules/localtunnel/lib/TunnelCluster.js:52:11)
    at Socket.emit (node:events:520:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) uncaughtException
01:54:45 ERR Config ###########################
Error: connection refused: localtunnel.chatie.io:44993 (check your firewall settings)
    at Socket.<anonymous> (/home/friday/git/friday/node_modules/localtunnel/lib/TunnelCluster.js:52:11)
    at Socket.emit (node:events:520:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
finis: exit code: 1
01:54:45 INFO RestartReporter finis(1, exit)
01:54:45 INFO RestartReporter finis() announce exiting

Heroku Error Messages

2020-03-03T15:25:16.407944+00:00 app[web.1]: 15:25:16 VERB Wechaty initAccessory(Puppet#0<PuppetPadplus>(df44631922410b31ed5b2664c1d0ec61bb11750ca7ec031e8dc70bba8a4f81ec))
2020-03-03T15:25:18.048865+00:00 app[web.1]: 15:25:18 VERB Contact load(wxid_4wkls7tu62ua12) init pool
2020-03-03T15:25:18.055553+00:00 app[web.1]: 15:25:18 INFO Chatops roomMessage(17376996519@chatroom, 🙋)
2020-03-03T15:25:18.056245+00:00 app[web.1]: 15:25:18 VERB Room ready()
2020-03-03T15:25:18.058211+00:00 app[web.1]: 15:25:18 INFO Chatops roomMessage(18131996049@chatroom, Der! I just got online!
2020-03-03T15:25:18.058212+00:00 app[web.1]: BOT5 v0.2.27)
2020-03-03T15:25:18.058404+00:00 app[web.1]: 15:25:18 VERB Room ready()
2020-03-03T15:25:18.058985+00:00 app[web.1]: 15:25:18 VERB ContactSelf name()
2020-03-03T15:25:18.059496+00:00 app[web.1]: 15:25:18 VERB ContactSelf name()
2020-03-03T15:25:18.059655+00:00 app[web.1]: 15:25:18 INFO startBot onLogin(Contact<Friday BOT>) Friday BOT BOT5 v0.32.3 logined
2020-03-03T15:25:18.060060+00:00 app[web.1]: 15:25:18 VERB Contact say(Friday BOT BOT5 v0.32.3 logined)
2020-03-03T15:25:34.000000+00:00 app[api]: Build succeeded
2020-03-03T15:26:51.316589+00:00 app[web.1]: 15:26:51 INFO Chatops roomMessage(17376996519@chatroom, 💪)
2020-03-03T15:26:51.316716+00:00 app[web.1]: 15:26:51 VERB Room ready()
2020-03-03T15:26:51.317234+00:00 app[web.1]: 15:26:51 VERB StateSwitch <WechatyReady> on(true) <- (false)
2020-03-03T15:35:42.441804+00:00 app[web.1]: 15:35:42 ERR GRPC_GATEWAY GRPC SERVER ERROR.
2020-03-03T15:35:42.441822+00:00 app[web.1]:       =====================================================================
2020-03-03T15:35:42.441823+00:00 app[web.1]:       try to reconnect grpc server, waiting...
2020-03-03T15:35:42.441823+00:00 app[web.1]:       =====================================================================
2020-03-03T15:35:42.441824+00:00 app[web.1]:       
2020-03-03T15:35:47.444233+00:00 app[web.1]: 15:35:47 VERB Wechaty on(heartbeat, function) registered
2020-03-03T15:35:47.444310+00:00 app[web.1]: 15:35:47 VERB Wechaty addListenerFunction(heartbeat)
2020-03-03T15:35:47.444449+00:00 app[web.1]: 15:35:47 VERB StateSwitch <Wechaty> on(true) <- (pending)
2020-03-03T15:35:47.445011+00:00 app[web.1]: 15:35:47 ERR Config ###########################
2020-03-03T15:35:47.445125+00:00 app[web.1]: 15:35:47 ERR Config unhandledRejection: Error: can not get callback result of GET_CONTACT_SELF_INFO [object Promise]
2020-03-03T15:35:47.445203+00:00 app[web.1]: 15:35:47 ERR Config ###########################
2020-03-03T15:35:47.445428+00:00 app[web.1]: 15:35:47 ERR Config process.on(unhandledRejection) promise.catch(can not get callback result of GET_CONTACT_SELF_INFO)
2020-03-03T15:35:47.453795+00:00 app[web.1]: Config Error: can not get callback result of GET_CONTACT_SELF_INFO
2020-03-03T15:35:47.453798+00:00 app[web.1]:     at PadplusContact.<anonymous> (/app/node_modules/wechaty/node_modules/wechaty-puppet-padplus/src/padplus-manager/api-request/contact.ts:293:13)
2020-03-03T15:35:47.453798+00:00 app[web.1]:     at Generator.next (<anonymous>)
2020-03-03T15:35:47.453799+00:00 app[web.1]:     at fulfilled (/app/node_modules/wechaty/node_modules/wechaty-puppet-padplus/dist/src/padplus-manager/api-request/contact.js:5:58)
2020-03-03T15:35:47.454530+00:00 app[web.1]: (node:4) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 14)
2020-03-03T15:35:47.455694+00:00 app[web.1]: 15:35:47 ERR Config ###########################
2020-03-03T15:35:47.455842+00:00 app[web.1]: 15:35:47 ERR Config unhandledRejection: Error: can not send message due to this error: Error: can not get response from grpc server [object Promise]
2020-03-03T15:35:47.455932+00:00 app[web.1]: 15:35:47 ERR Config ###########################
2020-03-03T15:35:47.456097+00:00 app[web.1]: 15:35:47 ERR Config process.on(unhandledRejection) promise.catch(can not send message due to this error: Error: can not get response from grpc server)
2020-03-03T15:35:47.464861+00:00 app[web.1]: Config Error: can not send message due to this error: Error: can not get response from grpc server
2020-03-03T15:35:47.464864+00:00 app[web.1]:     at PadplusMessage.<anonymous> (/app/node_modules/wechaty/node_modules/wechaty-puppet-padplus/src/padplus-manager/api-request/message.ts:52:13)
2020-03-03T15:35:47.464864+00:00 app[web.1]:     at Generator.next (<anonymous>)
2020-03-03T15:35:47.464865+00:00 app[web.1]:     at fulfilled (/app/node_modules/wechaty/node_modules/wechaty-puppet-padplus/dist/src/padplus-manager/api-request/message.js:5:58)
2020-03-03T15:35:47.464866+00:00 app[web.1]:     at process._tickCallback (internal/process/next_tick.js:68:7)
2020-03-03T15:35:48.002212+00:00 app[web.1]: (node:4) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 15)
2020-03-03T15:35:52.457573+00:00 app[web.1]: 15:35:52 ERR Config ###########################
2020-03-03T15:35:52.457841+00:00 app[web.1]: 15:35:52 ERR Config unhandledRejection: Error: get contact timeout [object Promise]
2020-03-03T15:35:52.457978+00:00 app[web.1]: 15:35:52 ERR Config ###########################
2020-03-03T15:35:52.458147+00:00 app[web.1]: 15:35:52 ERR Config ###########################
2020-03-03T15:35:52.458263+00:00 app[web.1]: 15:35:52 ERR Config unhandledRejection: Error: get contact timeout [object Promise]
2020-03-03T15:35:52.458579+00:00 app[web.1]: 15:35:52 ERR Config ###########################
2020-03-03T15:35:52.458718+00:00 app[web.1]: 15:35:52 ERR Config ###########################
2020-03-03T15:35:52.458817+00:00 app[web.1]: 15:35:52 ERR Config unhandledRejection: Error: get contact timeout [object Promise]
2020-03-03T15:35:52.458918+00:00 app[web.1]: 15:35:52 ERR Config ###########################
2020-03-03T15:35:52.459035+00:00 app[web.1]: 15:35:52 ERR Config ###########################
2020-03-03T15:35:52.459133+00:00 app[web.1]: 15:35:52 ERR Config unhandledRejection: Error: get contact timeout [object Promise]
2020-03-03T15:35:52.459213+00:00 app[web.1]: 15:35:52 ERR Config ###########################
2020-03-03T15:35:52.459339+00:00 app[web.1]: 15:35:52 ERR Config ###########################
2020-03-03T15:35:52.459450+00:00 app[web.1]: 15:35:52 ERR Config unhandledRejection: Error: get room timeout [object Promise]
2020-03-03T15:35:52.459583+00:00 app[web.1]: 15:35:52 ERR Config ###########################
2020-03-03T15:35:52.459713+00:00 app[web.1]: 15:35:52 ERR Config ###########################
2020-03-03T15:35:52.459859+00:00 app[web.1]: 15:35:52 ERR Config unhandledRejection: Error: get room timeout [object Promise]
2020-03-03T15:35:52.459939+00:00 app[web.1]: 15:35:52 ERR Config ###########################
2020-03-03T15:35:52.460053+00:00 app[web.1]: 15:35:52 ERR Config ###########################
2020-03-03T15:35:52.460152+00:00 app[web.1]: 15:35:52 ERR Config unhandledRejection: Error: get room timeout [object Promise]
2020-03-03T15:35:52.460237+00:00 app[web.1]: 15:35:52 ERR Config ###########################
2020-03-03T15:35:52.460474+00:00 app[web.1]: 15:35:52 ERR Config process.on(unhandledRejection) promise.catch(get contact timeout)
2020-03-03T15:35:52.485145+00:00 app[web.1]: Config Error: get contact timeout
2020-03-03T15:35:52.485151+00:00 app[web.1]:     at Timeout.setTimeout (/app/node_modules/wechaty/node_modules/wechaty-puppet-padplus/src/padplus-manager/padplus-manager.ts:1087:47)
2020-03-03T15:35:52.485152+00:00 app[web.1]:     at ontimeout (timers.js:436:11)
2020-03-03T15:35:52.485152+00:00 app[web.1]:     at tryOnTimeout (timers.js:300:5)
2020-03-03T15:35:52.485153+00:00 app[web.1]:     at listOnTimeout (timers.js:263:5)
2020-03-03T15:35:52.485153+00:00 app[web.1]:     at Timer.processTimers (timers.js:223:10)
2020-03-03T15:35:52.485282+00:00 app[web.1]: 15:35:52 ERR Config process.on(unhandledRejection) promise.catch(get contact timeout)
2020-03-03T15:35:52.485679+00:00 app[web.1]: Config Error: get contact timeout
2020-03-03T15:35:52.485680+00:00 app[web.1]:     at Timeout.setTimeout (/app/node_modules/wechaty/node_modules/wechaty-puppet-padplus/src/padplus-manager/padplus-manager.ts:1087:47)
2020-03-03T15:35:52.485680+00:00 app[web.1]:     at ontimeout (timers.js:436:11)
2020-03-03T15:35:52.485680+00:00 app[web.1]:     at tryOnTimeout (timers.js:300:5)
2020-03-03T15:35:52.485681+00:00 app[web.1]:     at listOnTimeout (timers.js:263:5)
2020-03-03T15:35:52.485681+00:00 app[web.1]:     at Timer.processTimers (timers.js:223:10)
2020-03-03T15:35:52.485775+00:00 app[web.1]: 15:35:52 ERR Config process.on(unhandledRejection) promise.catch(get contact timeout)
2020-03-03T15:35:52.486169+00:00 app[web.1]: Config Error: get contact timeout
2020-03-03T15:35:52.486170+00:00 app[web.1]:     at Timeout.setTimeout (/app/node_modules/wechaty/node_modules/wechaty-puppet-padplus/src/padplus-manager/padplus-manager.ts:1087:47)
2020-03-03T15:35:52.486171+00:00 app[web.1]:     at ontimeout (timers.js:436:11)
2020-03-03T15:35:52.486171+00:00 app[web.1]:     at tryOnTimeout (timers.js:300:5)
2020-03-03T15:35:52.486171+00:00 app[web.1]:     at listOnTimeout (timers.js:263:5)
2020-03-03T15:35:52.486172+00:00 app[web.1]:     at Timer.processTimers (timers.js:223:10)
2020-03-03T15:35:52.486261+00:00 app[web.1]: 15:35:52 ERR Config process.on(unhandledRejection) promise.catch(get contact timeout)
2020-03-03T15:35:52.488368+00:00 app[web.1]: Config Error: get contact timeout
2020-03-03T15:35:52.488370+00:00 app[web.1]:     at Timeout.setTimeout (/app/node_modules/wechaty/node_modules/wechaty-puppet-padplus/src/padplus-manager/padplus-manager.ts:1087:47)
2020-03-03T15:35:52.488370+00:00 app[web.1]:     at ontimeout (timers.js:436:11)
2020-03-03T15:35:52.488370+00:00 app[web.1]:     at tryOnTimeout (timers.js:300:5)
2020-03-03T15:35:52.488371+00:00 app[web.1]:     at listOnTimeout (timers.js:263:5)
2020-03-03T15:35:52.488371+00:00 app[web.1]:     at Timer.processTimers (timers.js:223:10)
2020-03-03T15:35:52.488529+00:00 app[web.1]: 15:35:52 ERR Config process.on(unhandledRejection) promise.catch(get room timeout)
2020-03-03T15:35:52.488932+00:00 app[web.1]: Config Error: get room timeout
2020-03-03T15:35:52.488933+00:00 app[web.1]:     at Timeout.setTimeout (/app/node_modules/wechaty/node_modules/wechaty-puppet-padplus/src/padplus-manager/padplus-manager.ts:1220:47)
2020-03-03T15:35:52.488933+00:00 app[web.1]:     at ontimeout (timers.js:436:11)
2020-03-03T15:35:52.488934+00:00 app[web.1]:     at tryOnTimeout (timers.js:300:5)
2020-03-03T15:35:52.488934+00:00 app[web.1]:     at listOnTimeout (timers.js:263:5)
2020-03-03T15:35:52.488934+00:00 app[web.1]:     at Timer.processTimers (timers.js:223:10)
2020-03-03T15:35:52.489022+00:00 app[web.1]: 15:35:52 ERR Config process.on(unhandledRejection) promise.catch(get room timeout)
2020-03-03T15:35:52.489326+00:00 app[web.1]: Config Error: get room timeout
2020-03-03T15:35:52.489327+00:00 app[web.1]:     at Timeout.setTimeout (/app/node_modules/wechaty/node_modules/wechaty-puppet-padplus/src/padplus-manager/padplus-manager.ts:1220:47)
2020-03-03T15:35:52.489327+00:00 app[web.1]:     at ontimeout (timers.js:436:11)
2020-03-03T15:35:52.489327+00:00 app[web.1]:     at tryOnTimeout (timers.js:300:5)
2020-03-03T15:35:52.489328+00:00 app[web.1]:     at listOnTimeout (timers.js:263:5)
2020-03-03T15:35:52.489328+00:00 app[web.1]:     at Timer.processTimers (timers.js:223:10)
2020-03-03T15:35:52.489443+00:00 app[web.1]: 15:35:52 ERR Config process.on(unhandledRejection) promise.catch(get room timeout)
2020-03-03T15:35:52.489750+00:00 app[web.1]: Config Error: get room timeout
2020-03-03T15:35:52.489751+00:00 app[web.1]:     at Timeout.setTimeout (/app/node_modules/wechaty/node_modules/wechaty-puppet-padplus/src/padplus-manager/padplus-manager.ts:1220:47)
2020-03-03T15:35:52.489752+00:00 app[web.1]:     at ontimeout (timers.js:436:11)
2020-03-03T15:35:52.489752+00:00 app[web.1]:     at tryOnTimeout (timers.js:300:5)
2020-03-03T15:35:52.489752+00:00 app[web.1]:     at listOnTimeout (timers.js:263:5)
2020-03-03T15:35:52.489753+00:00 app[web.1]:     at Timer.processTimers (timers.js:223:10)
2020-03-03T15:35:52.676368+00:00 app[web.1]: (node:4) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 16)
2020-03-03T15:35:52.676415+00:00 app[web.1]: (node:4) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 17)
2020-03-03T15:35:52.676511+00:00 app[web.1]: (node:4) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 18)
2020-03-03T15:35:52.676597+00:00 app[web.1]: (node:4) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 19)
2020-03-03T15:35:52.676718+00:00 app[web.1]: (node:4) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 20)
2020-03-03T15:35:52.676820+00:00 app[web.1]: (node:4) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 21)
2020-03-03T15:35:52.676932+00:00 app[web.1]: (node:4) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 22)

TypeError: request.setMentonalIdsList is not a function

23:05:59 VERB PuppetService messageSend(18131996049@chatroom, Der! I just got online!
Friday.BOT v0.11.11)
23:05:59 VERB ContactSelf name()
23:05:59 VERB ContactSelf name()
23:05:59 INFO IoClient Friday BOT logged in
23:05:59 VERB Io send() without a connected websocket, eventBuffer.length = 1
23:05:59 VERB Room ready()
23:05:59 VERB Puppet roomPayload(24980472405@chatroom)
23:05:59 VERB PuppetService roomRawPayload(24980472405@chatroom)
23:05:59 VERB FlashStore get(24980472405@chatroom)
23:05:59 ERR Config ###########################
23:05:59 ERR Config unhandledRejection: TypeError: request.setMentonalIdsList is not a function
    at PuppetService.messageSendText (file:///home/friday/git/friday/node_modules/wechaty-puppet-service/dist/esm/src/client/puppet-service.js:547:21)
    at WechatifiedRoom.say (file:///home/friday/git/friday/node_modules/wechaty/dist/esm/src/user/room.js:402:47)
    at Wechaty.<anonymous> (file:///home/friday/git/friday/dist/src/friday/setup-finis.js:15:60)
    at Wechaty.emit (events.js:388:22)
    at Wechaty.emit (domain.js:470:12)
    at PuppetService.<anonymous> (file:///home/friday/git/friday/node_modules/wechaty/dist/esm/src/wechaty.js:295:34) [object Promise]

Vote Rule Optimization

Stipulate that one person can only vote for another person once, and cannot vote for himself / herself.

SyntaxError: Named export 'OnModuleDestroy' not found. The requested module '@nestjs/common' is a CommonJS module, which may not support all module.exports as named exports.

We found that the Nestjs with the swc transpiler have some compatible problems.

The Problem

When we are using the swc as the transpiler settings in the tsconfig.json

{
  "ts-node": {
    "transpileOnly": true,
    "transpiler": "ts-node/transpilers/swc-experimental",
  },
}

We will get the below error:

$ ./statuspage.saga.spec.ts 
file:///home/huan/git/wechaty/friday/src/wechaty-repository/wechaty.repository.ts:2
import { Injectable, OnModuleDestroy, OnModuleInit } from '@nestjs/common';
                     ^^^^^^^^^^^^^^^
SyntaxError: Named export 'OnModuleDestroy' not found. The requested module '@nestjs/common' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@nestjs/common';
const { Injectable, OnModuleDestroy, OnModuleInit } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:181:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
    at async loadESM (node:internal/process/esm_loader:88:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12)

The Workaround

Because we are extending the tsconfig.json from @chatie/tsconfig, we add a ts-node.transpiler = '' to remove the swc transpiler, and then the system work as expected:

{
  "ts-node": {
    // It is faster to skip typechecking.
    // Remove if you want ts-node to do typechecking.
    "transpileOnly": true,
-     "transpiler": "ts-node/transpilers/swc-experimental",
+     "transpiler": "",  // <- set it to empty, or make sure it does not set in the tsconfig.json
  },
}

Reproduceable Repo

Related Issues

Lost a room in a sudden

We saw the community member number go down in our status page chart and then we found out that we lost a room when we are calling roomList() API.

Status Page

https://chatie.statuspage.io/:

image

ChatOps Room

eval
  const roomList = await this.wechaty.Room.findAll({ topic: /Wechaty Developer/i });
  let total = 0;
  let text='Summary:\n';
  for (const room of roomList.sort((a,b)=>a.payload.topic.localeCompare(b.payload.topic))) {
    const memberList = await room.memberAll();
    text = text+'\n'+await room.topic()+': '+memberList.length;
    total = total+memberList.length;
  };
  text = text+'\nTotal: '+total;
  this.log(text);

image

To be investigated

We ran into this situation before for once, so after this time, we can believe this is a BUG behind the Puppet Server (Upstream).

BUG: Use `room id` as `contact id` by mistake

R:10855009180534640 is a room id ("Wechaty Developers' Home 5"), but according to the log below, the program uses it as a contact id.

to be investigated.

11:23:50 VERB PuppetMessageMixin messagePayload(1036562)
11:23:51 VERB PuppetService onGrpcStreamEvent({type:EVENT_TYPE_DIRTY(27), payload(len:51)})
11:23:51 INFO WechatyPluginContrib EventLoggerPlugin() heartbeat: ["onGrpcStreamEvent(EVENT_TYPE_DIRTY)"]
11:23:51 VERB PuppetService onDirty(Room<3>, R:10855009180534640)
11:23:51 VERB PuppetCacheMixin onDirty(Room<3>, R:10855009180534640)
11:23:51 VERB PuppetRoomMixin roomPayload(R:10855009180534640)
11:23:51 VERB PuppetService roomRawPayload(R:10855009180534640)
11:23:51 VERB PuppetService onGrpcStreamEvent({type:EVENT_TYPE_ROOM_LEAVE(20), payload(len:126)})
11:23:51 INFO WechatyPluginContrib EventLoggerPlugin() heartbeat: ["onGrpcStreamEvent(EVENT_TYPE_ROOM_LEAVE)"]
11:23:51 VERB PuppetRoomMixin roomPayloadDirty(R:10855009180534640)
11:23:51 VERB PuppetCacheMixin __dirtyPayloadAwait(Room<3>, R:10855009180534640)
11:23:51 VERB PuppetService dirtyPayload(3, R:10855009180534640)
11:23:51 VERB PuppetService onGrpcStreamEvent({type:EVENT_TYPE_DIRTY(27), payload(len:51)})
11:23:51 INFO WechatyPluginContrib EventLoggerPlugin() heartbeat: ["onGrpcStreamEvent(EVENT_TYPE_DIRTY)"]
11:23:51 VERB PuppetService onDirty(Room<3>, R:10855009180534640)
11:23:51 VERB PuppetCacheMixin onDirty(Room<3>, R:10855009180534640)
11:23:51 VERB PuppetRoomMixin roomPayload(R:10855009180534640)
11:23:51 VERB PuppetService roomRawPayload(R:10855009180534640)
11:23:51 VERB PuppetRoomMemberMixin roomMemberPayloadDirty(R:10855009180534640)
11:23:51 VERB PuppetCacheMixin __dirtyPayloadAwait(RoomMember<4>, R:10855009180534640)
11:23:51 VERB PuppetService dirtyPayload(4, R:10855009180534640)
11:23:51 VERB PuppetService roomMemberList(R:10855009180534640)
11:23:51 VERB PuppetService onGrpcStreamEvent({type:EVENT_TYPE_DIRTY(27), payload(len:51)})
11:23:51 INFO WechatyPluginContrib EventLoggerPlugin() heartbeat: ["onGrpcStreamEvent(EVENT_TYPE_DIRTY)"]
11:23:51 VERB PuppetService contactRawPayload(R:10855009180534640)
11:23:51 VERB PuppetService onDirty(RoomMember<4>, R:10855009180534640)
11:23:51 VERB PuppetCacheMixin onDirty(RoomMember<4>, R:10855009180534640)
11:23:51 VERB PuppetRoomMixin roomPayload(R:10855009180534640)
11:23:51 VERB PuppetService roomMemberList(R:10855009180534640)
11:23:51 VERB PuppetService roomMemberList(R:10855009180534640)
11:23:51 INFO WechatyPluginContrib EventLoggerPlugin() error: [{"code":13,"details":"contactPayload() can not get contact payload by wrong id: R:10855009
180534640","message":"13 INTERNAL: contactPayload() can not get contact payload by wrong id: R:10855009180534640","name":"Error","stack":"Error: 13 INTER
NAL: contactPayload() can not get contact payload by wrong id: R:10855009180534640\n    at callErrorFromStatus (/home/friday/git/friday/node_modules/@grp
c/grpc-js/src/call.ts:81:17)\n    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client.ts:356:55)\n    at Object.onRe
ceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client-interceptors.ts:455:34)\n    at Object.onReceiveStatus (/home/friday/git/frida
y/node_modules/@grpc/grpc-js/src/client-interceptors.ts:417:48)\n    at /home/friday/git/friday/node_modules/@grpc/grpc-js/src/resolving-call.ts:110:24\n
    at processTicksAndRejections (node:internal/process/task_queues:78:11)\nfor call at\n    at ServiceClientImpl.makeUnaryRequest (/home/friday/git/frid
ay/node_modules/@grpc/grpc-js/src/client.ts:326:30)\n    at ServiceClientImpl.contactPayload (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/make
-client.ts:189:15)\n    at node:internal/util:360:7\n    at new Promise (<anonymous>)\n    at bound  (node:internal/util:346:12)\n    at PuppetService.co
ntactRawPayload (file:///home/friday/git/friday/node_modules/wechaty-puppet-service/src/client/puppet-service.ts:663:6)\n    at PuppetService.contactPayl
oad (file:///home/friday/git/friday/node_modules/wechaty-puppet/src/mixins/contact-mixin.ts:298:26)\n    at WechatifiedUserClass.ready (file:///home/frid
ay/git/friday/node_modules/wechaty/src/user-modules/contact.ts:699:22)\n    at Function.find (file:///home/friday/git/friday/node_modules/wechaty/src/use
r-modules/contact.ts:114:9)\n    at PuppetService.<anonymous> (file:///home/friday/git/friday/node_modules/wechaty/src/wechaty-mixins/puppet-mixin.ts:441
:37)"}]
GError: 13 INTERNAL: contactPayload() can not get contact payload by wrong id: R:10855009180534640
    at callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/call.ts:81:17)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client.ts:356:55)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client-interceptors.ts:455:34)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client-interceptors.ts:417:48)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/src/resolving-call.ts:110:24
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
for call at
    at ServiceClientImpl.makeUnaryRequest (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client.ts:326:30)
    at ServiceClientImpl.contactPayload (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/make-client.ts:189:15)
    at node:internal/util:360:7
    at new Promise (<anonymous>)
    at bound  (node:internal/util:346:12)
    at PuppetService.contactRawPayload (file:///home/friday/git/friday/node_modules/wechaty-puppet-service/src/client/puppet-service.ts:663:6)
    at PuppetService.contactPayload (file:///home/friday/git/friday/node_modules/wechaty-puppet/src/mixins/contact-mixin.ts:298:26)
    at WechatifiedUserClass.ready (file:///home/friday/git/friday/node_modules/wechaty/src/user-modules/contact.ts:699:22)
    at Function.find (file:///home/friday/git/friday/node_modules/wechaty/src/user-modules/contact.ts:114:9)
    at PuppetService.<anonymous> (file:///home/friday/git/friday/node_modules/wechaty/src/wechaty-mixins/puppet-mixin.ts:441:37) {
  code: 13,
  details: 'contactPayload() can not get contact payload by wrong id: R:10855009180534640'
}
11:23:51 ERR on-error onError(Error: 13 INTERNAL: contactPayload() can not get contact payload by wrong id: R:10855009180534640)
GError: 13 INTERNAL: contactPayload() can not get contact payload by wrong id: R:10855009180534640
    at callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/call.ts:81:17)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client.ts:356:55)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client-interceptors.ts:455:34)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client-interceptors.ts:417:48)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/src/resolving-call.ts:110:24
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
for call at
    at ServiceClientImpl.makeUnaryRequest (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client.ts:326:30)
    at ServiceClientImpl.contactPayload (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/make-client.ts:189:15)
    at node:internal/util:360:7
    at new Promise (<anonymous>)
    at bound  (node:internal/util:346:12)
    at PuppetService.contactRawPayload (file:///home/friday/git/friday/node_modules/wechaty-puppet-service/src/client/puppet-service.ts:663:6)
    at PuppetService.contactPayload (file:///home/friday/git/friday/node_modules/wechaty-puppet/src/mixins/contact-mixin.ts:298:26)
    at WechatifiedUserClass.ready (file:///home/friday/git/friday/node_modules/wechaty/src/user-modules/contact.ts:699:22)
    at Function.find (file:///home/friday/git/friday/node_modules/wechaty/src/user-modules/contact.ts:114:9)
    at PuppetService.<anonymous> (file:///home/friday/git/friday/node_modules/wechaty/src/wechaty-mixins/puppet-mixin.ts:441:37) {
  code: 13,
  details: 'contactPayload() can not get contact payload by wrong id: R:10855009180534640'
}
Error: 13 INTERNAL: contactPayload() can not get contact payload by wrong id: R:10855009180534640
    at callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/call.ts:81:17)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client.ts:356:55)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client-interceptors.ts:455:34)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client-interceptors.ts:417:48)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/src/resolving-call.ts:110:24
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
for call at
    at ServiceClientImpl.makeUnaryRequest (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client.ts:326:30)
    at ServiceClientImpl.contactPayload (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/make-client.ts:189:15)
    at node:internal/util:360:7
    at new Promise (<anonymous>)
    at bound  (node:internal/util:346:12)
    at PuppetService.contactRawPayload (file:///home/friday/git/friday/node_modules/wechaty-puppet-service/src/client/puppet-service.ts:663:6)
    at PuppetService.contactPayload (file:///home/friday/git/friday/node_modules/wechaty-puppet/src/mixins/contact-mixin.ts:298:26)
    at WechatifiedUserClass.ready (file:///home/friday/git/friday/node_modules/wechaty/src/user-modules/contact.ts:699:22)
    at Function.find (file:///home/friday/git/friday/node_modules/wechaty/src/user-modules/contact.ts:114:9)
    at PuppetService.<anonymous> (file:///home/friday/git/friday/node_modules/wechaty/src/wechaty-mixins/puppet-mixin.ts:441:37)

To-be-fixed: `uncaughtException` on Friday

Version:

"wechaty": "^1.18.1",

After the uncaughtException, the Node.js program exited and will not be able to recover itself anymore:

18:28:40 VERB PuppetService roomMemberList(19594529030@chatroom)
18:28:40 VERB Room memberList()
18:28:40 VERB PuppetGitter roomMemberList(573324fcc43b8c60197242bf)
18:28:40 ERR GetGitterMembersCountHandler getGitterMemberIds() got 0 members
18:28:40 ERR GetWhatsAppMembersCountHandler getWhatsAppMemberIds() bot is not logged in yet
18:28:43 ERR Config ###########################
18:28:43 ERR Config Wechaty uncaughtException: Error: 14 UNAVAILABLE: read ETIMEDOUT
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/call.ts:81:24)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client.ts:577:32)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client-interceptors.ts:424:48)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/src/call-stream.ts:330:24
    at processTicksAndRejections (node:internal/process/task_queues:78:11) uncaughtException
18:28:43 ERR Config ###########################
finis Caught exception: Error: 14 UNAVAILABLE: read ETIMEDOUT
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/call.ts:81:24)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client.ts:577:32)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client-interceptors.ts:424:48)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/src/call-stream.ts:330:24
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 14,
  details: 'read ETIMEDOUT',
  metadata: Metadata { internalRepr: Map(0) {}, options: {} }
} Exception origin: uncaughtException
18:28:43 INFO RestartReporter finis(99, uncaughtException)
18:28:43 INFO RestartReporter finis() announce exiting
18:28:43 ERR Config ###########################
18:28:43 ERR Config Wechaty uncaughtException: Error: 14 UNAVAILABLE: read ETIMEDOUT
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/call.ts:81:24)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client.ts:577:32)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client-interceptors.ts:424:48)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/src/call-stream.ts:330:24
    at processTicksAndRejections (node:internal/process/task_queues:78:11) uncaughtException
18:28:43 ERR Config ###########################
finis Caught exception: Error: 14 UNAVAILABLE: read ETIMEDOUT
    at Object.callErrorFromStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/call.ts:81:24)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client.ts:577:32)
    at Object.onReceiveStatus (/home/friday/git/friday/node_modules/@grpc/grpc-js/src/client-interceptors.ts:424:48)
    at /home/friday/git/friday/node_modules/@grpc/grpc-js/src/call-stream.ts:330:24
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 14,
  details: 'read ETIMEDOUT',
  metadata: Metadata { internalRepr: Map(0) {}, options: {} }
} Exception origin: uncaughtException
18:28:43 WARN RestartReporter finis(99, uncaughtException) called again when quiting... hard exit
finis: exit code: 1
18:28:43 WARN RestartReporter finis(1, exit) called again when quiting... hard exit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.