question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lots of promise warnings in log output

See original GitHub issue

Issue Summary

When running Ghost my console log is filling up with a promise was created in a handler but was not returned from it warnings

Steps to Reproduce

  1. Run grunt dev
  2. Visit http://localhost:2368/ghost
  3. Check the output in Terminal

Examples…

Hitting /ghost

GET /ghost 301 15.177 ms - 45
Warning: a promise was created in a handler but was not returned from it
    at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
    at CanThisResult.beginCheck (/Users/kevinansfield/code/ghost/Ghost/core/server/permissions/index.js:231:38)
    at canThis (/Users/kevinansfield/code/ghost/Ghost/core/server/permissions/index.js:273:19)
    at getSettingsResult (/Users/kevinansfield/code/ghost/Ghost/core/server/api/settings.js:360:24)
    at Object.read (/Users/kevinansfield/code/ghost/Ghost/core/server/api/settings.js:377:16)
    at updateCheck (/Users/kevinansfield/code/ghost/Ghost/core/server/update-check.js:219:29)
    at index (/Users/kevinansfield/code/ghost/Ghost/core/server/controllers/admin.js:35:9)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:277:22
    at param (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:349:14)
    at param (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:365:14)
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:410:3)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at Function.handle (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:176:3)
    at router (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:46:12)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at module.exports (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/maintenance.js:12:5)
From previous event:
    at redirectToSetup (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/redirect-to-setup.js:6:34)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at cacheControlHeaders (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/cache-control.js:32:9)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at expressInit (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/middleware/init.js:33:5)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at query (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/middleware/query.js:44:5)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at Function.handle (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:176:3)
From previous event:
    at checkIsPrivate (/Users/kevinansfield/code/ghost/Ghost/core/server/apps/private-blogging/lib/middleware.js:32:81)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at SendStream.error (/Users/kevinansfield/code/ghost/Ghost/node_modules/serve-static/index.js:121:7)
    at emitOne (events.js:77:13)
    at SendStream.emit (events.js:169:7)
    at SendStream.error (/Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:275:17)
    at SendStream.onStatError (/Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:392:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:711:28)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:719:23
    at FSReqWrap.oncomplete (fs.js:82:15)

GET /ghost/ - - ms - -
Warning: a promise was created in a handler but was not returned from it
    at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
    at CanThisResult.beginCheck (/Users/kevinansfield/code/ghost/Ghost/core/server/permissions/index.js:231:38)
    at canThis (/Users/kevinansfield/code/ghost/Ghost/core/server/permissions/index.js:273:19)
    at getSettingsResult (/Users/kevinansfield/code/ghost/Ghost/core/server/api/settings.js:360:24)
    at Object.read (/Users/kevinansfield/code/ghost/Ghost/core/server/api/settings.js:377:16)
    at updateCheck (/Users/kevinansfield/code/ghost/Ghost/core/server/update-check.js:219:29)
    at index (/Users/kevinansfield/code/ghost/Ghost/core/server/controllers/admin.js:35:9)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:277:22
    at param (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:349:14)
    at param (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:365:14)
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:410:3)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at Function.handle (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:176:3)
    at router (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:46:12)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at module.exports (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/maintenance.js:12:5)
From previous event:
    at redirectToSetup (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/redirect-to-setup.js:6:34)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at cacheControlHeaders (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/cache-control.js:32:9)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at expressInit (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/middleware/init.js:33:5)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at query (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/middleware/query.js:44:5)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at Function.handle (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:176:3)
From previous event:
    at checkIsPrivate (/Users/kevinansfield/code/ghost/Ghost/core/server/apps/private-blogging/lib/middleware.js:32:81)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at SendStream.error (/Users/kevinansfield/code/ghost/Ghost/node_modules/serve-static/index.js:121:7)
    at emitOne (events.js:77:13)
    at SendStream.emit (events.js:169:7)
    at SendStream.error (/Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:275:17)
    at SendStream.onStatError (/Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:392:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:711:28)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:719:23
    at FSReqWrap.oncomplete (fs.js:82:15)

Warning: a promise was created in a handler but was not returned from it
    at Object.read (/Users/kevinansfield/code/ghost/Ghost/core/server/api/configuration.js:60:28)
    at renderIndex (/Users/kevinansfield/code/ghost/Ghost/core/server/controllers/admin.js:19:54)
    at noMatterWhat (/Users/kevinansfield/code/ghost/Ghost/core/server/controllers/admin.js:56:13)
    at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
    at index (/Users/kevinansfield/code/ghost/Ghost/core/server/controllers/admin.js:55:19)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:277:22
    at param (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:349:14)
    at param (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:365:14)
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:410:3)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at Function.handle (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:176:3)
    at router (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:46:12)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at module.exports (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/maintenance.js:12:5)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at then (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/redirect-to-setup.js:10:9)
From previous event:
    at redirectToSetup (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/redirect-to-setup.js:6:34)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at cacheControlHeaders (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/cache-control.js:32:9)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at expressInit (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/middleware/init.js:33:5)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at query (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/middleware/query.js:44:5)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at Function.handle (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:176:3)
From previous event:
    at checkIsPrivate (/Users/kevinansfield/code/ghost/Ghost/core/server/apps/private-blogging/lib/middleware.js:32:81)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at SendStream.error (/Users/kevinansfield/code/ghost/Ghost/node_modules/serve-static/index.js:121:7)
    at emitOne (events.js:77:13)
    at SendStream.emit (events.js:169:7)
    at SendStream.error (/Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:275:17)
    at SendStream.onStatError (/Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:392:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:711:28)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:719:23
    at FSReqWrap.oncomplete (fs.js:82:15)

Warning: a promise was created in a handler but was not returned from it
    at Object.read (/Users/kevinansfield/code/ghost/Ghost/core/server/api/configuration.js:60:28)
    at renderIndex (/Users/kevinansfield/code/ghost/Ghost/core/server/controllers/admin.js:19:54)
    at noMatterWhat (/Users/kevinansfield/code/ghost/Ghost/core/server/controllers/admin.js:56:13)
    at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
    at index (/Users/kevinansfield/code/ghost/Ghost/core/server/controllers/admin.js:55:19)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:277:22
    at param (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:349:14)
    at param (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:365:14)
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:410:3)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at Function.handle (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:176:3)
    at router (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:46:12)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at module.exports (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/maintenance.js:12:5)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at then (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/redirect-to-setup.js:10:9)
From previous event:
    at redirectToSetup (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/redirect-to-setup.js:6:34)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at cacheControlHeaders (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/cache-control.js:32:9)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at expressInit (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/middleware/init.js:33:5)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at query (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/middleware/query.js:44:5)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at Function.handle (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:176:3)
From previous event:
    at checkIsPrivate (/Users/kevinansfield/code/ghost/Ghost/core/server/apps/private-blogging/lib/middleware.js:32:81)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at SendStream.error (/Users/kevinansfield/code/ghost/Ghost/node_modules/serve-static/index.js:121:7)
    at emitOne (events.js:77:13)
    at SendStream.emit (events.js:169:7)
    at SendStream.error (/Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:275:17)
    at SendStream.onStatError (/Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:392:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:711:28)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/send/index.js:719:23
    at FSReqWrap.oncomplete (fs.js:82:15)

GET /ghost/ 200 611.387 ms - -

Signin attempt with invalid password

Warning: a promise was created in a handler but was not returned from it
    at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
    at CanThisResult.beginCheck (/Users/kevinansfield/code/ghost/Ghost/core/server/permissions/index.js:231:38)
    at canThis (/Users/kevinansfield/code/ghost/Ghost/core/server/permissions/index.js:273:19)
    at getSettingsResult (/Users/kevinansfield/code/ghost/Ghost/core/server/api/settings.js:360:24)
    at Object.read (/Users/kevinansfield/code/ghost/Ghost/core/server/api/settings.js:377:16)
    at checkIsPrivate (/Users/kevinansfield/code/ghost/Ghost/core/server/apps/private-blogging/lib/middleware.js:32:29)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at serveStatic (/Users/kevinansfield/code/ghost/Ghost/node_modules/serve-static/index.js:75:16)
    at forwardToExpressStatic (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/static-theme.js:26:10)
    at blackListStatic (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/static-theme.js:35:16)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at checkSSL (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/check-ssl.js:57:5)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at serveStatic (/Users/kevinansfield/code/ghost/Ghost/node_modules/serve-static/index.js:75:16)
From previous event:
    at updateActiveTheme (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/theme-handler.js:95:76)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at decideIsAdmin (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/decide-is-admin.js:14:5)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at serveSharedFile (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/serve-shared-file.js:46:13)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at serveSharedFile (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/serve-shared-file.js:46:13)
    at Layer.handle [as handle_request] (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:312:13)
    at /Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:330:12)
    at next (/Users/kevinansfield/code/ghost/Ghost/node_modules/express/lib/router/index.js:271:10)
    at serveSharedFile (/Users/kevinansfield/code/ghost/Ghost/core/server/middleware/serve-shared-file.js:46:13)
### Technical details: - Ghost Version: master - Node Version: 4.4.7 - Database: sqlite

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ErisDScommented, Jul 31, 2017

These are warnings (and only warnings) output by bluebird whenever NODE_ENV=development is set globally such that it gets passed to bluebird as well as Ghost. They can be useful for debugging weird promise issues, but in most cases in our codebase I think they are either deliberate cases or a result of our coding style, and not something to worry about.

I don’t think it’s useful to go through and change the pattern fro,

return next();

to:

next();
return null;

Or similar, everywhere where these sorts of patterns exist.

I’m going to close this issue, if we decide the warnings are really a problem we can reopen and revisit.

0reactions
kevinansfieldcommented, May 15, 2017

Yes, quite a lot of warnings are generated but they only appear when certain requests are made so I’m not sure about the total.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do I get an Unhandled Promise Rejection with await ...
The way we detect non-handling of promise rejections in Node.js is using a heuristic. When a promise is rejected we give the user...
Read more >
Warnings in log output since upgrading to v2 function ...
Since upgrading to v2 the we are getting lots of errors in log output. We are seeing some logs and not others. Warning:...
Read more >
Error handling with promises
Promise chains are great at error handling. When a promise rejects, the control jumps to the closest rejection handler.
Read more >
Unhandled Promise Rejections in Node.js
Node.js 6.6.0 added a sporadically useful bug/feature: logging unhandled promise rejections to the console by default.
Read more >
JavaScript Promises and Errors
In this post, I have focused on “doing” and compiled a bunch of little tests to point out how code executes in different...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found