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

Failed to start suite. Error: Request failed with status code 404 #57

Closed
DHenry7471 opened this issue Aug 17, 2022 · 4 comments · Fixed by #58 or #66
Closed

Failed to start suite. Error: Request failed with status code 404 #57

DHenry7471 opened this issue Aug 17, 2022 · 4 comments · Fixed by #58 or #66

Comments

@DHenry7471
Copy link

DHenry7471 commented Aug 17, 2022

Getting this error whenever I try to run the example playwright tests with ReportPortal

failed to finish test. Error: Request failed with status code 404 at /XXXXXX/playwright/node_modules/.pnpm/@[email protected]/node_modules/@reportportal/client-javascript/lib/rest.js:37:15

Here's my config.ts file

const RPconfig = {
  'token': 'XXXXXXXXXXXXX',
  'endpoint': 'https://localhost:8080/api/v1',
  'project': 'XXXXXXXXXl',
  'launch': 'superadmin_TEST_EXAMPLE',
  'attributes': [
    {
      'key': 'key',
      'value': 'value',
    },
    {
      'value': 'value',
    },
  ],
  'description': 'Playwright E2E tests',
};

const config: PlaywrightTestConfig = {
  testDir: './tests',
  /* Maximum time one test can run for. */
  timeout: 30 * 1000,
  expect: {
    /**
     * Maximum time expect() should wait for the condition to be met.
     * For example in `await expect(locator).toHaveText();`
     */
    timeout: 5000
  },
  /* Run tests in files in parallel */
  fullyParallel: true,
  /* Fail the build on CI if you accidentally left test.only in the source code. */
  forbidOnly: !!process.env.CI,
  /* Retry on CI only */
  retries: process.env.CI ? 2 : 0,
  /* Opt out of parallel tests on CI. */
  workers: process.env.CI ? 1 : undefined,
  /* Reporter to use. See https://playwright.dev/docs/test-reporters */
  reporter: [['@reportportal/agent-js-playwright', RPconfig]],
  /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
  use: {
    /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
    actionTimeout: 0,
    /* Base URL to use in actions like `await page.goto('/')`. */
    // baseURL: 'http://localhost:3000',

    /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
    trace: 'on-first-retry',
  },
@AmsterGet
Copy link
Member

Hello @DHenry7471 !
Did you use the example from our repo with examples?
Could you please provide a reproducible example for this issue?

@DHenry7471
Copy link
Author

Hello @DHenry7471 ! Did you use the example from our repo with examples? Could you please provide a reproducible example for this issue?

I was using the example tests generated from playwright itself

I'm also seeing this error as well

/XXXX/test/playwright/node_modules/.pnpm/@[email protected]/node_modules/@reportportal/agent-js-playwright/build/reporter.js:462
                        rootSuiteName = parentObj.rootSuite;
                                                  ^

TypeError: Cannot read properties of undefined (reading 'rootSuite')
    at RPReporter.<anonymous> (/XXXXX/test/playwright/node_modules/.pnpm/@[email protected]/node_modules/@reportportal/agent-js-playwright/src/reporter.ts:483:37)
    at step (/XXXXX/test/playwright/node_modules/.pnpm/@[email protected]/node_modules/@reportportal/agent-js-playwright/build/reporter.js:60:23)
    at Object.next (/XXXXX/test/playwright/node_modules/.pnpm/@[email protected]/node_modules/@reportportal/agent-js-playwright/build/reporter.js:41:53)
    at /XXXXX/test/playwright/node_modules/.pnpm/@[email protected]/node_modules/@reportportal/agent-js-playwright/build/reporter.js:35:71
    at new Promise (<anonymous>)
    at __awaiter (/XXXXXX/test/playwright/node_modules/.pnpm/@[email protected]/node_modules/@reportportal/agent-js-playwright/build/reporter.js:31:12)
    at RPReporter.onTestEnd (/XXXXX/test/playwright/node_modules/.pnpm/@[email protected]/node_modules/@reportportal/agent-js-playwright/build/reporter.js:423:16)
    at /XXXXX/test/playwright/node_modules/.pnpm/@[email protected]/node_modules/@playwright/test/lib/reporters/multiplexer.js:69:131
    at wrap (/XXXXX/test/playwright/node_modules/.pnpm/@[email protected]/node_modules/@playwright/test/lib/reporters/multiplexer.js:119:5)
    at Multiplexer.onTestEnd (/XXXXX/test/playwright/node_modules/.pnpm/@[email protected]/node_modules/@playwright/test/lib/reporters/multiplexer.js:66:45)
    at Dispatcher._reportTestEnd (/XXXXX/test/playwright/node_modules/.pnpm/@[email protected]/node_modules/@playwright/test/lib/dispatcher.js:574:159)
    at Worker.onTestEnd (/XXXXX/test/playwright/node_modules/.pnpm/@[email protected]/node_modules/@playwright/test/lib/dispatcher.js:240:12)
    at Worker.emit (node:events:527:28)
    at ChildProcess.<anonymous> (/XXXXX/test/playwright/node_modules/.pnpm/@[email protected]/node_modules/@playwright/test/lib/dispatcher.js:633:12)

@AmsterGet
Copy link
Member

AmsterGet commented Sep 14, 2022

Hello @DHenry7471!
We have released a version 5.0.7 with a fixes.
Could you confirm that this fixes the issue?

@AmsterGet
Copy link
Member

Closed together with #56

@DHenry7471 feel free to reopen it if needed.

@AmsterGet AmsterGet linked a pull request Sep 16, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants