meteor-restivus icon indicating copy to clipboard operation
meteor-restivus copied to clipboard

TypeError: Cannot read property 'call' of undefined

Open mryraghi opened this issue 8 years ago • 11 comments

I came across this error today and Meteor won't even start.

TypeError: Cannot read property 'call' of undefined
at Restivus.<anonymous> (packages/nimble_restivus/lib/auth.coffee:41:27)
at Array.forEach (native)
at Function._.each._.forEach (packages/underscore.js:139:11)
at Restivus.Assets.Restivus.Restivus.addCollection (packages/nimble_restivus/lib/auth.coffee:41:27)
at meteorInstall.server.api.js (server/api.js:547:5)

api.js:547:5

API.addCollection(Meteor.users, {...

aut.coffee:41:27

###
  Log a user in with their password
###
@Auth.loginWithPassword = (user, password) ->
  if not user or not password
    throw new Meteor.Error 401, 'Unauthorized'

accounts-password already updated to 1.3.3.

Any ideas?

mryraghi avatar Jan 30 '17 19:01 mryraghi

To be honest, this is blocking all my API and this is no good. Could you please help?

mryraghi avatar Jan 31 '17 13:01 mryraghi

Same problem here

anthonymanzo avatar Feb 08 '17 21:02 anthonymanzo

Same issue for me

cunnagin avatar Feb 08 '17 22:02 cunnagin

Noticed same issue when previously worked with restivus-swagger plugin, forked without latest PRs. Switching possibly back if gets fixed.

jykae avatar Feb 09 '17 17:02 jykae

Same here, it seemed to occur after I updated Meteor.

TristanWiley avatar Feb 17 '17 15:02 TristanWiley

Temporarily fixed by downgrading to version 0.8.11

meteor add nimble:restivus@=0.8.11

TristanWiley avatar Feb 18 '17 19:02 TristanWiley

Same error. But after update meteor 1.4.3.2. thanks

vauruk avatar Mar 19 '17 12:03 vauruk

Any solution guys ? same for me as well and I am on meteor 1.4.3.2 .

Edit : Got it fixed using excludedEndpoints: [ 'put','delete','patch']

gurjit03 avatar Apr 20 '17 09:04 gurjit03

@gurjit03 this worked, but why should this matter?

excludedEndpoints: ["patch"]

worked for me. So, patch operation is not allowed?

ujwal-setlur avatar Jul 08 '17 00:07 ujwal-setlur

@TristanWiley downgrading to 0.8.11 worked for me as well.

ujwal-setlur avatar Jul 08 '17 00:07 ujwal-setlur

I think this issue is related to https://github.com/kahmali/meteor-restivus/issues/262

nosizejosh avatar Nov 30 '17 16:11 nosizejosh