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

RequestError [HttpError]: Invalid request. #1041

Closed
TheMostDiligent opened this issue Apr 25, 2022 · 5 comments · Fixed by #1042
Closed

RequestError [HttpError]: Invalid request. #1041

TheMostDiligent opened this issue Apr 25, 2022 · 5 comments · Fixed by #1042
Assignees

Comments

@TheMostDiligent
Copy link

Hello!
I get the following error when running the action on windows-2022:

RequestError [HttpError]: Invalid request.

2.8.5
 does not match /^[0-9]+\.[0-9]+\.[0-9]+$/.
    at D:\a\_actions\github\codeql-action\v2\node_modules\@octokit\request\dist-node\index.js:66:23
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Job.doExecute (D:\a\_actions\github\codeql-action\v2\node_modules\bottleneck\light.js:405:18) {
  status: 422,
  headers: {
    'access-control-allow-origin': '*',
    'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
    connection: 'close',
    'content-length': '139',
    'content-security-policy': "default-src 'none'",
    'content-type': 'application/json; charset=utf-8',
    date: 'Mon, 25 Apr 2022 19:11:00 GMT',
    'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
    server: 'GitHub.com',
    'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
    vary: 'Accept-Encoding, Accept, X-Requested-With',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'deny',
    'x-github-media-type': 'github.v3; format=json',
    'x-github-request-id': '0400:0EE5:49A2E6:4E4120:6266F243',
    'x-ratelimit-limit': '1000',
    'x-ratelimit-remaining': '968',
    'x-ratelimit-reset': '1650915536',
    'x-ratelimit-resource': 'core',
    'x-ratelimit-used': '32',
    'x-xss-protection': '0'
  },
  request: {
    method: 'PUT',
    url: 'https://api.github.com/repos/DiligentGraphics/DiligentCore/code-scanning/analysis/status',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'CodeQL-Action/2.1.8 octokit-core.js/3.1.2 Node.js/16.13.0 (win32; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: '{"workflow_run_id":2222301859,"workflow_name":"Code Scanning","job_name":"run-analysis","analysis_key":".github/workflows/codeql.yml:run-analysis","commit_oid":"6407a1da1d697a1efca77a70a238bd2de05dc5b8","ref":"refs/heads/code_ql","action_name":"init","action_ref":"v2","action_oid":"unknown","started_at":"2022-04-25T19:10:26.5[98](https://github.com/DiligentGraphics/DiligentCore/runs/6163732528?check_suite_focus=true#step:6:98)Z","action_started_at":"2022-04-25T19:10:26.598Z","status":"success","runner_os":"Windows","action_version":"2.1.8","completed_at":"2022-04-25T19:10:59.831Z","matrix_vars":"{\\n  \\"toolset\\": \\"x64\\",\\n  \\"build_type\\": \\"Debug\\",\\n  \\"host_name\\": \\"Win10\\",\\n  \\"cmake_args\\": \\"-DDILIGENT_NO_GLSLANG=ON -DDILIGENT_NO_HLSL=ON\\",\\n  \\"os\\": \\"windows-2022\\",\\n  \\"cmake_generator\\": \\"Visual Studio 17 2022\\"\\n}","runner_arch":"X64","runner_os_release":"10.0.20348","codeql_version":"2.8.5\\r\\n","disable_default_queries":"","languages":"cpp","ml_powered_javascript_queries":"false","paths":"","paths_ignore":"","queries":"","tools_input":"","tools_resolved_version":"20220401","workflow_languages":"cpp"}',
    request: { agent: [Agent], hook: [Function: bound bound register] }
  },
  documentation_url: 'https://docs.github.com/rest'
}

The error happens first during the initialization, and then again after the analysis completes. The same job runs fine without any errors on ubuntu-latest.

@cklin cklin self-assigned this Apr 25, 2022
@cklin
Copy link
Contributor

cklin commented Apr 25, 2022

Thank you for the report! Let me take a look and see what is going on.

@TheMostDiligent
Copy link
Author

@cklin Thank you. I found the same error in other repos that run CodeQL on Windows.

@edoardopirovano
Copy link
Contributor

Thanks for the report! We've merged a fix on our development branch and expect to roll it out in the next day or so.

@TheMostDiligent
Copy link
Author

@edoardopirovano Thank you! Are you going to create a new tag when you merge this or update v2?

@edoardopirovano
Copy link
Contributor

@edoardopirovano Thank you! Are you going to create a new tag when you merge this or update v2?

v2 will be updated to get this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants