Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade FlashStore to v0.16 (Beta) #191

Merged
merged 6 commits into from
Aug 22, 2019
Merged

Upgrade FlashStore to v0.16 (Beta) #191

merged 6 commits into from
Aug 22, 2019

Conversation

huan
Copy link
Member

@huan huan commented Aug 15, 2019

The latest version of flash-store used snap-db, which is a pure javascript db, does not require any dependencies.

It will solve two problems:

  1. I believe it will never segment fault anymore because it's pure javascript.
  2. It will be installed without any build tools requirements because it's pure javascript.

See:

@huan huan requested a review from windmemory August 15, 2019 11:33
@windmemory
Copy link
Member

Thanks for the PR, LGTM!

@windmemory windmemory merged commit 4fc9563 into master Aug 22, 2019
@windmemory windmemory deleted the flash-store-16 branch August 22, 2019 09:45
@windmemory
Copy link
Member

Seems like there are something wrong with the new version, when I started the bot, it has thus error:

17:56:48 INFO Wechaty <Puppet#0<PuppetPadpro>()/PuppetPadpro#0>(test) start() v0.0.0 is starting...
17:56:48 INFO WechatGateway init(padpro_token, padpro.botorange.com:6666, undefined)
(node:43398) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
17:56:49 INFO CacheManager init()
(node:43398) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at FlashStore.<anonymous> (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/dist/src/flash-store.js:159:1)
    at this (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/dist/src/flash-store.js:1:18)
    at Object.next (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/bundles/flash-store.umd.js:4:53)
    at fulfilled (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/dist/src/flash-store.js:43:1)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:43398) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:43398) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:43398) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token , in JSON at position 2
    at JSON.parse (<anonymous>)
    at FlashStore.<anonymous> (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/dist/src/flash-store.js:159:1)
    at this (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/dist/src/flash-store.js:1:18)
    at Object.next (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/bundles/flash-store.umd.js:4:53)
    at fulfilled (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/dist/src/flash-store.js:43:1)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:43398) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
17:56:53 INFO PadproManager initData() finished with contacts: 26, rooms: 4
(node:43398) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at FlashStore.<anonymous> (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/dist/src/flash-store.js:159:1)
    at this (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/dist/src/flash-store.js:1:18)
    at Object.next (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/bundles/flash-store.umd.js:4:53)
    at fulfilled (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/dist/src/flash-store.js:43:1)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:43398) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:43398) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at FlashStore.<anonymous> (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/dist/src/flash-store.js:159:1)
    at this (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/dist/src/flash-store.js:1:18)
    at Object.next (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/bundles/flash-store.umd.js:4:53)
    at fulfilled (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/dist/src/flash-store.js:43:1)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:43398) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:43398) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at FlashStore.<anonymous> (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/dist/src/flash-store.js:159:1)
    at this (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/dist/src/flash-store.js:1:18)
    at Object.next (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/bundles/flash-store.umd.js:4:53)
    at fulfilled (/Users/yuangao/git/wechaty/wechaty-puppet-padpro/node_modules/flash-store/dist/src/flash-store.js:43:1)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:43398) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)
^C

I tried to find the root cause for this, but have no clue yet. My insights for the issue is that, when the bot logged in, it will get the keys in flash-store, which triggered the errors above, but can not find deeper reason for this. Will rollback the version for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants