JackAdams / constellation-distro

A set of packages to get started with Constellation
http://constellation.taonova.com/demo
MIT License
32 stars 3 forks source link

flow router error #3

Open pihentagy opened 8 years ago

pihentagy commented 8 years ago

I am having some issues with constellation and flow router.

Exception from Tracker recompute function:
meteor.js:880 Error: You can't use reactive data sources like Session inside the `.subscriptions` method!
    at kadira_flow-router.js:2032
    at Tracker.Computation._compute (tracker.js:349)
    at Tracker.Computation._recompute (tracker.js:368)
    at Object.Tracker._runFlush (tracker.js:507)
    at onGlobalMessage (meteor.js:365)

My full router:

FlowRouter.route '/',
    name:'home',
    action: (params) ->
        console.log "yeah baby"
        BlazeLayout.render 'layout', main: 'home'

FlowRouter.route '/session/:sessionId',
    name: 'meeting'
    subscriptions: (params) ->
        console.table params
        @register 'oneSession', Meteor.subscribe('meeting', params.sessionId)
        @register 'matches', Meteor.subscribe('mathcup')
    action: (params) ->
        BlazeLayout.render 'layout', main: 'session'

Meeting ang matchup subscriptions

    Meteor.publish 'meeting', (meetingId) ->
        log "Waiting for meeting #{meetingId}"
        Meteor._sleepForMs 1000
        Meeting.find _id:meetingId
    Meteor.publish 'matchup', -> Matchup.find {}

Cannot see what is reactive there...

JackAdams commented 8 years ago

I can't see what the problem is either. Try this: 1) meteor remove babrahams:constellation 2) meteor add constellation:console 3) meteor add constellation:subscriptions Does it work again after 1) ? Does it still work after 2) ? Does it break after 3) ? This will help isolate which constellation package is causing the problems.

pihentagy commented 8 years ago

Works after 1),2) and 3).

Does not work after

C:\prg\foosball-meteor>meteor add babrahams:constellation

Changes to your project's package version selections:

amplify                    added, version 1.0.0
babrahams:constellation    added, version 0.1.9
babrahams:temple           added, version 0.3.3
constellation:autopublish  added, version 0.3.4
constellation:plugins      added, version 0.1.1
constellation:position     added, version 0.3.2
constellation:session      added, version 0.3.2
constellation:tiny         added, version 0.3.1
lai:ddp-inspector          added, version 1.1.7
mousetrap:mousetrap        added, version 1.4.6_1
u2622:persistent-session   added, version 0.4.3

babrahams:constellation: A curated set of packages for Constellation
JackAdams commented 8 years ago

Must be one of these causing the problem:

babrahams:temple           added, version 0.3.3
constellation:autopublish  added, version 0.3.4
constellation:plugins      added, version 0.1.1
constellation:position     added, version 0.3.2
constellation:session      added, version 0.3.2
constellation:tiny         added, version 0.3.1
lai:ddp-inspector          added, version 1.1.7

If you have time, you could meteor remove babrahams:constellation and meteor add each of the above packages one-by-one, to find out which one the culprit is. I'd be interested to hear.

pihentagy commented 8 years ago

It's ddp-inspector. Opened https://github.com/rclai/meteor-ddp-inspector/issues/5