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

Getting (node:19069) UnhandledPromiseRejectionWarning after upgrading to 0.17.2 #1769

Closed
planet71 opened this issue Sep 7, 2017 · 5 comments
Labels
AREA: build STATE: Need clarification An issue lacks information for further research. TYPE: bug The described behavior is considered as wrong (bug).

Comments

@planet71
Copy link

planet71 commented Sep 7, 2017

Are you requesting a feature or reporting a bug?

Bug

What is the current behavior?

Unable to run tests. After upgrading to v0.17.2 and running:

testcafe chrome test1.js --no-sandbox

I get the following error:

(node:19069) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot find module 'testcafe-hammerhead'

(node:19069) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the No de.js process with a non-zero exit code.

What is the expected behavior?

Tests should run successfully.

How would you reproduce the current behavior (if this is a bug)?

Run tests.

Provide the test code and the tested page URL (if applicable)

Tested page URL: Tested on localhost.

Test code

import { Selector, Role, ClientFunction } from 'testcafe';

const messengerBody = Selector('div').withAttribute('data-test', 'container');

const user = Role('http://localhost:8091', async t => {
    await t
        .typeText('#user', 'someid')
        .typeText('#pass', 'someuserpass')
        .click('#btn');

});

fixture `Login`
    .page('http://localhost:8091');


test('check if feature is loaded', async t => {
    await t
        .useRole(user)
        .expect(messengerBody.exists).ok();
});

Specify your

  • operating system: Ubuntu 16.04 LTS
  • testcafe version: 0.17.2
  • node.js version: 8.2.1
@AlexanderMoskovkin
Copy link
Contributor

Hi @planet71,

Have you installed testcafe locally into your project or globally (with the -g npm flag)? If locally could you please try to remote the node_modules directory and reinstall all dependencies again?

@AlexanderMoskovkin AlexanderMoskovkin added AREA: build STATE: Need clarification An issue lacks information for further research. TYPE: bug The described behavior is considered as wrong (bug). labels Sep 7, 2017
@planet71
Copy link
Author

planet71 commented Sep 7, 2017

Hi @AlexanderMoskovkin,
I've removed node_modules and reintsalled all dependencies, but it didn't help out.

@AlexanderMoskovkin
Copy link
Contributor

what do you use, npm or yarn?

@AndreyBelym
Copy link
Contributor

AndreyBelym commented Sep 8, 2017

Hello @planet71, I've encountered similar type of issue, but not with version 0.17.2. If you are using npm, try to clean cache npm cache clean -f, remove node_modules and install TestCafe. If it won't help, try to install [email protected].

@planet71
Copy link
Author

planet71 commented Sep 8, 2017

Cleaning cache helped out. Thanks.

@AlexanderEgorov @AndreyBelym

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AREA: build STATE: Need clarification An issue lacks information for further research. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

3 participants