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

Throws unhandled rejection (Callback was already called) #11

Open
mikberg opened this issue Oct 5, 2016 · 0 comments
Open

Throws unhandled rejection (Callback was already called) #11

mikberg opened this issue Oct 5, 2016 · 0 comments

Comments

@mikberg
Copy link

mikberg commented Oct 5, 2016

Thanks for an awesome mixin!

I'm getting unhandled rejections when deleting stuff, and have tracked it down to this line, which may both return a promise and call the callback.

2. Unhandled Rejection
   Error: Callback was already called.
    /Users/mikael/.../node_modules/strong-remoting/node_modules/async/dist/async.js:844:36
    /Users/mikael/.../node_modules/strong-remoting/node_modules/async/dist/async.js:3676:17
    /Users/mikael/.../node_modules/strong-remoting/node_modules/async/dist/async.js:339:31
    interceptInvocationErrors (/Users/mikael/.../node_modules/strong-remoting/lib/remote-objects.js:690:22)
    /Users/mikael/.../node_modules/loopback-phase/node_modules/async/lib/async.js:154:25
    /Users/mikael/.../node_modules/loopback-phase/node_modules/async/lib/async.js:154:25
    /Users/mikael/.../node_modules/loopback-phase/node_modules/async/lib/async.js:154:25
    /Users/mikael/.../node_modules/strong-remoting/lib/remote-objects.js:656:7
    /Users/mikael/.../node_modules/strong-remoting/lib/http-context.js:397:7
    /Users/mikael/.../node_modules/strong-remoting/lib/shared-method.js:270:11
    process._tickDomainCallback (internal/process/next_tick.js:129:7)

Removing the return keyword from the line fixes the error.

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