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

Promise.delay() does not produce long stack traces #1182

Closed
ben-page opened this Issue Aug 4, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@ben-page
Contributor

ben-page commented Aug 4, 2016

  1. What version of bluebird is the issue happening on? 3.4.1

  2. What platform and version? (For example Node.js 0.12 or Google Chrome 32) Node.js 4.7.1 on Windows x64 There is no call stack at all on newer version of Node. See #1181

  3. Did this issue happen with earlier version of bluebird? Yes

Promise.resolve()
    .then(() => {
        Promise.delay(1000)
            .then(() => {
                console.log('inner');
            })
    })
    .then(() => {
        console.log('outer');
    });

Console

Warning: a promise was created in a handler but was not returned from it
    at processImmediate [as _immediateCallback] (timers.js:383:17)

outer
inner
@ben-page

This comment has been minimized.

Show comment
Hide comment
@ben-page

ben-page Aug 5, 2016

Contributor

It looks like delay is missing a call to _captureStackTrace(). I added it in the PR.

Contributor

ben-page commented Aug 5, 2016

It looks like delay is missing a call to _captureStackTrace(). I added it in the PR.

@ben-page ben-page changed the title from runaway promise caused by Promise.delay() does not produce a useful call stack to runaway promise caused by Promise.delay() does have long stack traces Aug 5, 2016

@ben-page ben-page changed the title from runaway promise caused by Promise.delay() does have long stack traces to Promise.delay() does not produce long stack traces Aug 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment