Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Exception while invoking method #5

Open
jeremyhodges opened this issue May 26, 2015 · 3 comments
Open

Exception while invoking method #5

jeremyhodges opened this issue May 26, 2015 · 3 comments

Comments

@jeremyhodges
Copy link

For the life of me I can't get this to work. I get the following error when I try to use this from within a meteor method:

I20150526-19:13:22.623(-4)? Exception while invoking method 'sendSMS' [object Object]
I20150526-19:13:22.623(-4)?     at Object.Future.wait (/Users/jeremyhodges/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:398:15)
I20150526-19:13:22.623(-4)?     at RestClient.<anonymous> (packages/meteor/helpers.js:119:1)
I20150526-19:13:22.623(-4)?     at [object Object].Twilio.sendSMS (packages/dispatch:twilio/twilio.js:42:1)
I20150526-19:13:22.623(-4)?     at [object Object].Meteor.methods.sendSMS (app/server/index.js:225:18)
I20150526-19:13:22.624(-4)?     at [object Object].methodMap.(anonymous function) (packages/meteorhacks:kadira/lib/hijack/wrap_session.js:160:1)
I20150526-19:13:22.624(-4)?     at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1617:1)
I20150526-19:13:22.624(-4)?     at packages/ddp/livedata_server.js:648:1
I20150526-19:13:22.624(-4)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150526-19:13:22.624(-4)?     at packages/ddp/livedata_server.js:647:1
I20150526-19:13:22.624(-4)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)

I've added in the package to my project and have the following method:

  sendSMS: function() {
    var twilioClient = new Twilio({
      from: Meteor.settings.TWILIO.FROM,
      sid: Meteor.settings.TWILIO.SID,
      token: Meteor.settings.TWILIO.TOKEN
    });

    // Send a message
    twilioClient.sendSMS({
      to: '+19808758499',
      body: 'hello world'
    });

    return true;
  }
    Meteor.call('sendSMS');
@codeNgamer
Copy link

+1

@lionellei
Copy link

Exact same error for me!

@yoepus
Copy link

yoepus commented Dec 23, 2015

It is not mentioned in the readme, but to use this package you need to:

  1. download the npm twilio package: npm install twilio
  2. load npm into meteor, you can use meteorhack npm: meteor add meteorhacks:npm
  3. this package and some finger crossing

good luck!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants