edubkendo
8/22/2012 - 5:24 AM

errors I see and problems I'm encountering trying to create a form in latest tower.

errors I see and problems I'm encountering trying to create a form in latest tower.

This is what I have in app/views/users/_form.coffee

text '{{#with user}}'
div class: 'control-group', ->
  div class: 'controls', ->
    text '{{view Ember.TextField valueBinding="email"}}'
    text '{{#with errors}}'
    span class: 'help-inline error', '{{title}}'
div class: 'control-group', ->
  div class: 'controls', ->
    text '{{view Ember.TextField valueBinding="firstName"}}'
    text '{{#with errors}}'
    span class: 'help-inline error', '{{title}}'
div class: 'control-group', ->
  div class: 'controls', ->
    text '{{view Ember.TextField valueBinding="lastName"}}'
    text '{{#with errors}}'
    span class: 'help-inline error', '{{title}}'                  
    text '{{/with}}'
text '{{/with}}'

This is what I see in the browser:

When I start the server, I get these errors repeated every time (regardless of what I've done or not done), no idea if it's related:

TypeError: Cannot read property 'session' of undefined
    at csrfMetaTag (eval at <anonymous> (/home/eric/git/clones/tower/node_modules/coffeecup/lib/coffeecup.js:419:10))
    at csrfMetaTag (eval at <anonymous> (/home/eric/git/clones/tower/node_modules/coffeecup/lib/coffeecup.js:419:10))
    at eval (eval at <anonymous> (eval at <anonymous> (/home/eric/git/clones/tower/node_modules/coffeecup/lib/coffeecup.js:419:10)))
    at partial (eval at <anonymous> (/home/eric/git/clones/tower/node_modules/coffeecup/lib/coffeecup.js:419:10))
    at partial (eval at <anonymous> (/home/eric/git/clones/tower/node_modules/coffeecup/lib/coffeecup.js:419:10))
    at body.role (eval at <anonymous> (/home/eric/git/clones/tower/node_modules/coffeecup/lib/coffeecup.js:419:10))
    at Object.__cc.render_contents (eval at <anonymous> (/home/eric/git/clones/tower/node_modules/coffeecup/lib/coffeecup.js:419:10))
    at Object.__cc.render_tag (eval at <anonymous> (/home/eric/git/clones/tower/node_modules/coffeecup/lib/coffeecup.js:419:10))
    at tag (eval at <anonymous> (/home/eric/git/clones/tower/node_modules/coffeecup/lib/coffeecup.js:419:10))
    at Object.__cc.tag (eval at <anonymous> (/home/eric/git/clones/tower/node_modules/coffeecup/lib/coffeecup.js:419:10))
TypeError: Cannot call method 'toLabel' of undefined
    at eval (eval at <anonymous> (/home/eric/git/clones/tower/node_modules/coffeecup/lib/coffeecup.js:419:10))
    at eval (eval at <anonymous> (/home/eric/git/clones/tower/node_modules/coffeecup/lib/coffeecup.js:419:10))
    at Object.coffeecup.render (/home/eric/git/clones/tower/node_modules/coffeecup/lib/coffeecup.js:450:10)
    at Tower.ViewRendering._renderCoffeecupString (/home/eric/git/clones/tower/packages/tower-view/shared/rendering.coffee:147:28)
    at Tower.ViewRendering._renderString (/home/eric/git/clones/tower/packages/tower-view/shared/rendering.coffee:112:21)
    at Tower.ViewRendering._renderBody (/home/eric/git/clones/tower/packages/tower-view/shared/rendering.coffee:93:21)
    at Tower.ViewRendering.render (/home/eric/git/clones/tower/packages/tower-view/shared/rendering.coffee:35:19)
    at watch.update.iterator (.:108:18)
    at async.forEachSeries.iterate (/home/eric/projects/projects/towerApps/funApp/node_modules/async/lib/async.js:108:13)
    at async.forEachSeries.iterate (/home/eric/projects/projects/towerApps/funApp/node_modules/async/lib/async.js:119:25)

These repeat over and over, with nearly every file it compiles.

On every page load (again regardless of what I do or don't do), I see these errors in the browser console:

XMLHttpRequest cannot load http://localhost:4181/socket.io/1/?t=1345612144550. Origin http://localhost:3000 is not allowed by Access-Control-Allow-Origin.

GET socket.io.js:1659GET http://localhost:3000/socket.io/1/?t=1345612158228 

GET socket.io.js:1659GET http://localhost:3000/socket.io/1/?t=1345612159229 

The last part repeats dozens of times. This is what started after I started running "design.io start" in another window.

This is what displays in the design.io log:

info:  Name: design.io-server     hook::rank::proposing                    Type: hook            Data: 1
info:  Name: design.io-watcher::funApp design.io-watcher::funApp::hook::rank::accepting Type: hook            Data: 1
info:  Name: design.io-watcher::funApp design.io-watcher::funApp::hook::connected Type: hook            Data: 5000
info:  Name: design.io-watcher::funApp design.io-watcher::funApp::hook::started Type: hook            Data: 5000
info:  Name: design.io-watcher::funApp design.io-watcher::funApp::hook::ready   Type: hook            Data: {"name":"design.io-watcher::funApp","type":"hook", ... 
info:  Name: design.io-watcher::funApp design.io-watcher::funApp::ready         Type: hook            Data: {"name":"design.io-watcher::funApp","type":"hook", ... 
info:  Name: design.io-server     hook::disconnected                       Type: hook            Data: {"name":"design.io-server","proposedRank":0,"disco ... 

Again, not sure if any of these latter parts have anything to do with my form, which could just be entirely wrong. Just throwing them in there. Thanks.