meteor / mobile-packages

Meteor packages that provide functionality on mobile and desktop via Cordova plugins.
Other
339 stars 153 forks source link

mdg:camera - TypeError: Cannot call method 'apply' of undefined #73

Closed VioletaCalvo closed 3 years ago

VioletaCalvo commented 9 years ago

Hi!

Using mdg:camera on my app, when I make the photo on android with my phone, I get an error: TypeError: Cannot call method 'apply' of undefined and then my app is restarted.

This is my code:

    getPicture = Meteor.wrapAsync MeteorCamera.getPicture()
    try
      console.log 'test1'
      file = getPicture {}
      console.log 'test2'
      pictureSuccess = true
    catch error
      console.log 'test3'
      console.log error
      pictureSuccess = false
    console.log 'test4'
    return unless pictureSuccess
    console.log 'pictureSuccess'

And this is what I see in the console

cordova, get picture
test1
test3
TypeError: Cannot call method 'apply' of undefined
test4

This happens before I take the photo with my phone. Also I tried using the MeteorCamera function with the callback (without Meteor.warpAsync) but my app is restarted too. Why this could be happen?