abuiles / facturas-client

Ember.js client for facturas app, an app with Ember.js with Ruby on Rails.
http://blog.abuiles.com/ember-js-with-ruby-on-rails/
30 stars 6 forks source link

Error while processing route: index Object.keys called on non-object TypeError: Object.keys called on non-object #1

Closed cmosguy closed 10 years ago

cmosguy commented 10 years ago

HI @abuiles,

Thanks for putting together this project. I was trying to learn about ember-cli and someone in #ember-cli IRC recommended this project. I got the rails server up and running, however, I stumbled upon an issue related to the facturas-client when i run the command:

ember serve --proxy http://0.0.0.0:3000

I get the following error:

Error while processing route: index Object.keys called on non-object TypeError: Object.keys called on non-object at Function.keys (native) at exports.default.Ember.Object.extend.setData (http://localhost:4200/assets/vendor.js:74148:28) at tryCatch (http://localhost:4200/assets/vendor.js:58742:20) at invokeCallback (http://localhost:4200/assets/vendor.js:58751:21) at publish (http://localhost:4200/assets/vendor.js:58729:17) at http://localhost:4200/assets/vendor.js:42291:9 at DeferredActionQueues.invoke (http://localhost:4200/assets/vendor.js:13785:18) at Object.DeferredActionQueues.flush (http://localhost:4200/assets/vendor.js:13835:15) at Object.Backburner.end (http://localhost:4200/assets/vendor.js:13298:27) at Object.Backburner.run (http://localhost:4200/assets/vendor.js:13353:20) vendor.js:27605 Object.keys called on non-object TypeError: Object.keys called on non-object at Function.keys (native) at exports.default.Ember.Object.extend.setData (http://localhost:4200/assets/vendor.js:74148:28) at tryCatch (http://localhost:4200/assets/vendor.js:58742:20) at invokeCallback (http://localhost:4200/assets/vendor.js:58751:21) at publish (http://localhost:4200/assets/vendor.js:58729:17) at http://localhost:4200/assets/vendor.js:42291:9 at DeferredActionQueues.invoke (http://localhost:4200/assets/vendor.js:13785:18) at Object.DeferredActionQueues.flush (http://localhost:4200/assets/vendor.js:13835:15) at Object.Backburner.end (http://localhost:4200/assets/vendor.js:13298:27) at Object.Backburner.run (http://localhost:4200/assets/vendor.js:13353:20)

Do you have any thoughts on how to correct this?

Many thanks! Adam

abuiles commented 10 years ago

@cmosguy the issue is that --proxy is broken in the latest ember-cli version.

For now what you can do is use ember-cli master, https://github.com/stefanpenner/ember-cli#working-with-master that should work.

Let me know if that fixes your problem!

cmosguy commented 10 years ago

@abuiles thanks for getting back to me so quickly. I put in the #master dependency for ember-cli.

When i rlaunch the server is see:

ember serve --proxy http://0.0.0.0:3000
version: 0.0.39
DEPRECATION: broccoli-asset-rev is using the deprecated ember-addon-main definition. It should be updated to {'ember-addon': {'main': 'lib/ember-cli-main.js'}}
DEPRECATION: broccoli-asset-rev is using the deprecated ember-addon-main definition. It should be updated to {'ember-addon': {'main': 'lib/ember-cli-main.js'}}
body-parser deprecated bodyParser: use individual json/urlencoded middlewares node_modules\ember-cli\node_modules\tiny-lr\lib\server.js:14:41
body-parser deprecated urlencoded: explicitly specify "extended: true" for extended parsing node_modules\body-parser\index.js:74:29
Proxying to http://0.0.0.0:3000
DEPRECATION: broccoli-asset-rev is using the deprecated ember-addon-main definition. It should be updated to {'ember-addon': {'main': 'lib/ember-cli-main.js'}}
Livereload server on port 35729
Serving on http://0.0.0.0:4200

Build successful - 10782ms.

Slowest Trees                  | Total
-------------------------------+----------------
TreeMerger (appAndDependencies) | 1990ms
TreeMerger (stylesAndVendor)   | 1883ms
TreeMerger (vendor)            | 1824ms
CustomStaticCompiler           | 1633ms

When I reconnect to the server I get: Error: connect EADDRNOTAVAIL at errnoException (net.js:904:11) at Object.afterConnect as oncomplete

And in the browser I get:

GET http://localhost:4200/api/v1/csrf 500 (Internal Server Error) vendor.js:9726 Error while processing route: index

Thanks again for your help! Adam

cmosguy commented 10 years ago

@abuiles for your record here is what my package.json looks like:

https://gist.github.com/cmosguy/77fda4816125e2a7e9ba

I did this to point to fresh new #master in the github for ember-cli and to avoid the procedures for doing the npm linking

Mannaio commented 9 years ago

same issue for me, any work around?