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

CDP: addRequestHooks: Unhandled promise rejection at NativeAutomationRequestPipeline._getRequestOptionsModifiedByRequestHook #7846

Closed
vasilyevi opened this issue Jun 30, 2023 · 4 comments · Fixed by #7856
Assignees
Labels
FREQUENCY: level 2 SYSTEM: native automation TYPE: bug The described behavior is considered as wrong (bug).

Comments

@vasilyevi
Copy link

vasilyevi commented Jun 30, 2023

What is your Scenario?

Trying to add RequestHooks

What is the Current behavior?

Unhandled promise rejection at NativeAutomationRequestPipeline._getRequestOptionsModifiedByRequestHook

What is the Expected behavior?

hook is added

What is your public website URL? (or attach your complete example)

https://devexpress.github.io/testcafe/example

What is your TestCafe test code?

import { RequestHook } from 'testcafe';


export class ProdHook extends RequestHook {
    constructor() {
      super(/(devexpress.github.io)/, {
        includeHeaders: true,
        includeBody: true
      });
    }
    async onRequest(event) {
      event.requestOptions.headers['as'] = "true";
    }
    async onResponse() {
    }
  }

fixture `A set of examples that illustrate how to use TestCafe API`

test('Test Selector', async t => {
    const hook = new ProdHook();
    await t.addRequestHooks(hook);
    await t.navigateTo("https://devexpress.github.io/testcafe/example");
    await t.maximizeWindow();
});

Your complete configuration file

No response

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

  1. Run code
  2. Get error

TestCafe version

3.0.1

Node.js version

v16.19.0

Command-line arguments

npx testcafe chrome

Browser name(s) and version(s)

No response

Platform(s) and version(s)

No response

Other

No response

@vasilyevi vasilyevi added the TYPE: bug The described behavior is considered as wrong (bug). label Jun 30, 2023
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jun 30, 2023
@github-actions
Copy link

github-actions bot commented Jul 3, 2023

We appreciate you taking the time to share the information about this issue. We replicated it, and it is currently in our internal queue. Please note that the research may take time. We'll update this thread once we have news.

@github-actions github-actions bot removed STATE: Need response An issue that requires a response or attention from the team. STATE: Issue accepted An issue has been reproduced. labels Jul 3, 2023
@miherlosev miherlosev self-assigned this Jul 4, 2023
@vasilyevi
Copy link
Author

vasilyevi commented Jul 12, 2023

@miherlosev do you know when that will be released

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jul 12, 2023
@miherlosev
Copy link
Collaborator

We are going to release the new TestCafe version within one or two weeks.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Jul 17, 2023
@github-actions
Copy link

Release v3.1.0-rc.1 addresses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FREQUENCY: level 2 SYSTEM: native automation TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
3 participants