juzibot / donut-tester

40 stars 4 forks source link

Database is not open #4

Closed su-chang closed 4 years ago

su-chang commented 4 years ago

Important:Please file the issue follow the template, or we won't help you to solve the problem.

0. Report Issue Guide

  1. Please run the following command and check whether the problem has been fixed:

    rm -rf package-lock.json
    rm -rf node_modules
    npm install
  2. Please search in FAQ List first, and make sure your problem has not been solved before.

  3. Please search in the issue first, and make sure your problem had not been reported before

1. Versions

2. Describe the bug

Give a clear and concise description of what the bug is.

3. To Reproduce

This part is very important: if you can not provide any reproduce steps, then the problem will be very hard to be recognized.

Steps to reproduce the behavior:

  1. run '...'
  2. ...
  3. ...

4. Expected behavior

Give a clear and concise description of what you expected to happen.

5. Actual behavior

If applicable, add screenshots to help explain your problem. But do not paste log screenshots here.

6. Full Output Logs

Set env WECHATY_LOG=silly in order to set log level to silly, then we can get the full log (If you dosen't set log env, log level is info as default, we cannot get the full log)

We need full log instead of log screenshot or log fragments!

Show Logs ```shell $ WECHATY_LOG=silly node yourbot.js Question: Paste your FULL(DO NOT ONLY PROVIDE FRAGMENTS) log messages Answer: 17:36:24 VERB EventStreamManager grpcEmit(EVENT_TYPE_MESSAGE[2], {"messageId":"2586266925152520311"}) 17:36:24 VERB PuppetDonut messageRawPayloadParser({"at_user_list":[],"from_wxid":"wxid_0mp2uchkzsx122","is_pc":1,"msg":"Message#Text[🗣Contact]\tDer! I'm going to exit now, see you, bye!\nOSSChat v0.4.2","msgid":"2586266925152520311","room_wxid":"18995691396@chatroom","timestamp":1586856984,"to_wxid":"18995691396@chatroom","wx_type":1}) 17:36:24 SILL Puppet messagePayload(2586266925152520311) cache SET 17:36:24 VERB Room ready() 17:36:24 SILL Contact ready() @ Puppet#0(donut-oss) with id="wxid_0mp2uchkzsx122" 17:36:24 SILL Contact ready() isReady() true 17:36:24 VERB IoClient onMessage(Message#Text[🗣Contact@👥Room] Message#Text[🗣Contact] Der! I'm going to exit now, see you, ) 17:36:24 SILL Io ioMessage() is a nop function before be overwriten from cloud 17:36:24 VERB PuppetServiceImpl messagePayload() 17:36:24 VERB Puppet messagePayload(2586266925152520311) 17:36:29 SILL Io start() setInterval() ws.ping() 17:36:33 VERB PuppetServiceImpl stop() 17:36:33 VERB EventStreamManager stop() 17:36:33 VERB EventStreamManager this.onStreamingCallEnd() this.eventStream.on(finish) fired 17:36:33 VERB EventStreamManager connectPuppetEventToStreamingCall() unconnect() 13 callbacks 17:36:33 VERB PuppetDonut stop() 17:36:33 SILL StateSwitch off() is false 17:36:33 SILL StateSwitch off() is false 17:36:33 VERB StateSwitch off(pending) <- (false) 17:36:33 VERB PuppetDonut stopBridge() 17:36:33 SILL StateSwitch on() is false 17:36:33 VERB Bridge stop() 17:36:33 VERB CacheManager release() 17:36:33 VERB CacheManager releaseCache() 17:36:33 SILL CacheManager releaseCache() closing caches ... 17:36:39 SILL Io start() setInterval() ws.ping() 17:36:39 VERB PuppetServiceImpl ding() 17:36:39 SILL PuppetDonut ding(recover$() CPR) 17:36:42 SILL Io initWebSocket() ws.on(message): {"name":"online","payload":"puppet-hostie"} 17:36:42 WARN Io UNKNOWN on(online): puppet-hostie 17:36:42 SILL Io initWebSocket() ws.on(message): {"name":"offline","payload":"puppet-hostie"} 17:36:42 WARN Io UNKNOWN on(offline): puppet-hostie 17:36:43 VERB PuppetServiceImpl start() 17:36:43 VERB PuppetDonut start() 17:36:43 SILL StateSwitch on() is false 17:36:43 SILL StateSwitch on() is false 17:36:43 VERB StateSwitch on(pending) <- (false) 17:36:43 VERB Bridge init() 17:36:43 VERB Donut constructor(C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dlls\WxLoader.dll) 17:36:43 VERB Donut(ffi-adapter) constructor() singleton 17:36:43 VERB Donut(ffi-adapter) GetUserWeChatVersion() 17:36:43 VERB ffi-adapter Backend.lib(0: "C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dlls\WxLoader.dll") 17:36:43 VERB Donut(ffi-adapter) UseUtf8() 17:36:43 VERB ffi-adapter Backend.lib(0: "C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dlls\WxLoader.dll") 17:36:43 VERB PuppetDonut startBridge() 17:36:43 SILL StateSwitch off() is false 17:36:43 VERB Bridge start() 17:36:43 VERB BridgeCallback getConnectCallback() 17:36:43 VERB BridgeCallback getCloseCallback() 17:36:43 VERB BridgeCallback getEventCallback() 17:36:43 VERB Donut(ffi-adapter) InitWeChatSocket(?(?,???,???) 17:36:43 VERB ffi-adapter Backend.lib(0: "C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dlls\WxLoader.dll") 17:36:43 VERB PuppetServiceImpl event() 17:36:43 VERB EventStreamManager start(stream) 17:36:43 VERB EventStreamManager connectPuppetEventToStreamingCall() for Puppet#0(donut-oss) 17:36:43 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(friendship) (listenerCount:1) registering... 17:36:43 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(login) (listenerCount:2) registering... 17:36:43 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(logout) (listenerCount:1) registering... 17:36:43 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(message) (listenerCount:1) registering... 17:36:43 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-invite) (listenerCount:1) registering... 17:36:43 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-join) (listenerCount:1) registering... 17:36:43 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-leave) (listenerCount:1) registering... 17:36:43 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-topic) (listenerCount:1) registering... 17:36:43 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(scan) (listenerCount:2) registering... 17:36:43 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dong) (listenerCount:1) registering... 17:36:43 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(error) (listenerCount:1) registering... 17:36:43 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(heartbeat) (listenerCount:2) registering... 17:36:43 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(ready) (listenerCount:1) registering... 17:36:43 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(reset) (listenerCount:1) registering... 17:36:43 VERB EventStreamManager onStreamingCallEnd(callback) 17:36:43 VERB EventStreamManager start() puppet is logged in, emit a login event for downstream 17:36:43 VERB Puppet selfId() 17:36:43 VERB EventStreamManager grpcEmit(EVENT_TYPE_LOGIN[25], {"contactId":"wxid_0mp2uchkzsx122"}) 17:36:43 VERB Donut(ffi-adapter) InjectWeChatPid(7348,C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dlls\WeChatHelper.dll) 17:36:43 VERB ffi-adapter Backend.lib(0: "C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dlls\WxLoader.dll") 17:36:44 SILL Bridge reconnect client id : 7348 17:36:44 SILL StateSwitch on() is pending 17:36:44 VERB StateSwitch on(true) <- (pending) 17:36:44 SILL ConnectCallback: 2 17:36:44 VERB PuppetServiceImpl contactPayload() 17:36:44 VERB Bridge processEvent(DEBUG_LOG) 17:36:44 SILL debug log: "Client[1] is Connected!!!" 17:36:44 VERB Bridge processEvent(UNREAD_MSG_COUNT_CHANGE_MSG) 17:36:44 WARN Bridge onEvent() Unknown EventType: 11088, payload : {"login_hwnd":0,"main_hwnd":8062322,"pid":7348} 17:36:44 VERB Bridge processEvent(USER_LOGIN) 17:36:44 SILL init cache manager 17:36:44 VERB CacheManager init() 17:36:44 VERB CacheManager init() CacheManager has been initialized, no need to initialize again. 17:36:44 VERB PuppetDonut onLogin(wxid_0mp2uchkzsx122) 17:36:44 WARN PuppetDonut onLogin(wxid_0mp2uchkzsx122) already login? NOOP 17:36:44 VERB PuppetServiceImpl messageSendText() 17:36:44 VERB PuppetDonut messageSendText("17376996519@chatroom", [太阳] (OSSChat,OSSChat)) 17:36:44 SILL request(SEND_TEXTMSG, [object Object]) 17:36:44 VERB Donut(ffi-adapter) SendWeChatData(2,{"data":{"content":"[太阳] (OSSChat,OSSChat)","to_wxid":"17376996519@chatroom"},"type":11036}) 17:36:44 VERB ffi-adapter Backend.lib(0: "C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dlls\WxLoader.dll") 17:36:44 VERB PuppetServiceImpl roomPayload() 17:36:44 VERB Puppet roomPayload(18995691396@chatroom) 17:36:44 VERB Bridge processEvent(RECV_TEXT_MSG) 17:36:44 VERB PuppetDonut onMessage({"at_user_list":[],"from_wxid":"wxid_0mp2uchkzsx122","is_pc":1,"msg":"[太阳] (OSSChat,OSSChat)","msgid":"1146061183493906033","room_wxid":"17376996519@chatroom","timestamp":1586857004,"to_wxid":"17376996519@chatroom","wx_type":1}) 17:36:44 VERB PuppetDonut contactRawPayload(wxid_0mp2uchkzsx122) 17:36:44 VERB Bridge contactRawPayload(wxid_0mp2uchkzsx122) 17:36:44 ERR Config ########################### 17:36:44 ERR Config unhandledRejection: ReadError: Database is not open [object Promise] 17:36:44 ERR Config ########################### 17:36:44 ERR Config process.on(unhandledRejection) promise.catch(Database is not open) Config ReadError: Database is not open at maybeError (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\levelup\lib\levelup.js:339:32) at LevelUP.get (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\levelup\lib\levelup.js:181:7) at FlashStore. (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\dist\flash-store.js:181:54) at step (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\dist\config.js:11:19) at Object.next (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\bundles\flash-store.umd.js:4:53) at C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\dist\flash-store.js:59:34 at new Promise () at __awaiter (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\dist\flash-store.js:45:1) at FlashStore.get (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\flash-store\dist\flash-store.js:171:1) at CacheManager. (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\src\donut\cache-manager.ts:78:40) at Generator.next () at C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\cache-manager.js:8:71 at new Promise () at __awaiter (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\cache-manager.js:4:12) at CacheManager.getContact (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\cache-manager.js:63:16) at Bridge. (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\src\donut\bridge.ts:400:46) at Generator.next () at C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\bridge.js:8:71 at new Promise () at __awaiter (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\bridge.js:4:12) at Bridge.contactRawPayload (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\bridge.js:340:16) at PuppetDonut. (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\src\puppet-donut.ts:616:24) at Generator.next () at C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:8:71 at new Promise () at __awaiter (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:4:12) at PuppetDonut.contactRawPayload (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:497:16) at PuppetDonut. (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\src\puppet-donut.ts:276:18) at Generator.next () at C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:8:71 at new Promise () at __awaiter (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:4:12) at PuppetDonut.onMessage (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\puppet-donut.js:196:16) at Bridge.emit (events.js:198:13) at Bridge.EventEmitter.emit (domain.js:448:20) at Bridge. (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\src\donut\bridge.ts:310:14) at Generator.next () at C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\bridge.js:8:71 at new Promise () at __awaiter (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\bridge.js:4:12) at Bridge.processEvent (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\bridge.js:164:16) at Bridge. (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\src\donut\bridge.ts:210:18) at Generator.next () at C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\bridge.js:8:71 at new Promise () at __awaiter (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\bridge.js:4:12) at Bridge.onEvent (C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\@juzibot\wechaty-puppet-donut\dist\src\donut\bridge.js:148:16) at C:\Users\Administrator\Desktop\testPuppetWindows\wechaty\node_modules\ffi\lib\callback.js:66:25 (node:8320) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 4) 17:36:44 VERB PuppetServiceImpl roomMemberList() 17:36:44 VERB PuppetDonut roomMemberList(18995691396@chatroom) 17:36:44 SILL Bridge roomMemberList(18995691396@chatroom) 17:36:44 ERR PuppetServiceImpl grpcError() roomMemberList() rejection: Database is not open { code: 13, details: 'Database is not open' } ```

7. Additional context

Add any other context about the problem here.

[bug]

su-chang commented 4 years ago

This problem maybe due to flash-store, let's keep watching on it, and see if it existed or not.

If more than 3 days we can not see it any more, this issue will be closed.