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

Option 'token' is deprecated. Use 'apiKey' instead. #51

Closed
MadSandwich opened this issue Nov 9, 2023 · 3 comments · Fixed by #39
Closed

Option 'token' is deprecated. Use 'apiKey' instead. #51

MadSandwich opened this issue Nov 9, 2023 · 3 comments · Fixed by #39
Assignees
Labels
bug Something isn't working
Milestone

Comments

@MadSandwich
Copy link

While using token as described in the configuration example -> https://github.com/reportportal/examples-js/blob/main/example-webdriverio/examples-webdriverio-mocha/wdio.conf.js
Everything is working but receiving annoying warn message to use apiKey instead, whenever I set apiKey instead of token I receive an error:

ReportPortalRequiredOptionError: 
ReportPortal client error: 
Validation failed. Please, check the specified parameters: 
Property 'apiKey' must not be empty.
    at getApiKey (path/node_modules/@reportportal/client-javascript/lib/commons/config.js:25:13)
    at getClientConfig (path/node_modules/@reportportal/client-javascript/lib/commons/config.js:40:20)
    at new RPClient (path/node_modules/@reportportal/client-javascript/lib/report-portal-client.js:34:19)
    at new Reporter (path/node_modules/@reportportal/agent-js-webdriverio/src/reporter.ts:57:19)
    at BaseReporter._loadReporter (file://path/node_modules/@wdio/runner/build/reporter.js:161:20)
    at Array.map (<anonymous>)
    at BaseReporter.initReporters (file://path/node_modules/@wdio/runner/build/reporter.js:23:68)
    at Runner.run (file://path/node_modules/@wdio/runner/build/index.js:70:30)

wdio.config

const rpConfig = {
  apiKey: 'my_token',
  endpoint: 'url/api/v1',
  project: 'xxx',
  launch: `Launch name`,
  mode: 'DEFAULT',
  debug: false,
  attributes: [{ key: 'Platform', value: process.env.ENV }],
  attachPicturesToLogs: true,
  reportSeleniumCommands: false,
  seleniumCommandsLogLevel: 'info',
};
@owens-ben
Copy link

Having the same issue.

@AmsterGet
Copy link
Member

AmsterGet commented Nov 10, 2023

Hi guys!
Thanks for pointing this.
Fix is on the way!
So until the release please use the token option as a workaround.

@AmsterGet AmsterGet self-assigned this Nov 10, 2023
@AmsterGet AmsterGet added the bug Something isn't working label Nov 10, 2023
@AmsterGet AmsterGet added this to the 5.0.4 milestone Nov 10, 2023
@AmsterGet AmsterGet modified the milestones: 5.0.4, 5.1.0 Jan 30, 2024
@AmsterGet
Copy link
Member

Fixed in version 5.1.0.

@AmsterGet AmsterGet linked a pull request Feb 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants