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

Error: Request logging is disabled #29

Open
brunopedroso opened this issue Oct 7, 2016 · 7 comments
Open

Error: Request logging is disabled #29

brunopedroso opened this issue Oct 7, 2016 · 7 comments

Comments

@brunopedroso
Copy link
Contributor

I'm running this example app and, at the moment I submit the login request the process is running ember s stops with the following error:

/Users/bruno/workspace/ember-hoodie-example-app/node_modules/hapi/node_modules/hoek/lib/index.js:736
    throw new Error(msgs.join(' ') || 'Unknown error');
    ^

Error: Request logging is disabled
    at Object.exports.unique.exports.contain.exports.reachTemplate.exports.assert.condition [as assert] (/Users/bruno/workspace/ember-hoodie-example-app/node_modules/hapi/node_modules/hoek/lib/index.js:736:11)
    at internals.Request.internals.Request.getLog (/Users/bruno/workspace/ember-hoodie-example-app/node_modules/hapi/lib/request.js:252:10)
    at new exports.GreatResponse (/Users/bruno/workspace/ember-hoodie-example-app/node_modules/good/lib/utils.js:142:24)
    at Object.exports.GreatResponse (/Users/bruno/workspace/ember-hoodie-example-app/node_modules/good/lib/utils.js:83:16)
    at internals.Monitor._responseHandler (/Users/bruno/workspace/ember-hoodie-example-app/node_modules/good/lib/monitor.js:244:33)
    at invoke (/Users/bruno/workspace/ember-hoodie-example-app/node_modules/hapi/node_modules/podium/lib/index.js:239:30)
    at invoke (/Users/bruno/workspace/ember-hoodie-example-app/node_modules/hapi/node_modules/podium/lib/index.js:243:13)
    at Object.exports.parallel (/Users/bruno/workspace/ember-hoodie-example-app/node_modules/hapi/node_modules/items/lib/index.js:70:13)
    at Object.internals.Podium.registerEvent.internals.Podium.registerPodium.internals.emit.each [as emit] (/Users/bruno/workspace/ember-hoodie-example-app/node_modules/hapi/node_modules/podium/lib/index.js:260:18)
    at internals.Podium.registerEvent.internals.Podium.registerPodium.internals.Podium._emit (/Users/bruno/workspace/ember-hoodie-example-app/node_modules/hapi/node_modules/podium/lib/index.js:140:15)
    at each (/Users/bruno/workspace/ember-hoodie-example-app/node_modules/hapi/node_modules/podium/lib/index.js:181:47)
    at Object.exports.parallel (/Users/bruno/workspace/ember-hoodie-example-app/node_modules/hapi/node_modules/items/lib/index.js:70:13)
    at relay (/Users/bruno/workspace/ember-hoodie-example-app/node_modules/hapi/node_modules/podium/lib/index.js:182:15)
    at Object.internals.Podium.registerEvent.internals.Podium.registerPodium.internals.emit.each [as emit] (/Users/bruno/workspace/ember-hoodie-example-app/node_modules/hapi/node_modules/podium/lib/index.js:186:16)
    at Immediate._onImmediate (/Users/bruno/workspace/ember-hoodie-example-app/node_modules/hapi/node_modules/podium/lib/index.js:169:38)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

I researched a little and found out that this error is thrown by this assert.

I changed these lines to include routes: { log: true } just like someone proposed here, and the error stopped.

@gr2m
Copy link
Member

gr2m commented Oct 7, 2016

I think this was resolved via hoodiehq/hoodie#600, released in https://github.com/hoodiehq/hoodie/releases/tag/v24.2.1, can you check please?

@brunopedroso
Copy link
Contributor Author

Actually, that does not solve the problem. I'm already on hoodie 24.2.2...

It looks like these lines do not use getHapiOptions()...

@gr2m
Copy link
Member

gr2m commented Oct 10, 2016

you are right! Hmm ... We kinda have a lot of code duplication here. I wonder if we should use some internal code here from the hoodie package, like the getHapiOptions method, like so

var getHapiOptions = require('hoodie/cli/hapi-options')

it’s usually bad practice, but still better than duplicating the code and risking it gets out of sync like it did now.

Another option is to remove the server component entirely from ember-hoodie and document how to set it up yourself, to make it more explicit ...

What do you think?

@brunopedroso
Copy link
Contributor Author

I must say I feel, as an app dev, it's very inviting to install an ember addon, type ember s and already have hoodie ready for development! I wont remove this...

Maybe the hoodie module could expose a configured hapi server instance?

@gr2m
Copy link
Member

gr2m commented Oct 10, 2016

it's very inviting to install an ember addon, type ember s and already have hoodie ready for development!

Yeah I agree

Maybe the hoodie module could expose a configured hapi server instance?

I’m not sure what you mean by that? We can either use hoodie which comes with the whole package, or we use @hoodie/server which only has the backend components for store & account

@brunopedroso
Copy link
Contributor Author

I mean, if ember-hoodie must require an internal file inside hoodie module, then I think it would be more meaningful to me to import a configured instance than to import a getHapiOptions method... something similar to what is done here when it imports the whole run function.

just an idea, btw...

@brunopedroso
Copy link
Contributor Author

actually, the run function does configre other things... not just the connection options, but also a a server options and who know what else eventually...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants