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

Warning: a promise was created in a handler but was not returned from it #36

Open
shun-tak opened this issue Dec 20, 2016 · 0 comments
Open

Comments

@shun-tak
Copy link

I have got a bluebird warning.

Warning: a promise was created in a handler but was not returned from it is occuring at lib/client.jsL170

Warning: a promise was created in a handler but was not returned from it
https://github.com/petkaantonov/bluebird/blob/master/docs/docs/warning-explanations.md

I added a line to client.js:

this.hosts = hosts;
this.connectToHosts();
this.flushBuffer();
+ return Promise.resolve();

and the warning is disappeared though return Promise.resolve() doesn't look good.

Stack traces are like:

Warning: a promise was created in a handler at anonymous> (/home/share/shun_tak/project/node_modules/memcache-plus/lib/client.js:170:14 but was not returned from it, see http://goo.gl/rRqMUw
    at new Promise (/home/share/shun_tak/project/node_modules/bluebird/js/release/promise.js:77:14)
    at Object.exports.defer (/home/share/shun_tak/project/node_modules/memcache-plus/lib/misc.js:15:19)
    at Connection.get (/home/share/shun_tak/project/node_modules/memcache-plus/lib/connection.js:713:25)
    at Client.flushBuffer (/home/share/shun_tak/project/node_modules/memcache-plus/lib/client.js:219:48)
    at Client.<anonymous> (/home/share/shun_tak/project/node_modules/memcache-plus/lib/client.js:170:14)
From previous event:
    at Client.getHostList (/home/share/shun_tak/project/node_modules/memcache-plus/lib/client.js:167:26)
    at Client.connect (/home/share/shun_tak/project/node_modules/memcache-plus/lib/client.js:79:14)
    at new Client (/home/share/shun_tak/project/node_modules/memcache-plus/lib/client.js:61:10)
    at Object.<anonymous> (/home/share/shun_tak/project/handlers/sample.js:9:19)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at AwsInvokeLocal.invokeLocalNodeJs (/usr/lib/node_modules/serverless/lib/plugins/aws/invokeLocal/index.js:79:16)
    at AwsInvokeLocal.invokeLocal (/usr/lib/node_modules/serverless/lib/plugins/aws/invokeLocal/index.js:61:19)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

I will appreciate your help with this situation.

jagoda pushed a commit to jagoda/memcache-plus that referenced this issue Jun 19, 2018
When autodiscovery fails cache operations are silently queued and
are never dequeued. This leaves the client in an unusable state and
only warns the consumer if onNetError is provided. Since failed
autodiscovery is not recoverable all queued operations should be
rejected.

Related to victorquinn#36.
jagoda pushed a commit to jagoda/memcache-plus that referenced this issue Jun 19, 2018
When autodiscovery fails cache operations are silently queued and
are never dequeued. This leaves the client in an unusable state and
only warns the consumer if onNetError is provided. Since failed
autodiscovery is not recoverable all queued operations should be
rejected.

Related to victorquinn#36.
jagoda pushed a commit to jagoda/memcache-plus that referenced this issue Jun 19, 2018
When autodiscovery fails cache operations are silently queued and
are never dequeued. This leaves the client in an unusable state and
only warns the consumer if onNetError is provided. Since failed
autodiscovery is not recoverable all queued operations should be
rejected.

Related to victorquinn#36.
victorquinn pushed a commit that referenced this issue Jun 25, 2018
When autodiscovery fails cache operations are silently queued and
are never dequeued. This leaves the client in an unusable state and
only warns the consumer if onNetError is provided. Since failed
autodiscovery is not recoverable all queued operations should be
rejected.

Related to #36.
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

1 participant