Skip to content

Exception while invoking method 'MY_SERVER_METHOD' TypeError: Cannot read property 'collectionViews' of undefined  #5

Description

@trukhilio

Hey, @msavin. Thank you for the fine package!
I updated the meteor to 1.8.1 and received this error.

Exception while invoking method 'MY_SERVER_METHOD_WHICH_USES_METEOR_USER' TypeError: Cannot read property 'collectionViews' of undefined
 at _getCache (packages/msavin_usercache.js:31:39)
 at Object.Meteor.user (packages/msavin_usercache.js:73:15) ...

Inspected a little bit and what I found out:

var connectionData = Meteor.default_server.sessions[connectionId];

is undefined bc Meteor.default_server.sessions object has been changed from {'connectionId': { Session: { collectionViews: { ... }}}} to Map { 'connectionId' => Session { ... }} and now we have to get the value like

Meteor.default_server.sessions.get(connectionId);

And new method wouldn't work for previous meteor 1.8.
Hope this info will help you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions