accessibility-insights-action icon indicating copy to clipboard operation
accessibility-insights-action copied to clipboard

Added null handling in scanner.ts

Open ashwinGokhale opened this issue 1 year ago • 1 comments

Details

Null pointer exception when reading the scan results:

##[error][Exception]ErrorWithCause: An error occurred while scanning website page http://localhost:9009/ at Logger.trackExceptionAny (/__w/_tasks/accessibility-insights_4811a442-2fd3-5aa8-ba1a-14cb7e24c113/2.0.6/index.js:189664:29) at Scanner. (/__w/_tasks/accessibility-insights_4811a442-2fd3-5aa8-ba1a-14cb7e24c113/2.0.6/index.js:190823:29) at Generator.next () at fulfilled (/__w/_tasks/accessibility-insights_4811a442-2fd3-5aa8-ba1a-14cb7e24c113/2.0.6/index.js:190741:58) caused by: TypeError: Cannot read property 'baseUrl' of undefined at Scanner.getCombinedReportParameters (/__w/_tasks/accessibility-insights_4811a442-2fd3-5aa8-ba1a-14cb7e24c113/2.0.6/index.js:190837:60) at Scanner. (/__w/_tasks/accessibility-insights_4811a442-2fd3-5aa8-ba1a-14cb7e24c113/2.0.6/index.js:190815:55) at Generator.next () at fulfilled (/__w/_tasks/accessibility-insights_4811a442-2fd3-5aa8-ba1a-14cb7e24c113/2.0.6/index.js:190741:58) Accessibility scanning of URL http://localhost:9009/ completed

Motivation

Addresses #2014

Context

Pull request checklist

  • [x] Addresses an existing issue: Fixes #0000
  • [x] Added relevant unit test for your changes. (yarn test)
  • [x] Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • [x] Ran precheckin (yarn precheckin)

ashwinGokhale avatar Feb 20 '24 21:02 ashwinGokhale

Thanks for submitting PR. We are interested in review this PR but we cannot take this immediately due to some other pending priority issues. We will take this later.

v-viyada avatar Feb 29 '24 18:02 v-viyada