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

Sync hangs, and sync verbose crashes #59

Open
drpepper opened this issue Feb 3, 2014 · 7 comments
Open

Sync hangs, and sync verbose crashes #59

drpepper opened this issue Feb 3, 2014 · 7 comments

Comments

@drpepper
Copy link

drpepper commented Feb 3, 2014

When I run --sync, it hangs at 100%

|....:....|....:....|....:....|....:....|....:....| 100.0% 

And when I run --sync --verbose:

$ npmd --sync --verbose
syncing...

undefined:1
[object Object]
 ^
SyntaxError: Unexpected token o
    at Object.parse (native)
    at /usr/local/lib/node_modules/npmd/plugins/couch-sync.js:106:24
    at Object.hook (/usr/local/lib/node_modules/npmd/node_modules/level-sublevel/sub.js:233:5)
    at /usr/local/lib/node_modules/npmd/node_modules/level-sublevel/node_modules/level-hooks/index.js:62:29
    at Array.forEach (native)
    at each (/usr/local/lib/node_modules/npmd/node_modules/level-sublevel/node_modules/level-hooks/index.js:61:17)
    at Array.forEach (native)
    at LevelUP.onBatch (/usr/local/lib/node_modules/npmd/node_modules/level-sublevel/node_modules/level-hooks/index.js:74:9)
    at LevelUP.EventEmitter.emit (events.js:95:17)
    at /usr/local/lib/node_modules/npmd/node_modules/level/node_modules/level-packager/node_modules/levelup/lib/levelup.js:349:12

I'm on OSX 10.9.1, node v0.10.22.

@dominictarr
Copy link
Owner

That isn't hanging, it's still connected and getting updates live.

Hmm, what could be changed to make that more obvious?

Unfortunately, I don't have time to work on this right now, but when I do I'll investigate
--verbose mode.

@drpepper
Copy link
Author

drpepper commented Feb 4, 2014

Oh, ok. So it's npmd --sync that we're supposed to be running in the background? Just updating the README would help to understand that. Another possibility would be to add a flag like --sync-once that quits when it reaches 100% .

Another idea: when it reaches 100% you could write something like "Waiting for more updates..." on the next line.

@dominictarr
Copy link
Owner

Ah, got it. Okay, I've fixed the readme. thanks for your feedback, this has been a really hard "bug" to diagnose, I've answered lots of issues where someone has gotten the wrong impression about this feature. I think we got it now though!

npmd sync (without -- also works) recovers if it crashes, so you can just stop it when you get to 100 and use the data that is already in the database.

@zeke
Copy link
Contributor

zeke commented Mar 3, 2014

I try installing npmd every month or so, and the npmd sync step never seems to work/finish. Here's what it does today:

$ which npmd
/Users/zeke/.nvm/v0.10.26/bin/npmd
$ npmd -v
0.20.2
$ npmd sync
connected to npm registry!!!

|....:....|....:....|....:....|....:....|....:....| 0.0%   

^ twenty minutes later, still at 0.0%

@dominictarr
Copy link
Owner

some npm stuff has changed because of the recent changes to how the npm registry works.
I just pushed 0.20.3
can you try that?

hopefully I'll get time to work on this again soon!

@zeke
Copy link
Contributor

zeke commented Mar 7, 2014

So far so good. Thanks!

@dominictarr
Copy link
Owner

awesome!

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

No branches or pull requests

3 participants