wechaty / puppet-supports

Wechaty Puppet Services (WPS)
https://wechaty.js.org/docs/puppet-services/
Apache License 2.0
33 stars 4 forks source link

[BUG]WorkPro:发送zip文件出错 #306

Closed ccgulan closed 10 months ago

ccgulan commented 11 months ago

开始回复私聊问题:FileBox#Url Error: 12 UNIMPLEMENTED: The server does not implement the method /wechaty.Puppet/MessageSendFileStream at callErrorFromStatus (E:\wechat-robot-worpro\node_modules\@grpc\grpc-js\build\src\call.js:31:19) at Object.onReceiveStatus (E:\wechat-robot-worpro\node_modules\@grpc\grpc-js\build\src\client.js:269:76) at Object.onReceiveStatus (E:\wechat-robot-worpro\node_modules\@grpc\grpc-js\build\src\client-interceptors.js:360:141) at Object.onReceiveStatus (E:\wechat-robot-worpro\node_modules\@grpc\grpc-js\build\src\client-interceptors.js:323:181) at E:\wechat-robot-worpro\node_modules\@grpc\grpc-js\build\src\resolving-call.js:93:78 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) for call at at ServiceClientImpl.makeClientStreamRequest (E:\wechat-robot-worpro\node_modules\@grpc\grpc-js\build\src\client.js:237:34) at ServiceClientImpl.messageSendFileStream (E:\wechat-robot-worpro\node_modules\@grpc\grpc-js\build\src\make-client.js:105:19) at response (file:///E:/wechat-robot-worpro/node_modules/wechaty-puppet-service/dist/esm/src/client/puppet-service.js:1335:52) at new Promise () at PuppetService.messageSendFileStream (file:///E:/wechat-robot-worpro/node_modules/wechaty-puppet-service/dist/esm/src/client/puppet-service.js:1334:32) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async file:///E:/wechat-robot-worpro/node_modules/wechaty/dist/esm/src/sayable/deliver-sayable.js:22:17 at async WechatifiedUserClass.say (file:///E:/wechat-robot-worpro/node_modules/wechaty/dist/esm/src/user-modules/contact.js:274:23) at async Timeout.call [as _onTimeout] (file:///E:/wechat-robot-worpro/on-message.js:926:13) { code: 12, details: 'The server does not implement the method /wechaty.Puppet/MessageSendFileStream', metadata: Metadata { internalRepr: Map(3) { 'content-type' => [Array], 'date' => [Array], 'authorization' => [Array] }, options: {} }, progress: 'PROCESSED' } Unhandled Rejection at: Promise {

TypeError: Cannot read properties of undefined (reading 'state') at RetryingCall.sendMessageWithContext (E:\wechat-robot-worpro\node_modules\@grpc\grpc-js\build\src\retrying-call.js:542:22) at E:\wechat-robot-worpro\node_modules\@grpc\grpc-js\build\src\resolving-call.js:105:19 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) } reason: TypeError: Cannot read properties of undefined (reading 'state') at RetryingCall.sendMessageWithContext (E:\wechat-robot-worpro\node_modules\@grpc\grpc-js\build\src\retrying-call.js:542:22) at E:\wechat-robot-worpro\node_modules\@grpc\grpc-js\build\src\resolving-call.js:105:19 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
su-chang commented 11 months ago

@ccgulan 麻烦提供下wechaty等相关依赖的版本信息

ccgulan commented 11 months ago

@ccgulan 麻烦提供下wechaty等相关依赖的版本信息

@su-chang │ │ ├─┬ wechaty-grpc@1.5.2 │ │ │ ├── @grpc/grpc-js@1.8.4 deduped │ │ │ ├── google-protobuf@3.21.2 │ │ │ └── stronger-typed-streams@0.2.0 deduped │ │ ├── wechaty-puppet@1.20.2 deduped │ │ ├── wechaty-redux@1.20.2 deduped │ │ └── wechaty-token@1.1.2 deduped │ ├─┬ wechaty-puppet-wechat4u@1.11.1 │ │ ├── @alloc/quick-lru@5.2.0 deduped │ │ ├─┬ promise-retry@2.0.1 │ │ │ ├── err-code@2.0.3 │ │ │ └── retry@0.12.0 │ │ ├─┬ wechat4u@0.7.9 │ │ │ ├── axios@1.2.2 deduped │ │ │ ├─┬ bl@1.2.3 │ │ │ │ ├── readable-stream@2.3.7 │ │ │ │ └── safe-buffer@5.2.1 deduped │ │ │ ├─┬ debug@2.6.9 │ │ │ │ └── ms@2.0.0 │ │ │ ├── form-data@2.3.3 deduped │ │ │ ├── lodash@4.17.21 deduped │ │ │ └── mime@1.6.0 │ │ └── wechaty-puppet@1.20.2 deduped │ ├── wechaty-puppet@1.20.2 deduped │ ├─┬ wechaty-token@1.1.2 │ │ ├── brolog@1.14.2 deduped │ │ ├─┬ cmd-ts@0.7.0 │ │ │ ├── chalk@4.1.2 deduped │ │ │ ├── debug@4.3.4 deduped │ │ │ ├── didyoumean@1.2.2 deduped │ │ │ └── strip-ansi@6.0.1 deduped │ │ ├── cockatiel@2.0.2 deduped │ │ └── uuid@8.3.2 deduped

su-chang commented 11 months ago

@ccgulan 建议使用@juzi这个scope下的wechaty,wechaty-puppet-service等依赖包

ccgulan commented 11 months ago

wechaty

@su-chang 使用了@juzi出现如下错误: node:internal/errors:490 ErrorCaptureStackTrace(err); ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'wechaty' imported from E:\wechat-robot-worpro\bot.js at new NodeError (node:internal/errors:399:5) at packageResolve (node:internal/modules/esm/resolve:889:9) at moduleResolve (node:internal/modules/esm/resolve:938:20) at defaultResolve (node:internal/modules/esm/resolve:1153:11) at nextResolve (node:internal/modules/esm/loader:163:28) at ESMLoader.resolve (node:internal/modules/esm/loader:838:30) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18) at ModuleWrap. (node:internal/modules/esm/module_job:77:40) at link (node:internal/modules/esm/module_job:76:36) { code: 'ERR_MODULE_NOT_FOUND' }

依赖包的版本如下: bot@1.18.7 E:\wechat-robot-worpro ├── @chatie/eslint-config@1.2.2 ├── @chatie/git-scripts@0.6.2 ├── @chatie/tsconfig@4.9.1 ├── @juzi/wechaty-grpc@1.0.68 ├── @juzi/wechaty-puppet-service@1.0.79 ├── @juzi/wechaty-puppet@1.0.67 ├── @juzi/wechaty@1.0.74 ├── @typescript-eslint/eslint-plugin@5.51.0 ├── axios@1.2.2 ├── chatgpt@5.0.7 ├── check-node-version@4.2.1 ├── dotenv@16.0.3 ├── eslint-config-standard-with-typescript@34.0.0 ├── eslint-config-standard@17.0.0 ├── eslint-plugin-import@2.27.5 ├── eslint-plugin-n@15.6.1 ├── eslint-plugin-promise@6.1.1 ├── eslint@8.33.0 ├── is-pr@2.0.0 ├── openai@3.1.0 ├── qrcode-terminal@0.12.0 ├── ts-node@10.9.1 ├── typescript@4.9.5 ├── undici@5.20.0 ├── wechaty-puppet-mock@1.18.2 └── xml2js@0.4.23

包的依赖定义如下: "dependencies": { "axios": "^1.2.2", "chatgpt": "^5.0.6", "dotenv": "^16.0.0", "openai": "^3.1.0", "qrcode-terminal": "^0.12.0", "undici": "^5.20.0", "@juzi/wechaty": "^1.0.74", "@juzi/wechaty-grpc": "^1.0.68", "@juzi/wechaty-puppet": "^1.0.67", "@juzi/wechaty-puppet-service": "^1.0.79", "xml2js": "^0.4.23" }, "devDependencies": { "@chatie/eslint-config": "^1.0.4", "@chatie/git-scripts": "^0.6.2", "@chatie/tsconfig": "^4.6.3", "@typescript-eslint/eslint-plugin": "^5.51.0", "check-node-version": "^4.2.1", "eslint": "^8.33.0", "eslint-config-standard": "^17.0.0", "eslint-config-standard-with-typescript": "^34.0.0", "eslint-plugin-import": "^2.27.5", "eslint-plugin-n": "^15.6.1", "eslint-plugin-promise": "^6.1.1", "is-pr": "^2.0.0", "ts-node": "^10.9.1", "typescript": "^4.9.5", "wechaty-puppet-mock": "^1.18.2" },

su-chang commented 11 months ago

@ccgulan bot.js 中看看是否引入的wechaty,而不是@juzi/wechaty,注意包的导入。

ccgulan commented 11 months ago

@ccgulan bot.js 中看看是否引入的wechaty,而不是@juzi/wechaty,注意包的导入。

@su-chang 有如下的引用,是不是有问题? import { ScanStatus, WechatyBuilder, log, } from 'wechaty'

su-chang commented 11 months ago

@ccgulan 是的,需要统一都使用@juzi/wechaty

ccgulan commented 11 months ago

@juzi/wechaty @su-chang 改成了如下引用 import { ScanStatus, WechatyBuilder, log, } from '@juzi/wechaty'

但是出现如下错误: winseruser@e3fjhpwaor01 MINGW64 /e/wechat-robot-worpro (develop/1.0.9) $ export WECHATY_PUPPET_SERVICE_AUTHORITY="token-service-discovery-test.juzibot.com"

winseruser@e3fjhpwaor01 MINGW64 /e/wechat-robot-worpro (develop/1.0.9) $ npm run start

bot@1.18.7 start node bot.js

16:33:29 WARN GrpcManager initClient() TLS: disabled (INSECURE) 16:33:30 INFO StarterBot Starter Bot Started. 16:33:30 INFO StarterBot Contact<效能管家> login GError: message not found for id: 8613e115f77dc1d91e80320f2b50dc25 at GError.from (file:///E:/wechat-robot-worpro/node_modules/gerror/dist/esm/src/gerror/gerror.js:80:23) at PuppetService. (file:///E:/wechat-robot-worpro/node_modules/@juzi/wechaty/dist/esm/src/wechaty-mixins/puppet-mixin.js:227:63) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 2, details: 'GError: message not found for id: 8613e115f77dc1d91e80320f2b50dc25\n' + ' at GError.from (file:///E:/wechat-robot-worpro/node_modules/gerror/dist/esm/src/gerror/gerror.js:80:23)\n' + ' at PuppetService. (file:///E:/wechat-robot-worpro/node_modules/@juzi/wechaty/dist/esm/src/wechaty-mixins/puppet-mixin.js:227:63)\n' + ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)' } GError: message not found for id: f093b8439e089544947107c50b2c4477 at GError.from (file:///E:/wechat-robot-worpro/node_modules/gerror/dist/esm/src/gerror/gerror.js:80:23) at PuppetService. (file:///E:/wechat-robot-worpro/node_modules/@juzi/wechaty/dist/esm/src/wechaty-mixins/puppet-mixin.js:227:63) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 2, details: 'GError: message not found for id: f093b8439e089544947107c50b2c4477\n' + ' at GError.from (file:///E:/wechat-robot-worpro/node_modules/gerror/dist/esm/src/gerror/gerror.js:80:23)\n' + ' at PuppetService. (file:///E:/wechat-robot-worpro/node_modules/@juzi/wechaty/dist/esm/src/wechaty-mixins/puppet-mixin.js:227:63)\n' + ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)' }

hcfw007 commented 11 months ago

这个看起来是消息id没找到,可能是载入历史消息?不确定,如果能正常收到消息可以忽略。

ccgulan commented 11 months ago

这个看起来是消息id没找到,可能是载入历史消息?不确定,如果能正常收到消息可以忽略。

@hcfw007 不正常,不能收到消息

hcfw007 commented 11 months ago

这个看起来是消息id没找到,可能是载入历史消息?不确定,如果能正常收到消息可以忽略。

@hcfw007 不正常,不能收到消息

请添加 WECHATY_LOG=silly 的环境变量启动看看,以提供更详细的日志。

ccgulan commented 11 months ago

@hcfw007 添加 WECHATY_LOG=silly 环境变量 之后的日志 winseruser@e3fjhpwaor01 MINGW64 /e/wechat-robot-worpro (develop/1.0.9) $ export WECHATY_PUPPET_SERVICE_AUTHORITY="token-service-discovery-test.juzibot.com"

winseruser@e3fjhpwaor01 MINGW64 /e/wechat-robot-worpro (develop/1.0.9) $ export WECHATY_LOG=silly

winseruser@e3fjhpwaor01 MINGW64 /e/wechat-robot-worpro (develop/1.0.9) $ npm run start

bot@1.18.7 start node bot.js

18:43:54 SILL Puppet Config: WECHATY_LOG set level to silly 18:43:54 INFO Config registering process.on("unhandledRejection") for development/debug 18:43:54 VERB Config constructor() 18:43:54 VERB PoolifyMixin poolifyMixin(EventEmitter) 18:43:54 VERB WechatifyMixin wechatifyMixin(AbstractPoolifyMixin) 18:43:54 VERB ValidationMixin validationMixin(ContactMixin) 18:43:54 VERB ValidationMixin validationMixin(ContactImplBase) 18:43:54 VERB PoolifyMixin poolifyMixin(ContactImpl) 18:43:54 VERB ValidationMixin validationMixin(ContactSelfMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(FavoriteMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EventEmitter) 18:43:54 VERB ValidationMixin validationMixin(FriendshipMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(ImageMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(LocationMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(PostMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EventEmitter) 18:43:54 VERB ValidationMixin validationMixin(MessageMixin) 18:43:54 VERB ValidationMixin validationMixin(MessageImplBase) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(MiniProgramMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(MomentMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(MoneyMixin) 18:43:54 VERB PoolifyMixin poolifyMixin(EventEmitter) 18:43:54 VERB WechatifyMixin wechatifyMixin(AbstractPoolifyMixin) 18:43:54 VERB ValidationMixin validationMixin(RoomMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(RoomInvitationMixin) 18:43:54 VERB PoolifyMixin poolifyMixin(Object) 18:43:54 VERB WechatifyMixin wechatifyMixin(AbstractPoolifyMixin) 18:43:54 VERB ValidationMixin validationMixin(TagMixin) 18:43:54 VERB ValidationMixin validationMixin(TagImplBase) 18:43:54 VERB PoolifyMixin poolifyMixin(Object) 18:43:54 VERB WechatifyMixin wechatifyMixin(AbstractPoolifyMixin) 18:43:54 VERB ValidationMixin validationMixin(TagGroupMixin) 18:43:54 VERB ValidationMixin validationMixin(TagGroupImplBase) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(UrlLinkMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(DelayMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(ChannelMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(CallRecordMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(ChatHistoryMixin) 18:43:54 VERB WechatyGErrorMixin gErrorMixin(WechatySkeleton) 18:43:54 VERB WechatifyUserModuleMixin wechatifyUserModuleMixin(GErrorMixin) 18:43:54 VERB WechatyIoMixin ioMixin(WechatifyUserModuleMixin) 18:43:54 VERB WechatyPuppetMixin puppetMixin(IoMixin) 18:43:54 VERB WechatyLoginMixin loginMixin(PuppetMixin) 18:43:54 VERB WechatyMiscMixin miscMixin(LoginMixin) 18:43:54 VERB WechatyPluginMixin pluginMixin(MiscMixin) 18:43:54 VERB ValidationMixin validationMixin(WechatyBase) 18:43:54 VERB ValidationMixin validationMixin(WechatyImplBase) 18:43:54 VERB wechaty-puppet-service monkeyPatchMetadataFromHttp2Headers() 18:43:54 SILL Puppet Config: WECHATY_LOG set level to silly 18:43:54 VERB wechaty-puppet-service monkeyPatchMetadataFromHttp2Headers() 18:43:54 INFO Config registering process.on("unhandledRejection") for development/debug 18:43:54 VERB Config constructor() 18:43:54 VERB PoolifyMixin poolifyMixin(EventEmitter) 18:43:54 VERB WechatifyMixin wechatifyMixin(AbstractPoolifyMixin) 18:43:54 VERB ValidationMixin validationMixin(ContactMixin) 18:43:54 VERB ValidationMixin validationMixin(ContactImplBase) 18:43:54 VERB PoolifyMixin poolifyMixin(ContactImpl) 18:43:54 VERB ValidationMixin validationMixin(ContactSelfMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(FavoriteMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EventEmitter) 18:43:54 VERB ValidationMixin validationMixin(FriendshipMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(ImageMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(LocationMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(PostMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EventEmitter) 18:43:54 VERB ValidationMixin validationMixin(MessageMixin) 18:43:54 VERB ValidationMixin validationMixin(MessageImplBase) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(MiniProgramMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(MomentMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(MoneyMixin) 18:43:54 VERB PoolifyMixin poolifyMixin(EventEmitter) 18:43:54 VERB WechatifyMixin wechatifyMixin(AbstractPoolifyMixin) 18:43:54 VERB ValidationMixin validationMixin(RoomMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(RoomInvitationMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB PoolifyMixin poolifyMixin(AbstractWechatifyMixin) 18:43:54 VERB ValidationMixin validationMixin(TagMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(UrlLinkMixin) 18:43:54 VERB WechatifyMixin wechatifyMixin(EmptyBase) 18:43:54 VERB ValidationMixin validationMixin(DelayMixin) 18:43:54 VERB WechatyGErrorMixin gErrorMixin(WechatySkeleton) 18:43:54 VERB WechatifyUserModuleMixin wechatifyUserModuleMixin(GErrorMixin) 18:43:54 VERB WechatyIoMixin ioMixin(WechatifyUserModuleMixin) 18:43:54 VERB WechatyPuppetMixin puppetMixin(IoMixin) 18:43:54 VERB WechatyLoginMixin loginMixin(PuppetMixin) 18:43:54 VERB WechatyMiscMixin miscMixin(LoginMixin) 18:43:54 VERB WechatyPluginMixin pluginMixin(MiscMixin) 18:43:54 VERB ValidationMixin validationMixin(WechatyBase) 18:43:54 VERB ValidationMixin validationMixin(WechatyImplBase) 18:43:55 VERB PuppetServer constructor({endpoint: "undefined", puppet: "undefined", token: "puppetworkpro****"}) 18:43:55 VERB WechatyBuilder singleton() 18:43:55 VERB WechatyBuilder newInstance() 18:43:55 VERB WechatyLoginMixin constructor() 18:43:55 VERB WechatyPuppetMixin construct() 18:43:55 VERB WechatyIoMixin constructor() 18:43:55 VERB WechatifyUserModuleMixin constructor() 18:43:55 VERB WechatySkeleton constructor() 18:43:55 VERB StateSwitch constructor(WechatyReady, "{"log":{"enableTimestamp":true,"logLevel":5,"prefixFilter":{}}}") 18:43:55 VERB WechatySkeleton on(login, listener) registering... listenerCount: 0 18:43:55 VERB WechatySkeleton on(logout, listener) registering... listenerCount: 0 18:43:55 VERB ServiceCtl constructor() 18:43:55 VERB StateSwitch constructor(Wechaty, "{"log":{"enableTimestamp":true,"logLevel":5,"prefixFilter":{}}}") 18:43:55 VERB StateSwitch constructor(WechatyReset, "{"log":{"enableTimestamp":true,"logLevel":5,"prefixFilter":{}}}") 18:43:55 VERB Wechaty constructor() 18:43:55 VERB WechatySkeleton on(scan, listener) registering... listenerCount: 0 18:43:55 VERB WechatySkeleton on(login, listener) registering... listenerCount: 1 18:43:55 VERB WechatySkeleton on(logout, listener) registering... listenerCount: 1 18:43:55 VERB WechatySkeleton on(message, listener) registering... listenerCount: 0 18:43:55 VERB WechatySkeleton on(room-invite, listener) registering... listenerCount: 0 18:43:55 VERB WechatySkeleton on(room-join, listener) registering... listenerCount: 0 18:43:55 VERB WechatySkeleton on(friendship, listener) registering... listenerCount: 0 18:43:55 VERB WechatySkeleton on(error, listener) registering... listenerCount: 0 18:43:55 VERB Wechaty start() 18:43:55 VERB WechatyLoginMixin init() 18:43:55 VERB WechatyPuppetMixin init() 18:43:55 VERB WechatifyUserModuleMixin init() 18:43:55 VERB WechatySkeleton init() 18:43:55 VERB WechatifyUserModuleMixin init() initializing Wechaty User Module (WUM) ... 18:43:55 VERB WechatifyMixin wechatifyUserModule(ContactImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(ContactImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(ContactSelfImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(ContactSelfImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(DelayImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(DelayImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(FriendshipImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(FriendshipImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(ImageImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(ImageImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(LocationImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(LocationImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(MessageImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(MessageImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(MiniProgramImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(MiniProgramImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(PostImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(PostImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(RoomImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(RoomImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(RoomInvitationImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(RoomInvitationImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(TagImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(TagImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(TagGroupImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(TagGroupImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(UrlLinkImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(UrlLinkImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(ChannelImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(ChannelImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(MomentImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(MomentImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(CallRecordImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(CallRecordImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyMixin wechatifyUserModule(ChatHistoryImpl) 18:43:55 VERB WechatifyMixin wechatifyUserModule(ChatHistoryImpl)(Wechaty#03d479da-eed6-4ae3-a088-04d950288ae0(bot)) 18:43:55 VERB WechatifyUserModuleMixin init() initializing Wechaty User Module (WUM) ... done 18:43:55 VERB Wechaty init() Raven disabled (import("raven") failed) 18:43:55 VERB Wechaty init() Raven disabled (import("raven") failed) 18:43:55 VERB WechatyPuppetMixin init() instanciating puppet instance ... 18:43:55 VERB Puppet resolvePuppet({puppet: wechaty-puppet-service, puppetOptions: {"tls":{"disable":true},"timeoutSeconds":240,"token":"puppetworkpro****"}}) 18:43:55 VERB Puppet resolvePuppet() resolving name "wechaty-puppet-service" ... 18:43:55 VERB Puppet resolvePuppetName(wechaty-puppet-service) 18:43:55 VERB Puppet resolvePuppetName(wechaty-puppet-service): ESM resolved 18:43:55 VERB Puppet resolvePuppet() resolving name "wechaty-puppet-service" ... done 18:43:55 VERB Puppet resolvePuppet() instanciating puppet ... 18:43:55 VERB PuppetSkeleton constructor({"tls":{"disable":true},"timeoutSeconds":240,"token":"puppetworkpro****"}) 18:43:55 VERB PuppetMemoryMixin constructor() 18:43:55 VERB PuppetLoginMixin constructor() 18:43:55 VERB PuppetCacheMixin constructor() 18:43:55 VERB PuppetCacheAgent constructor() 18:43:55 VERB PuppetContactMixin constructor() 18:43:55 VERB PuppetRoomMemberMixin constructor() 18:43:55 VERB PuppetRoomMixin constructor() 18:43:55 VERB PuppetFriendshipMixin constructor() 18:43:55 VERB PuppetTagMixin constructor() 18:43:55 VERB PuppetRoomInvitationMixin constructor() 18:43:55 VERB PuppetMessageMixin constructor() 18:43:55 VERB PuppetMiscMixin constructor() 18:43:55 VERB ServiceCtl constructor() 18:43:55 VERB StateSwitch constructor(PuppetServiceMixin, "{"log":{"enableTimestamp":true,"logLevel":5,"prefixFilter":{}}}") 18:43:55 VERB StateSwitch constructor(PuppetServiceMixinReset, "{"log":{"enableTimestamp":true,"logLevel":5,"prefixFilter":{}}}") 18:43:55 VERB PuppetServiceMixin constructor() #0 18:43:55 VERB PuppetWatchdogAgent constructor(c3805d85-7290-45b3-9cef-f01c80acd40f) 18:43:55 VERB PuppetWatchdogAgent constructor() timeout 240 seconds 18:43:55 VERB ReadyMixin constructor() 18:43:55 VERB PuppetPostMixin constructor() 18:43:55 VERB PuppetSayableMixin constructor() 18:43:55 VERB TapMixin constructor() 18:43:55 VERB Puppet constructor({"tls":{"disable":true},"timeoutSeconds":240,"token":"puppetworkpro****"}) 18:43:55 VERB PayloadStore constructor({"token":"puppetworkpro****"}) 18:43:55 SILL PayloadStore constructor() storeDir: "C:\Users\winseruser.wechaty\wechaty-puppet-service\puppetworkpro*****\v1.19" 18:43:55 VERB PuppetService hookPayloadStore() 18:43:55 VERB Puppet resolvePuppet() instanciating puppet ... done 18:43:55 VERB WechatyPuppetMixin init() instanciating puppet instance ... done 18:43:55 VERB WechatyPuppetMixin init() setting memory ... 18:43:55 VERB PuppetMemoryMixin setMemory(bot) 18:43:55 VERB WechatyPuppetMixin init() setting memory ... done 18:43:55 VERB WechatyPuppetMixin init() setting up events ... 18:43:55 VERB WechatyPuppetMixin setupPuppetEvents(Puppet(bot)) 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(friendship) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(login) (listenerCount:1) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(logout) (listenerCount:1) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(message) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(post) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(room-invite) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(room-join) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(room-leave) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(room-topic) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(room-announce) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(scan) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(tag) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(tag-group) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(post-comment) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(post-tap) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(verify-code) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(dirty) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(dong) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(error) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(heartbeat) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(ready) (listenerCount:0) registering... 18:43:55 VERB PuppetMixin setupPuppetEvents() puppet.on(reset) (listenerCount:0) registering... 18:43:55 VERB WechatyPuppetMixin setupPuppetEvents() ... done 18:43:55 VERB WechatyPuppetMixin init() setting up events ... done 18:43:55 VERB WechatyPuppetMixin init() emitting "puppet" event ... 18:43:55 VERB WechatyPuppetMixin init() emitting "puppet" event ... done 18:43:55 VERB ServiceCtl start() 18:43:55 SILL StateSwitch active() is false 18:43:55 SILL StateSwitch inactive() is true 18:43:55 SILL StateSwitch active() is false 18:43:55 VERB StateSwitch active(pending) <- (false) 18:43:55 VERB ServiceCtl start() super.start() ... 18:43:55 VERB WechatyPuppetMixin start() 18:43:55 VERB WechatyPuppetMixin start() super.start() ... 18:43:55 VERB WechatyIoMixin start() 18:43:55 VERB WechatySkeleton start() 18:43:55 VERB WechatyLoginMixin init() 18:43:55 VERB WechatyPuppetMixin init() 18:43:55 VERB WechatifyUserModuleMixin init() 18:43:55 VERB WechatySkeleton init() 18:43:55 VERB WechatifyUserModuleMixin init() Wechaty User Module (WUM)s have already wechatified: skip 18:43:55 VERB WechatyPuppetMixin init() skipped because this puppet has already been inited before. 18:43:55 VERB WechatyPuppetMixin start() super.start() ... done 18:43:55 SILL StateSwitch active() is false 18:43:55 VERB WechatyPuppetMixin start() starting puppet ... 18:43:55 VERB ReadyMixin start() 18:43:55 VERB PuppetServiceMixin start() 18:43:55 VERB ServiceCtl start() 18:43:55 SILL StateSwitch active() is false 18:43:55 SILL StateSwitch inactive() is true 18:43:55 SILL StateSwitch active() is false 18:43:55 VERB StateSwitch active(pending) <- (false) 18:43:55 VERB ServiceCtl start() super.start() ... 18:43:55 VERB PuppetCacheMixin start() 18:43:55 VERB PuppetLoginMixin start() 18:43:55 VERB PuppetMemoryMixin start() 18:43:55 VERB PuppetSkeleton start() 18:43:55 VERB PuppetCacheAgent start() 18:43:55 VERB PuppetCacheMixin start() "dirty" event listener added 18:43:55 VERB ServiceCtl start() super.start() ... done 18:43:55 VERB ServiceCtl start() this.onStart() ... 18:43:55 VERB PuppetService onStart() 18:43:55 VERB PuppetService start() instanciating GrpcManager ... 18:43:55 VERB GrpcManager constructor({"tls":{"disable":true},"timeoutSeconds":240,"token":"puppetworkpro"}) 18:43:55 VERB GrpcManager constructor() tlsRootCert(hash): "88ab8b62777f0fb1179ec567c5019c31d646428cc0a3fdb007fcffa1e9fac5a8" 18:43:55 VERB GrpcManager constructor() token: "puppetworkpro****" 18:43:55 VERB GrpcManager constructor() endpoint: "wechaty://token-service-discovery-test.juzibot.com/puppetworkpro" 18:43:55 VERB GrpcManager constructor() disableTls: "true" 18:43:55 VERB GrpcManager constructor() serverName(SNI): "puppet_workpro" 18:43:55 VERB PuppetService start() instanciating GrpcManager ... done 18:43:55 VERB PuppetService start() setting up bridge grpc event stream ... 18:43:55 VERB PuppetService bridgeGrpcEventStream(client) 18:43:55 VERB PuppetService start() setting up bridge grpc event stream ... done 18:43:55 VERB PuppetService start() starting grpc manager... 18:43:55 VERB GrpcManager start() 18:43:55 VERB GrpcManager start() initializing client ... 18:43:55 VERB GrpcManager initClient() 18:43:55 WARN GrpcManager initClient() TLS: disabled (INSECURE) 18:43:55 VERB GrpcManager initClient() ... done 18:43:55 VERB GrpcManager start() initializing client ... done 18:43:55 VERB GrpcManager start() starting stream ... 18:43:55 VERB GrpcManager startStream() 18:43:55 VERB GrpcManager startStream() grpc -> event() ... 18:43:55 VERB GrpcManager startStream() grpc -> event() ... done 18:43:55 VERB GrpcManager startStream() grpc -> event peeking data or timeout ... 18:43:55 VERB GrpcManager startStream() grpc -> event peeking data or timeout ... data peeked 18:43:55 VERB GrpcManager startStream() initializing event stream ... 18:43:55 VERB GrpcManager startStream() initializing event stream ... done 18:43:55 VERB GrpcManager startStream() sending back the peeked data ... 18:43:55 VERB PuppetService onGrpcStreamEvent({type:EVENT_TYPE_HEARTBEAT(1), payload(len:38)}) 18:43:55 SILL PuppetService onGrpcStreamEvent({type:EVENT_TYPE_HEARTBEAT(1), payload:"{"data":"gRPC event stream connected"}"}) 18:43:55 VERB GrpcManager startStream() sending back the peeked data ... done 18:43:55 VERB GrpcManager startStream() ... done 18:43:55 VERB GrpcManager start() starting stream ... done 18:43:55 VERB GrpcManager start() calling grpc server: start() ... 18:43:55 VERB PuppetService onGrpcStreamEvent({type:EVENT_TYPE_LOGIN(25), payload(len:32)}) 18:43:55 SILL PuppetService onGrpcStreamEvent({type:EVENT_TYPE_LOGIN(25), payload:"{"contactId":"1688855499456470"}"}) 18:43:55 VERB PuppetLoginMixin login(1688855499456470) 18:43:55 VERB PuppetService hookPayloadStore() this.on(login) contactId: "1688855499456470" 18:43:55 VERB PayloadStore start(1688855499456470) 18:43:55 SILL Contact find({"id":"1688855499456470"}) 18:43:55 SILL PuppetLoginMixin get currentUserId() 18:43:55 VERB PoolifyMixin get pool() init pool 18:43:55 SILL Contact constructor(1688855499456470) 18:43:55 SILL Contact ready() @ Puppet(bot) with id="1688855499456470" 18:43:55 SILL PuppetContactMixin contactPayload(1688855499456470) cache MISS 18:43:55 VERB PuppetService contactRawPayload(1688855499456470) 18:43:55 VERB GrpcManager start() calling grpc server: start() ... done 18:43:55 VERB GrpcManager start() ... done 18:43:55 VERB PuppetService start() starting grpc manager... done 18:43:55 VERB PuppetService onStart() ... done 18:43:55 VERB ServiceCtl start() this.onStart() ... done 18:43:55 SILL StateSwitch active() is pending 18:43:55 VERB StateSwitch active(true) <- (pending) 18:43:55 VERB ServiceCtl start() ... done 18:43:55 VERB PuppetWatchdogAgent start() "heartbeat" event listener added 18:43:55 VERB PuppetWatchdogAgent start() "reset" event listener added 18:43:55 VERB WechatyPuppetMixin start() starting puppet ... done 18:43:55 VERB ServiceCtl start() super.start() ... done 18:43:55 VERB ServiceCtl start() this.onStart() ... 18:43:55 VERB Wechaty onStart() 18:43:55 VERB Wechaty (bot) onStart() v1.0.74 is starting... 18:43:55 VERB Wechaty id: 03d479da-eed6-4ae3-a088-04d950288ae0 18:43:55 VERB Wechaty onStart() ... done 18:43:55 VERB ServiceCtl start() this.onStart() ... done 18:43:55 SILL StateSwitch active() is pending 18:43:55 VERB StateSwitch active(true) <- (pending) 18:43:55 VERB ServiceCtl start() ... done 18:43:55 INFO StarterBot Starter Bot Started. 18:43:55 SILL PuppetService contactRawPayload(1688855499456470) cache SET 18:43:55 SILL PuppetContactMixin contactPayload(1688855499456470) cache SET 18:43:55 SILL PuppetLoginMixin get currentUserId() 18:43:55 INFO StarterBot Contact<效能管家> login 18:44:09 VERB PuppetService onGrpcStreamEvent({type:EVENT_TYPE_MESSAGE(2), payload(len:48)}) 18:44:09 SILL PuppetService onGrpcStreamEvent({type:EVENT_TYPE_MESSAGE(2), payload:"{"messageId":"0d3861d9a2393387928fd68433f9752a"}"}) 18:44:09 VERB Message find({"id":"0d3861d9a2393387928fd68433f9752a"}) 18:44:09 VERB Message findAll({"id":"0d3861d9a2393387928fd68433f9752a"}) 18:44:09 VERB PuppetMessageMixin messageSearch({"id":"0d3861d9a2393387928fd68433f9752a"}) 18:44:09 VERB PuppetMessageMixin messagePayload(0d3861d9a2393387928fd68433f9752a) 18:44:09 SILL PuppetMessageMixin messagePayloadCache(0d3861d9a2393387928fd68433f9752a) cache MISS 18:44:09 VERB PuppetService messageRawPayload(0d3861d9a2393387928fd68433f9752a) 18:44:09 VERB PuppetMessageMixin messageSearch() payload not found for id "0d3861d9a2393387928fd68433f9752a" GError: message not found for id: 0d3861d9a2393387928fd68433f9752a at GError.from (file:///E:/wechat-robot-worpro/node_modules/gerror/dist/esm/src/gerror/gerror.js:80:23) at PuppetService. (file:///E:/wechat-robot-worpro/node_modules/@juzi/wechaty/dist/esm/src/wechaty-mixins/puppet-mixin.js:227:63) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 2, details: 'GError: message not found for id: 0d3861d9a2393387928fd68433f9752a\n' + ' at GError.from (file:///E:/wechat-robot-worpro/node_modules/gerror/dist/esm/src/gerror/gerror.js:80:23)\n' + ' at PuppetService. (file:///E:/wechat-robot-worpro/node_modules/@juzi/wechaty/dist/esm/src/wechaty-mixins/puppet-mixin.js:227:63)\n' + ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)' } 18:44:10 VERB PuppetService onGrpcStreamEvent({type:EVENT_TYPE_HEARTBEAT(1), payload(len:28)}) 18:44:10 SILL PuppetService onGrpcStreamEvent({type:EVENT_TYPE_HEARTBEAT(1), payload:"{"data":"regular heartbeat"}"}) 18:44:10 VERB PuppetService onGrpcStreamEvent({type:EVENT_TYPE_READY(23), payload(len:21)}) 18:44:10 SILL PuppetService onGrpcStreamEvent({type:EVENT_TYPE_READY(23), payload:"{"data":"data ready"}"}) 18:44:10 SILL WechatyPuppetMixin __setupPuppetEvents() puppet.on(ready) 18:44:18 VERB PuppetService onGrpcStreamEvent({type:EVENT_TYPE_MESSAGE(2), payload(len:48)}) 18:44:18 SILL PuppetService onGrpcStreamEvent({type:EVENT_TYPE_MESSAGE(2), payload:"{"messageId":"b4925869af2094c16e8ae12e7d58e5fc"}"}) 18:44:18 VERB Message find({"id":"b4925869af2094c16e8ae12e7d58e5fc"}) 18:44:18 VERB Message findAll({"id":"b4925869af2094c16e8ae12e7d58e5fc"}) 18:44:18 VERB PuppetMessageMixin messageSearch({"id":"b4925869af2094c16e8ae12e7d58e5fc"}) 18:44:18 VERB PuppetMessageMixin messagePayload(b4925869af2094c16e8ae12e7d58e5fc) 18:44:18 SILL PuppetMessageMixin messagePayloadCache(b4925869af2094c16e8ae12e7d58e5fc) cache MISS 18:44:18 VERB PuppetService messageRawPayload(b4925869af2094c16e8ae12e7d58e5fc) 18:44:18 VERB PuppetMessageMixin messageSearch() payload not found for id "b4925869af2094c16e8ae12e7d58e5fc" GError: message not found for id: b4925869af2094c16e8ae12e7d58e5fc at GError.from (file:///E:/wechat-robot-worpro/node_modules/gerror/dist/esm/src/gerror/gerror.js:80:23) at PuppetService. (file:///E:/wechat-robot-worpro/node_modules/@juzi/wechaty/dist/esm/src/wechaty-mixins/puppet-mixin.js:227:63) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 2, details: 'GError: message not found for id: b4925869af2094c16e8ae12e7d58e5fc\n' + ' at GError.from (file:///E:/wechat-robot-worpro/node_modules/gerror/dist/esm/src/gerror/gerror.js:80:23)\n' + ' at PuppetService. (file:///E:/wechat-robot-worpro/node_modules/@juzi/wechaty/dist/esm/src/wechaty-mixins/puppet-mixin.js:227:63)\n' + ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)' } 18:44:25 VERB PuppetService onGrpcStreamEvent({type:EVENT_TYPE_HEARTBEAT(1), payload(len:28)}) 18:44:25 SILL PuppetService onGrpcStreamEvent({type:EVENT_TYPE_HEARTBEAT(1), payload:"{"data":"regular heartbeat"}"}) 18:44:25 SILL StateSwitch active() is false 18:44:25 VERB StateSwitch active(true) <- (false)

hcfw007 commented 11 months ago

你这边什么时候不使用?我能连上接两条消息看看吗?

ccgulan commented 11 months ago

你这边什么时候不使用?我能连上接两条消息看看吗? @hcfw007 现在没有用@juzi/wechaty,用的是wechaty 我这边退出来吗?要怎么配合?

hcfw007 commented 11 months ago

你这边什么时候不使用?我能连上接两条消息看看吗? @hcfw007 现在没有用@juzi/wechaty,用的是wechaty 我这边退出来吗?要怎么配合?

不需要配合,只是这段时间你没法使用来发消息,所以看你什么时候方便。

ccgulan commented 11 months ago

你这边什么时候不使用?我能连上接两条消息看看吗?

我这边退出来吗?

你这边什么时候不使用?我能连上接两条消息看看吗? @hcfw007 现在没有用@juzi/wechaty,用的是wechaty 我这边退出来吗?要怎么配合?

不需要配合,只是这段时间你没法使用来发消息,所以看你什么时候方便。

请问需要多少长时间?

hcfw007 commented 11 months ago

你这边什么时候不使用?我能连上接两条消息看看吗?

我这边退出来吗?

你这边什么时候不使用?我能连上接两条消息看看吗? @hcfw007 现在没有用@juzi/wechaty,用的是wechaty 我这边退出来吗?要怎么配合?

不需要配合,只是这段时间你没法使用来发消息,所以看你什么时候方便。

请问需要多少长时间?

不超过20分钟吧

ccgulan commented 11 months ago

好的,我那我马上退出来

你这边什么时候不使用?我能连上接两条消息看看吗?

我这边退出来吗?

你这边什么时候不使用?我能连上接两条消息看看吗? @hcfw007 现在没有用@juzi/wechaty,用的是wechaty 我这边退出来吗?要怎么配合?

不需要配合,只是这段时间你没法使用来发消息,所以看你什么时候方便。

请问需要多少长时间?

不超过20分钟吧

好的,我那我马上退出来

hcfw007 commented 11 months ago

这个我连上了但目前没收到消息。你可以在手机上给内部联系人或者自己的好友发一下消息?这种行为对于token来说也是接收消息。

hcfw007 commented 11 months ago

image

hcfw007 commented 11 months ago

我这边是正常的。建议删除node_modules重新安装依赖试试?

ccgulan commented 11 months ago

我这边是正常的。建议删除node_modules重新安装依赖试试?

行,那我晚上再试试,以下引用和依赖,帮忙看一下有没有问题

import { ScanStatus, WechatyBuilder, log, } from '@juzi/wechaty'

"dependencies": { "axios": "^1.2.2", "chatgpt": "^5.0.6", "dotenv": "^16.0.0", "openai": "^3.1.0", "qrcode-terminal": "^0.12.0", "undici": "^5.20.0", "@juzi/wechaty": "^1.0.74", "@juzi/wechaty-grpc": "^1.0.68", "@juzi/wechaty-puppet": "^1.0.67", "@juzi/wechaty-puppet-service": "^1.0.79", "xml2js": "^0.4.23" }, "devDependencies": { "@chatie/eslint-config": "^1.0.4", "@chatie/git-scripts": "^0.6.2", "@chatie/tsconfig": "^4.6.3", "@typescript-eslint/eslint-plugin": "^5.51.0", "check-node-version": "^4.2.1", "eslint": "^8.33.0", "eslint-config-standard": "^17.0.0", "eslint-config-standard-with-typescript": "^34.0.0", "eslint-plugin-import": "^2.27.5", "eslint-plugin-n": "^15.6.1", "eslint-plugin-promise": "^6.1.1", "is-pr": "^2.0.0", "ts-node": "^10.9.1", "typescript": "^4.9.5", "wechaty-puppet-mock": "^1.18.2" },

ccgulan commented 11 months ago

我这边是正常的。建议删除node_modules重新安装依赖试试? @hcfw007

删除node_modules重新安装依赖之后出现如下错误,能不能发一个@juzi/wechaty的示例工程我这边测试一下

winseruser@e3fjhpwaor01 MINGW64 /e/wechat-robot-worpro_test $ npm run start

bot@1.18.7 start node bot.js

15:07:41 ERR Puppet resolvePuppetName Failed to import Wechaty Puppet Provider (WPP) NPM module: "wechaty-puppet-service" Please make sure:

  1. it has been installed correctly. (run npm install wechaty-puppet-service if it doesn't)
  2. "wechaty-puppet-service" is a valid Wechaty Puppet Provider (WPP).

learn more about Wechaty Puppet Providers (WPP) from the official website: https://wechaty.js.org/docs/puppet-providers

15:07:41 ERR StarterBot Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'wechaty-puppet-service' imported from E:\wechat-robot-worpro_test\node_modules\@juzi\wechaty-puppet\dist\esm\src\puppet\puppet-resolver.js

hcfw007 commented 11 months ago

看报错你在build Wechaty的时候使用了 wechaty-puppet-service,实际应该使用 '@juzi/wechaty-puppet-service'

可以试试这个 https://github.com/codespaces/new?hide_repo_select=true&ref=latest-features&repo=581586825&machine=basicLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=SouthEastAsia

ccgulan commented 11 months ago

看报错你在build Wechaty的时候使用了 wechaty-puppet-service,实际应该使用 '@juzi/wechaty-puppet-service'

可以试试这个 https://github.com/codespaces/new?hide_repo_select=true&ref=latest-features&repo=581586825&machine=basicLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=SouthEastAsia

@hcfw007

用@juzi/wechaty能够正常发送和接受消息了,但是发送zip文件仍然异常,另外有些pdf文件也同样发送异常,文件链接和异常如下: 发送的文件链接: https://sep.supcon.com:8080/cdshome/files/20230926/因为系统编码导致无法安装问题.pdf https://sep.supcon.com:8080/cdshome/files/20231009/27013ff7efdd4d85979680dd9c788e84/magic-api-231009.zip

异常信息如下: 开始回复私聊问题:FileBox#Url 18:26:08 INFO PuppetService messageSendFile(1688855645429683, FileBox#Url) about to call grpc Error: 13 INTERNAL: Upload file failed! uploadFile failed! retCode === -5103058 at callErrorFromStatus (E:\wechat-robot-worpro_test\node_modules\@grpc\grpc-js\build\src\call.js:31:19) at Object.onReceiveStatus (E:\wechat-robot-worpro_test\node_modules\@grpc\grpc-js\build\src\client.js:192:76) at Object.onReceiveStatus (E:\wechat-robot-worpro_test\node_modules\@grpc\grpc-js\build\src\client-interceptors.js:360:141) at Object.onReceiveStatus (E:\wechat-robot-worpro_test\node_modules\@grpc\grpc-js\build\src\client-interceptors.js:323:181) at E:\wechat-robot-worpro_test\node_modules\@grpc\grpc-js\build\src\resolving-call.js:93:78 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) for call at at ServiceClientImpl.makeUnaryRequest (E:\wechat-robot-worpro_test\node_modules\@grpc\grpc-js\build\src\client.js:160:34) at ServiceClientImpl.messageSendFile (E:\wechat-robot-worpro_test\node_modules\@grpc\grpc-js\build\src\make-client.js:105:19) at node:internal/util:375:7 at new Promise () at bound (node:internal/util:361:12) at PuppetService.messageSendFile (file:///E:/wechat-robot-worpro_test/node_modules/@juzi/wechaty-puppet-service/dist/esm/src/client/puppet-service.js:1015:44) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async file:///E:/wechat-robot-worpro_test/node_modules/@juzi/wechaty/dist/esm/src/sayable/deliver-sayable.js:25:17 at async WechatifiedUserClass.say (file:///E:/wechat-robot-worpro_test/node_modules/@juzi/wechaty/dist/esm/src/user-modules/contact.js:306:23) at async Timeout.call [as _onTimeout] (file:///E:/wechat-robot-worpro_test/on-message.js:926:13) { code: 13, details: 'Upload file failed! uploadFile failed! retCode === -5103058', metadata: Metadata { internalRepr: Map(3) { 'content-type' => [Array], 'date' => [Array], 'authorization' => [Array] }, options: {} }, progress: 'PROCESSED' } 18:28:08 INFO PuppetService received grpc event EVENT_TYPE_MESSAGE on Tue Oct 31 2023 18:28:08 GMT+0800 (中国标准时间), content: "{\"messageId\":\"561982d71d1f5597e73c4c536364c7ef\"}", seq: 14096, timestamp: 1698748088273 18:28:08 INFO getMiscellaneousStoreData() timestamp: 1698747967777, seq: 14095 私聊提问:因为系统编码导致无法安装问题 头两位:因为 综合管理标志串:dd 私聊提问:因为系统编码导致无法安装问题 3 https://sep.supcon.com:8080/cdshome/files/20230926/因为系统编码导致无法安装问题.pdf 开始回复私聊问题:FileBox#Url<因为系统编码导致无法安装问题.pdf> 18:28:08 INFO PuppetService messageSendFile(1688855645429683, FileBox#Url<因为系统编码导致无法安装问题.pdf>) about to call grpc Error: 13 INTERNAL: Upload file failed! uploadFile failed! retCode === -5103058 at callErrorFromStatus (E:\wechat-robot-worpro_test\node_modules\@grpc\grpc-js\build\src\call.js:31:19) at Object.onReceiveStatus (E:\wechat-robot-worpro_test\node_modules\@grpc\grpc-js\build\src\client.js:192:76) at Object.onReceiveStatus (E:\wechat-robot-worpro_test\node_modules\@grpc\grpc-js\build\src\client-interceptors.js:360:141) at Object.onReceiveStatus (E:\wechat-robot-worpro_test\node_modules\@grpc\grpc-js\build\src\client-interceptors.js:323:181) at E:\wechat-robot-worpro_test\node_modules\@grpc\grpc-js\build\src\resolving-call.js:93:78 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) for call at at ServiceClientImpl.makeUnaryRequest (E:\wechat-robot-worpro_test\node_modules\@grpc\grpc-js\build\src\client.js:160:34) at ServiceClientImpl.messageSendFile (E:\wechat-robot-worpro_test\node_modules\@grpc\grpc-js\build\src\make-client.js:105:19) at node:internal/util:375:7 at new Promise () at bound (node:internal/util:361:12) at PuppetService.messageSendFile (file:///E:/wechat-robot-worpro_test/node_modules/@juzi/wechaty-puppet-service/dist/esm/src/client/puppet-service.js:1015:44) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async file:///E:/wechat-robot-worpro_test/node_modules/@juzi/wechaty/dist/esm/src/sayable/deliver-sayable.js:25:17 at async WechatifiedUserClass.say (file:///E:/wechat-robot-worpro_test/node_modules/@juzi/wechaty/dist/esm/src/user-modules/contact.js:306:23) at async Timeout.call [as _onTimeout] (file:///E:/wechat-robot-worpro_test/on-message.js:926:13) { code: 13, details: 'Upload file failed! uploadFile failed! retCode === -5103058', metadata: Metadata { internalRepr: Map(3) { 'content-type' => [Array], 'date' => [Array], 'authorization' => [Array] }, options: {} }, progress: 'PROCESSED' } 18:29:30 INFO PuppetService received grpc event EVENT_TYPE_MESSAGE on Tue Oct 31 2023 18:29:30 GMT+0800 (中国标准时间), content: "{\"messageId\":\"5993712c24837373321bb3141adc52a3\"}", seq: 14097, timestamp: 1698748170273 18:29:30 INFO getMiscellaneousStoreData() timestamp: 1698748088273, seq: 14096

hcfw007 commented 11 months ago

这个错误码是上传文件时企微返回的。这两个文件手机上能否发送?

hcfw007 commented 11 months ago

推测是文件太大了,推荐发送25MB以内的文件。

ccgulan commented 11 months ago

推测是文件太大了,推荐发送25MB以内的文件。

@hcfw007

手机上能正常发送的 我也推测可能是文件过大的原因,因此做了以下的代码进行限制,但是不起作用,我跟踪了一下,发现是file.size=-1,不知道是什么缘故

    const file = FileBox.fromUrl(encodeURI(filePath),filePath);
    if(file.size && file.size > 26214400){
      return "文件内容过大,请使用以下地址下载:" + filePath
    }
hcfw007 commented 11 months ago

这个size需要await file.ready()才能查询,ready会通过head方法去请求服务器资源的长度。(也需要OSS支持head才行)

huan commented 11 months ago

Maybe we should consider throwing an Exception when calling the size() because the FileBox is not ready? It should decrease the confusion like this issue when lazy loading the URL type.

ccgulan commented 10 months ago

这个size需要await file.ready()才能查询,ready会通过head方法去请求服务器资源的长度。(也需要OSS支持head才行)

@huan @hcfw007 谢谢了

ccgulan commented 10 months ago

这个size需要await file.ready()才能查询,ready会通过head方法去请求服务器资源的长度。(也需要OSS支持head才行) @hcfw007 加入了await file.read(),size还是获取不到,应该是我们这边的文件不支持,因为我换了网络文件是能够获取到大小的。 问题是,我们库里头有很多文件大于20M的,请问你们这边能支持一下大文件吗,因为微信本身是支持200M以下的文件的。

hcfw007 commented 10 months ago

可以支持大文件,但前提是大文件能获取到大小。因为企微这边对于不同大小的文件要调用不同的方法,如果获得不了大小,会默认调用小文件的方法,就走不通了。

ccgulan commented 10 months ago

@

可以支持大文件,但前提是大文件能获取到大小。因为企微这边对于不同大小的文件要调用不同的方法,如果获得不了大小,会默认调用小文件的方法,就走不通了。

@hcfw007 那我自己这边能控制用不同的方法吗

hcfw007 commented 10 months ago

@

可以支持大文件,但前提是大文件能获取到大小。因为企微这边对于不同大小的文件要调用不同的方法,如果获得不了大小,会默认调用小文件的方法,就走不通了。

@hcfw007 那我自己这边能控制用不同的方法吗

不能的。

su-chang commented 10 months ago

暂无反馈,关闭该issue。