Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to 0.8.7 from 0.8.4 causing crashes when used with iron:router #185

Closed
heschong opened this issue Feb 24, 2016 · 5 comments
Closed

Comments

@heschong
Copy link

The upgrade to 0.8.7 is causing crashes for any app using iron:router elsewhere in the application.

Error: Meteor code must always run within a Fiber. Try wrapping callbacks that you pass to non-Meteor libraries with Meteor.bindEnvironment.
    at Object.Meteor._nodeCodeMustBeInFiber (packages/meteor/dynamics_nodejs.js:9:1)
    at [object Object]._.extend.get (packages/meteor/dynamics_nodejs.js:21:1)
    at [object Object].RouteController.lookupOption (packages/iron_router/lib/route_controller.js:66:1)
    at new Controller.extend.constructor (packages/iron_router/lib/route_controller.js:26:1)
    at [object Object].ctor (packages/iron_core/lib/iron_core.js:88:1)
    at Function.Router.createController (packages/iron_router/lib/router.js:201:1)
    at Function.Router.dispatch (packages/iron_router/lib/router_server.js:39:1)
    at Object.router (packages/iron_router/lib/router.js:15:1)
    at next (/Users/redacted/.meteor/packages/webapp/.1.2.3.15kpnst++os+web.browser+web.cordova/npm/node_modules/connect/lib/proto.js:190:15)
    at Object.handle (/Users/redacted/.meteor/packages/simple_json-routes/.2.0.1.1a0fwo3++os+web.browser+web.cordova/npm/node_modules/connect-route/lib/connect-route.js:110:5)

There seems to be a conflict with iron:router and simple:json-routes maybe. See also stubailo/meteor-rest#82

To reproduce:

meteor create foo
cd foo
meteor add nimble:restivus
meteor add iron:router
meteor run
@kahmali
Copy link
Owner

kahmali commented Feb 24, 2016

I think you're right. This appears to be a result of the upgrade to json-routes v2.0.1. For now, anyone using iron router should remain on Restivus v0.8.5 or below.

Thanks so much for reporting this! The world will be a better place when everyone moves on to Flow Router. I'll try to update the docs with a warning or something.

@Obiwarn
Copy link

Obiwarn commented Mar 8, 2016

can confirm

@heschong
Copy link
Author

simple:[email protected] fixes this

@kahmali
Copy link
Owner

kahmali commented Mar 10, 2016

Nice! I'll update ASAP and release a new version. Thanks for the heads up @heschong!

@kahmali
Copy link
Owner

kahmali commented Mar 10, 2016

Just published v0.8.8 with the updated version of simple:json-routes. Thanks again for the heads up @heschong. Let me know if any of you are still getting errors.

@kahmali kahmali closed this as completed Mar 10, 2016
iStefo added a commit to iStefo/meteor-oauth2 that referenced this issue Sep 6, 2016
Using older versions of simple:json-routes leads to errors when used together with other packages such as iron:router, restivus and others (see e.g. kahmali/meteor-restivus#185).

Updating simple:json-routes to 2.1.0 fixes the problems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants