sorenlouv / fb-sleep-stats

Use Facebook to track your friends’ sleeping habits

Home Page:https://medium.com/@sqrendk/how-you-can-use-facebook-to-track-your-friends-sleeping-habits-505ace7fffb6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[HELP] Looks like my db is corrupted. Any possible way to recover old data?

Osandakj opened this issue · comments

Hello,
I'm getting this error while scrapping ever since the system was shutdown unexpectedly due to a power failure.

`Osanda@Aspire-5745G MINGW64 ~/fb-sleep-stats_ori (master)
$ npm run scrape

fb-sleep-stats@0.9.0 scrape C:\Users\Osanda\fb-sleep-stats_ori
node ./scrape.js

C:\Users\Osanda\fb-sleep-stats_ori\node_modules\lowdb\file-sync.js:25
throw e;
^

SyntaxError: Malformed JSON in file: C:\Users\Osanda\fb-sleep-stats_ori\src\server\services\db.json
Unexpected token '\u0000' at 1:1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fb-sleep-stats@0.9.0 scrape: node ./scrape.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fb-sleep-stats@0.9.0 scrape script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Osanda\AppData\Roaming\npm-cache_logs\2017-09-07T04_24_24_128Z->debug.log

Osanda@Aspire-5745G MINGW64 ~/fb-sleep-stats_ori (master)
$`

I ain't no coder by any means, however I understood that this has something to do with local database where it saves timestams and all? Although I could fully restore the functionality by performing all steps from cloning (of course i made a backup of original folder) the old data seem to be gone. Is it possible to recover old graph of sleep patterns at this point? Please help. Thank you.

More info: Win 7 x64 Pro | Fb-sleep-stats v0.9.0 | Git v2.14.1 x64 | Node v8.4.0 x64