bruz / meteor-github-api

node-github package adapted for Meteor
7 stars 4 forks source link

"Out of Memory" - github.repos.getFromUser #4

Open JohnnyCrazy opened 9 years ago

JohnnyCrazy commented 9 years ago

While the example call github.user.getFollowingFromUser works fine, the api fails calling other functions like github.repos.getFromUser

Small example:

Meteor.startup(function () {
    var github = new GitHub({
        version: "3.0.0", // required
        timeout: 5000,
        headers: {
            "user-agent": "My-Cool-GitHub-App" // GitHub is happy with a unique user agent
        }
    });

    var result = github.repos.getFromUser({
        user: "JohnnyCrazy"
    });
    console.log(result);
}

Will result in the following error:

=> Started proxy.
=> Started MongoDB.
W20151004-01:44:38.122(2)? (STDERR) debugger listening on port 63007

C:\Users\Johnny\AppData\Local\.meteor\packages\meteor-tool\1.1.9\mt-os.windows.x86_32\tools\utils\fiber-helpers.js:168
    }).run();
       ^
RangeError: Out of memory
    at Transformer.ondata (C:\tools\utils\fiber-helpers.js:159:8)
    at next (C:\Users\Johnny\AppData\Local\.meteor\packages\meteor-tool\1.1.9\mt-os.windows.x86_32\dev_bundle\lib\node_modules\eachline\eachline.js:135:18)
    at signaled (C:\Users\Johnny\AppData\Local\.meteor\packages\meteor-tool\1.1.9\mt-os.windows.x86_32\dev_bundle\lib\node_modules\eachline\eachline.js:129:5)
    at next (C:\Users\Johnny\AppData\Local\.meteor\packages\meteor-tool\1.1.9\mt-os.windows.x86_32\dev_bundle\lib\node_modules\eachline\eachline.js:141:4)
    at signaled (C:\Users\Johnny\AppData\Local\.meteor\packages\meteor-tool\1.1.9\mt-os.windows.x86_32\dev_bundle\lib\node_modules\eachline\eachline.js:129:5)
    at next (C:\Users\Johnny\AppData\Local\.meteor\packages\meteor-tool\1.1.9\mt-os.windows.x86_32\dev_bundle\lib\node_modules\eachline\eachline.js:141:4)
    ... //This repeats
    ...
    at Transformer._transform (C:\Users\Johnny\AppData\Local\.meteor\packages\meteor-tool\1.1.9\mt-os.windows.x86_32\dev_bundle\lib\node_modules\eachline\eachline.js:158:2)
    at Transformer.Transform._read (_stream_transform.js:179:10)
    at Transformer.Transform._write (_stream_transform.js:167:12)
    at doWrite (_stream_writable.js:226:10)
    at writeOrBuffer (_stream_writable.js:216:5)
    at Transformer.Writable.write (_stream_writable.js:183:11)
    at write (_stream_readable.js:602:24)
    at flow (_stream_readable.js:611:7)
    at Socket.pipeOnReadable (_stream_readable.js:643:5)
    at Socket.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:427:10)
    at emitReadable (_stream_readable.js:423:5)
    at readableAddChunk (_stream_readable.js:166:9)
    at Socket.Readable.push (_stream_readable.js:128:10)
    at Pipe.onread (net.js:529:21)

Any idea what is causing this @bruz ?

TaylorAckley commented 9 years ago

Interesting that you got this working. I keep getting a error that github is not defined, despite doing the exact same code.

JohnnyCrazy commented 9 years ago

Did you normally add the package and use new GitHub and not new GitHubApi? The wrapper itself is working fine for me.

But somehow, this out-of-memory exception only occurs on my windows machine, running the example on my linux machine github.repos.getFromUser works flawlessly.

@TaylorAckley

TaylorAckley commented 9 years ago

Yes and yes. I also tried it in onRendered. Not a big deal since the API is very to use with the http package. I'm probably doing something stupid.

Ill post a new issue. On Oct 4, 2015 4:31 PM, "Jonas Dellinger" notifications@github.com wrote:

Did you normally add the package and use new GitHub and not new GitHubApi? The wrapper itself is working fine for me.

But somehow, this out-of-memory exception only occurs on my windows machine, running the example on my linux machine github.repos.getFromUser works flawlessly.

@TaylorAckley https://github.com/TaylorAckley

— Reply to this email directly or view it on GitHub https://github.com/bruz/meteor-github-api/issues/4#issuecomment-145401581 .

JohnnyCrazy commented 9 years ago

Oh, you need to use it serverside, not client side.

TaylorAckley commented 9 years ago

Thanks, I should have tried that! On Oct 4, 2015 5:40 PM, "Jonas Dellinger" notifications@github.com wrote:

Oh, you need to use it serverside, not client side.

— Reply to this email directly or view it on GitHub https://github.com/bruz/meteor-github-api/issues/4#issuecomment-145405648 .

bruz commented 9 years ago

@JohnnyCrazy I was able to reproduce the out of memory issue in Windows, but haven't had much luck figuring it out. Here are a couple of things I saw that might help in tracking this down: