Bluebird / Promise.js warning of deprecated Promise.defer from CircleCi
See original GitHub issueIssue Description
When running tests in CircleCi, tests failures are no longer uploading to my cypress project dashboard. The end of the cypress test run command step in CircleCi shows the message block shown below. The last recording showing on my dashboard was roughly 24hrs ago and no new test-failure recordings have been uploaded since.
Recorded Run: https://dashboard.cypress.io/#/projects/<I-removed-recording-projectId>/runs/2464
(node:987) Warning: a promise was created in a handler at internal/timers.js:443:21 but was not returned from it, see http://goo.gl/rRqMUw
at Function.Promise.cast (/root/.cache/Cypress/3.5.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/promise.js:225:13)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Exited with code 2
Other test warnings are being shown as well, but these are not causing failed upload operation.
(node:987) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.
and
tput: No value for $TERM and no -T specified`
Desired behavior:
After tests run, any failed tests should automatically upload the test recording to my cypress project dashboard.
Steps to reproduce: (app code and test code)
I don’t know what the source of the error is so I don’t know how to reproduce it other than kicking off another build in CircleCi.
This is the contents of my support/index.js code. I have added these in an attempt to debug the error I’m having based on various other reported issues. ( https://github.com/cypress-io/cypress/issues/874 )
support/index.js
// Import commands.js using ES2015 syntax:
import './commands'
// require('cypress-xpath')
Cypress.on('window:before:load', win => {
win.indexedDB.deleteDatabase('localforage')
})
Cypress.on('uncaught:exception', (err, runnable) => {
console.log(err, runnable)
return false
})
Cypress.on('fail', err => {
debugger
})
// patch Cypress top.onerror
Object.defineProperty(top, 'onerror', {
value: window.onerror
})
Versions
Cypress: v3.5.0 Chrome: Most updated version available Electron: Most updated version available
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (4 by maintainers)
first warning
(node: 55218) Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.)
does not appear due to the use of Promise.defer, but because of the use of Promise.pending, which used in video_capture.js:70:23.Stack trace:
(node: 56453) Warning: a promise was created in a handler at internal/timers.js:443:21 but was not returned from it, see http://goo.gl/rRqMUw)
Stack trace:
Released in 3.6.1