Error with meteor.com deployed app


#1

The app works fine in my local environment. I’m using the ikoptiev:linkedin-extractor package and I suspect it is causing the problem.
I get these errors:

    at Request.callback
(/meteor/containers/7e9e50f2-65a2-3b4a-66ee-797d36d842f7/bundle/programs/server/npm/ikoptiev_linkedin-extractor/node_modules/linkedin-extractor/node_modules/superagent/lib/node/index.js:792:17)
at IncomingMessage.<anonymous>(/meteor/containers/7e9e50f2-65a2-3b4a-66ee-797d36d842f7/bundle/programs/server/npm/ikoptiev_linkedin-extractor/node_modules/linkedin-extractor/node_modules/superagent/lib/node/index.js:990:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickCallback (node.js:442:13)
[Wed Oct 14 2015 10:45:12 GMT+0000 (UTC)] INFO STATUS killed -> sleeping
[Wed Oct 14 2015 10:45:12 GMT+0000 (UTC)] INFO STATUS running -> killed
[Wed Oct 14 2015 10:49:29 GMT+0000 (UTC)] NOTICE Starting application on
port 9378
[Wed Oct 14 2015 10:49:29 GMT+0000 (UTC)] INFO STATUS null -> starting
[Wed Oct 14 2015 10:49:29 GMT+0000 (UTC)] INFO STATUS starting -> running
[Wed Oct 14 2015 10:52:59 GMT+0000 (UTC)] INFO Exception while invoking
method 'contact_persons_search' Error: Unsuccessful HTTP response at packages/underscore/underscore.js:255:1
at Array.map (native)
at Function._.map._.collect (packages/underscore/underscore.js:123:1)
at Function._.invoke (packages/underscore/underscore.js:254:1)
at [object Object].Meteor.methods.parallelAsyncExtractLinkedIn (app/server/lib/bing_search.js:265:18)
at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1617:1)
at packages/ddp/livedata_server.js:1530:1
at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
at [object Object]._.extend.apply (packages/ddp/livedata_server.js:1529:1)
at [object Object]._.extend.call (packages/ddp/livedata_server.js:1472:1)
at [object Object].Meteor.methods.contact_persons_search (app/server/lib/bing_search.js:25:34)
at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1617:1)
at packages/ddp/livedata_server.js:648:1
at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
at packages/ddp/livedata_server.js:647:1
at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)

Any ideas?


#2

I would check what is blocking this

Exception while invoking method 'contact_persons_search
 Error: Unsuccessful HTTP response

#3

Sorry - but how can I check that?


Best way to collect the results of multiple async calls?
#4

Something like fulltext search in your project where you are using ‘contact_persons_search’ and how it is sanitized against for example “undefined” input to _.each


#5

I only call it from one location and I’m 99% sure the input is always correct.
Also - it always works well on localhost with no problems at all.
The error seems to be in this function:

parallelAsyncExtractLinkedIn: function (urls, message) {
    var futures = _.map(urls, function (url) {
        var future = new Future();
        var onComplete = future.resolver();

        /// Make async http call
        LinkedInExtractor.getFromUrl( url, function (error, result) {
            var stuff = {link: url, result: result};
            onComplete(error, stuff);
        });

        return future;
    });

    // wait for all futures to finish
    Future.wait(futures);

    // and grab the results out.
    return _.invoke(futures, 'get');
},

In fact, the error message points to the last line (return _.invoke(futures, ‘get’)…
Any ideas?