Meteor.call never getting to callback


#1

Why, oh why does the callback function never get called in the example below:

On client:

Meteor.call( "contact_persons_search", values, function(error, result) {
   if (error) {
      console.log('ERRR');
      console.log(error);
   } else {
      console.log('RESULT');
      console.log(result);
   }
});

On server:

Meteor.methods({
    contact_persons_search: function( values ) {
        var result = Meteor.call( "bing_search", "'search query'" );
        return result;
    },

    bing_search: function (query) {
        var appKey = "my app key";
        var authHeader = "Basic " + Base64.encode(appKey + ":" + appKey);

        var options = {
            headers: {
                'Content-Type': 'application/json',
                'Authorization': authHeader
            },
            params: {
                Query: query,
                '$format': 'json'
            }
        };

        var result = HTTP.call('GET', 'https://api.datamarket.azure.com/Bing/Search/v1/Web', options);
        return result;
    },

#2

It is working now, with no apparent change. I’m using WebStorm and it seems there was a problem with the debugging…


#3

I’ve had weird problems wit meteor build too. Clearing closing everything fixes the problem. Kinda like a Microsoft reboot.