IonicaBizau / repository-downloader

:open_file_folder: Downloads all your repositories from BitBucket and GitHub locally
MIT License
94 stars 31 forks source link

TypeError: Cannot read property 'full_name' of undefined #9

Closed pborreli closed 9 years ago

pborreli commented 9 years ago
  >  Repository: pborreli/_s

TypeError: Cannot read property 'full_name' of undefined
    at /Users/pborreli/Contrib/repository-downloader/github.js:178:37
    at /Users/pborreli/Contrib/repository-downloader/node_modules/async/lib/async.js:570:21
    at /Users/pborreli/Contrib/repository-downloader/node_modules/async/lib/async.js:249:17
    at /Users/pborreli/Contrib/repository-downloader/node_modules/async/lib/async.js:125:13
    at Array.forEach (native)
    at _each (/Users/pborreli/Contrib/repository-downloader/node_modules/async/lib/async.js:46:24)
    at async.each (/Users/pborreli/Contrib/repository-downloader/node_modules/async/lib/async.js:124:9)
    at _asyncMap (/Users/pborreli/Contrib/repository-downloader/node_modules/async/lib/async.js:248:13)
    at Object.map (/Users/pborreli/Contrib/repository-downloader/node_modules/async/lib/async.js:219:23)
    at _parallel (/Users/pborreli/Contrib/repository-downloader/node_modules/async/lib/async.js:568:20)
IonicaBizau commented 9 years ago

OK, so let's debug it: put here the following code:

if (!c) {
   console.log(repos);
   return callback();
}
IonicaBizau commented 9 years ago

Actually, put it with two lines upper.

pborreli commented 9 years ago

Hmm i don't get it maybe you will :smile:

It doesn't crash with those lines added

  >  Repository: pborreli/_s
   >  Page: 2
info  Getting the repositories where htty created pull requests.
   >  Page: 1
   >  Downloaded pborreli/ArtBreadcrumbsBundle (1/735)
info  Downloading htty's repositories.
   >  Repository: htty/htty
   >  Repository: htty/htty.github.com
   >  Downloaded pborreli/AB (2/735)
   >  Downloaded pborreli/Adaptive-Images (3/735)
IonicaBizau commented 9 years ago

Hahaha! Make sure you removed the downloads (bitbucket and github). :smile:

pborreli commented 9 years ago

just did, relaunched start, no more crash :dizzy_face:

IonicaBizau commented 9 years ago

Maybe... it's because of the basic auth rate limit (up to 5000 requests / hour). I will try to reproduce it.

pborreli commented 9 years ago

still running : 266/735

IonicaBizau commented 9 years ago

I have 4 instances of repository-downloader, all of them downloading things:

$ ps aux | grep 'git clone' | wc -l
353

The issue is not about downloading repositories but making requests to GitHub API.

pborreli commented 9 years ago

yes understood, if it reproduces I will inform you

IonicaBizau commented 9 years ago

Hopefully it worked fine. :smile: