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

Unhandled rejection Error: Callback was already called. #20

Open
fsteccanella opened this issue Jul 28, 2017 · 2 comments
Open

Unhandled rejection Error: Callback was already called. #20

fsteccanella opened this issue Jul 28, 2017 · 2 comments

Comments

@fsteccanella
Copy link

fsteccanella commented Jul 28, 2017

Hi thanks for your mixin!
i'm receiving this exception:

Unhandled rejection Error: Callback was already called.
    at <path>/node_modules/async/dist/async.js:903:32
    at <path>/node_modules/async/dist/async.js:3858:13
    at interceptInvocationErrors (<path>/node_modules/strong-remoting/lib/remote-objects.js:713:22)
    at <path>/node_modules/strong-remoting/node_modules/loopback-phase/node_modules/async/lib/async.js:154:25
    at <path>/node_modules/strong-remoting/node_modules/loopback-phase/node_modules/async/lib/async.js:154:25
    at <path>/node_modules/strong-remoting/node_modules/loopback-phase/node_modules/async/lib/async.js:154:25
    at <path>/node_modules/strong-remoting/lib/remote-objects.js:679:7
    at <path>/node_modules/strong-remoting/lib/http-context.js:305:7
    at <path>/node_modules/strong-remoting/lib/shared-method.js:277:11
    at tryCatcher (<path>/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (<path>/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (<path>/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._fulfillPromises (<path>/node_modules/bluebird/js/release/promise.js:668:14)
    at Promise._settlePromises (<path>/node_modules/bluebird/js/release/promise.js:694:18)
    at Async._drainQueue (<path>/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (<path>/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (<path>/node_modules/bluebird/js/release/async.js:17:14)

I have solved commenting this line

Thanks

@mrfelton
Copy link

mrfelton commented Aug 3, 2017

Hi @fsteccanella thanks for the fix. However, I think a better fix in this case would be to remove the return statement this line linehttps://github.com/fullcube/loopback-ds-paginate-mixin/blob/master/lib/paginate.js#L153. This way, we can continue to support both promise based and callback based usages.

@gtamas
Copy link

gtamas commented Dec 3, 2017

Hi!

Cool mixin, but I'm getting this error too :(
Is anybody working on this issue or is it abandoned?

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

3 participants