dvdzkwsk / react-redux-starter-kit

Get started with React, Redux, and React-Router.
MIT License
10.29k stars 2.2k forks source link

Warning: a promise was created in a handler but none were returned from it #432

Closed alexhawkins closed 8 years ago

alexhawkins commented 8 years ago

I keep getting this error in console whenever I reload a page in development mode. Anyone have any idea what's going on?

Warning: a promise was created in a handler but was not returned from it
    at Object.eval (eval at <anonymous> (/Users/alexhawkins/Desktop/portal/react-redux-starter-kit/node_modules/thenify/index.js:30:15), <anonymous>:9:8)
    at /Users/alexhawkins/Desktop/portal/react-redux-starter-kit/node_modules/koa-send/index.js:77:28
    at [object Generator].next (native)
    at onFulfilled (/Users/alexhawkins/Desktop/portal/react-redux-starter-kit/node_modules/co/index.js:65:19)
    at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
....
 at tryCatch (/Users/alexhawkins/Desktop/portal/react-redux-starter-kit/node_modules/babel-runtime/regenerator/runtime.js:88:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/alexhawkins/Desktop/portal/react-redux-starter-kit/node_modules/babel-runtime/regenerator/runtime.js:341:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/alexhawkins/Desktop/portal/react-redux-starter-kit/node_modules/babel-runtime/regenerator/runtime.js:121:21)
    at step (/Users/alexhawkins/Desktop/portal/react-redux-starter-kit/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /Users/alexhawkins/Desktop/portal/react-redux-starter-kit/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
alexhawkins commented 8 years ago

Seems like the issue could be related to koa-static https://github.com/koajs/static/issues/62

neverfox commented 8 years ago

Same. It happens when my initial URL has a dot in it. Works fine if I navigate to it from within React (because the app has booted at that point). Unfortunately, if you follow the trail of those issue, they say to just turn off the warning, but clearly this is doing more than just spitting out annoying text. It's breaking the app. Of course, I could have a different problem that is coincidentally linking to that warning.

neiled commented 8 years ago

You'll get the warning with any access to static files at the moment (from what I can tell) see #430 but if you're getting an error then that is something else... Try turning off the warnings and see if that helps the error become clearer?

dvdzkwsk commented 8 years ago

Trying to clean up some issues, so I've added a task to investigate this further for the 2.0.0 roadmap. It's not technically a bug with the starter kit, so going to close the issue, but I will definitely try to come up with a better solution than just silencing bluebird warnings, though that seems to be the only alternative at the moment.