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

ADO Task: Error: Crawl base URL should not have any query parameters #1332

Open
damongr-msft opened this issue Oct 5, 2022 · 3 comments
Open
Labels
bug Something isn't working status: needs investigation This issue requires investigation (PM, Design, or SWE) by the Accessibility Insights team.

Comments

@damongr-msft
Copy link

damongr-msft commented Oct 5, 2022

Describe the bug

Our web site under test requires a valid query string to operate (otherwise it will error). Having this limitation makes it so the ADO task is unusable for our scenario.

To Reproduce
Steps to reproduce the behavior: Below is the yaml used to test, see the url with query strings

task: accessibility-insights@3
            displayName: Scan for accessibility issues
            inputs:
              hostingMode: 'dynamicSite'
              url: 'https://ourapp.contoso.com/?appid=1235&area=test' 
              serviceAccountName: $(serviceAccountName) # Key vault secret name for the service account name
              serviceAccountPassword: $(serviceAccountPassword) # Key vault secret name for the service password
              authType: 'AAD'
              singleWorker: true
              uploadOutputArtifact: true         

CodePen repro example

The above yaml outputs the error:

##[error][Exception]ErrorWithCause: An error occurred while scanning website page https://ourapp.contoso/?appid=1235&area=test
    at Logger.trackExceptionAny (D:\a\_tasks\accessibility-insights_4811a442-2fd3-5aa8-ba1a-14cb7e24c113\3.1.0\index.js:189142:29)
    at Scanner.<anonymous> (D:\a\_tasks\accessibility-insights_4811a442-2fd3-5aa8-ba1a-14cb7e24c113\3.1.0\index.js:190329:29)
    at Generator.next (<anonymous>)
    at fulfilled (D:\a\_tasks\accessibility-insights_4811a442-2fd3-5aa8-ba1a-14cb7e24c113\3.1.0\index.js:190244:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
caused by: Error: Crawl base URL should not have any query parameters. https://ourapp.contoso/?appid=1235&area=test

Expected behavior

Expected to run against the web site as it requires query parameters to run properly

Context (please complete the following information)

N/A

Are you willing to submit a PR?

Maybe

Did you search for similar existing issues?

Yes

Additional context

@damongr-msft damongr-msft added the bug Something isn't working label Oct 5, 2022
@ghost ghost added the status: new This issue is new and requires triage by DRI. label Oct 5, 2022
@ghost ghost assigned karanbirsingh Oct 5, 2022
@karanbirsingh karanbirsingh added the status: ready for triage This issue is ready to be triaged by the Accessibility Insights team. label Oct 7, 2022
@ghost ghost assigned asksep Oct 7, 2022
@ghost
Copy link

ghost commented Oct 7, 2022

This issue has been marked as ready for team triage; we will triage it in our weekly review and update the issue. Thank you for contributing to Accessibility Insights!

@ghost ghost removed the status: new This issue is new and requires triage by DRI. label Oct 7, 2022
@asksep asksep added status: needs investigation This issue requires investigation (PM, Design, or SWE) by the Accessibility Insights team. and removed status: ready for triage This issue is ready to be triaged by the Accessibility Insights team. labels Oct 31, 2022
@asksep asksep removed their assignment Oct 31, 2022
@brocktaylor7
Copy link
Contributor

Hello @damongr-msft,
Due to a limitation of an upstream library from us, unfortunately you can't have a query parameter in the url input. There is a workaround that is a bit quirky but is better than nothing. Here's how to implement the workaround:

  1. Specify URLs with query parameters using the inputUrls input
  2. Set the url input to the URL excluding the query parameter
  3. Set the maxUrls input to the same number of URLs specified in the inputUrls input.

During execution, the inputUrls are added to the processing queue first, so it will process the URLs with the query parameter and will stop scanning before it adds the main url without the query parameter to the queue. The downside is that you can't properly crawl any URLs using a query parameter.

We're still looking into the feasibility of changing this in the upstream package that causes this behavior, but don't currently have a timeline for when this might be fully resolved.  

@DaveTryon
Copy link
Contributor

There's nothing that we can do with this at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status: needs investigation This issue requires investigation (PM, Design, or SWE) by the Accessibility Insights team.
Projects
Development

No branches or pull requests

5 participants