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

Could not scan deps with @ on Windows #2090

Closed
fb33 opened this issue Jan 7, 2020 · 7 comments
Closed

Could not scan deps with @ on Windows #2090

fb33 opened this issue Jan 7, 2020 · 7 comments
Labels
bug Issues that are considered to be bugs scanner About the scanner tool

Comments

@fb33
Copy link
Contributor

fb33 commented Jan 7, 2020

Hello

I build ORT locally from the master branch
I run ORT on windows with git bash in admin mode.

The project analyzed is a node project.
(Note, the fix for non-existing github repo works fine, no extra curation needed)

After the scanner phase, I've got 205 errors like :

            source: "ScanCode"
            message: "Could not scan 'NPM:@xtuc:long:4.2.2' (1618/1618): ScanException:\
              \ Running 'D:\\Users\\j.dupont\\AppData\\Local\\Temp\\ort1566383016769617362ScanCode-3.0.2\\\
              scancode-toolkit-3.0.2\\scancode.bat --copyright --license --ignore\
              \ *.ort.yml --info --strip-root --timeout 300 --ignore HERE_NOTICE --ignore\
              \ META-INF/DEPENDENCIES --processes 7 --license-diag --verbose C:\\\
              workspace\\POCs\\MOB_ORT\\my-gateway-web\\client-reports\\downloads\\\
              NPM\\%40xtuc\\long\\4.2.2 --json-pp C:\\workspace\\POCs\\MOB_ORT\\my-gateway-web\\\
              client-reports\\native-scan-results\\NPM\\%40xtuc\\long\\4.2.2\\scan-results_ScanCode.json'\
              \ in 'C:\\workspace\\POCs\\MOB_ORT\\oss-review-toolkit' failed with\
              \ exit code 2:\nUsage: scancode [OPTIONS] <input> <OUTPUT FORMAT\n\n\
              \                OPTION(s)>\n\nTry 'scancode --help' for help on options\
              \ and arguments.\n\n\n\nError: Invalid value for \"input\": Path \"\
              C:\\workspace\\POCs\\MOB_ORT\\my-gateway-web\\client-reports\\\
              downloads\\NPM\\0xtuc\\long\\4.2.2\" does not exist.\n\n"
            severity: "ERROR"

It seems to be a problem of encode/decode url.
The directory that is searched is C:\workspace\POCs\MOB_ORT\my-gateway-web\client-reports\downloads\NPM\0xtuc\long\4.2.2
But the directory that was created in windows file system is C:\workspace\POCs\MOB_ORT\my-gateway-web\client-reports\downloads\NPM%40xtuc\long\4.2.2\

Regards

@sschuberth sschuberth added the scanner About the scanner tool label Jan 7, 2020
@sschuberth
Copy link
Member

I'll try to reproduce the issue by scanning https://github.com/EricMCornelius/ease/ which depends on https://www.npmjs.com/package/@xtuc/long.

@sschuberth
Copy link
Member

sschuberth commented Jan 7, 2020

At least on Linux I cannot reproduce the issue with the attached analyzer result file. Can you reproduce the issue on Windows with this file, @fb33?

@sschuberth
Copy link
Member

Possibly related ScanCode issues: aboutcode-org/scancode-toolkit#442, aboutcode-org/scancode-toolkit#542

@fb33
Copy link
Contributor Author

fb33 commented Jan 7, 2020

Hi, I reproduce the issue with your file, here's the scan-result

@sschuberth
Copy link
Member

I'm working on Windows today, and there I can indeed reproduce the issue. However, it seems to be a pure ScanCode issue, as I can also reproduce it when calling ScanCode directly:

$ scancode --json-pp - --license "NPM\%40xtuc\long\4.2.2\package.json"
Usage: scancode [OPTIONS] <input> <OUTPUT FORMAT OPTION(s)>
Try 'scancode --help' for help on options and arguments.

Error: Invalid value for "input": Path "NPM\0xtuc\long\4.2.2\package.json" does not exist.

I've reported it upstream at aboutcode-org/scancode-toolkit#1876.

@sschuberth sschuberth changed the title Could not scan deps with @ Could not scan deps with @ on Windows Jan 17, 2020
@Duncan-Howe
Copy link

Hopefully this PR will resolve this issue: aboutcode-org/scancode-toolkit#2310
It seems to have successfully scanned my Angular application and other NPM modules with scopes beginning with @ from ORT

@sschuberth sschuberth added the bug Issues that are considered to be bugs label Nov 3, 2021
@sschuberth
Copy link
Member

sschuberth commented Nov 3, 2021

I'm closing this in favor of the ScanCode version configuration / upgrade epic as this issue will disappear once ORT upgrades its default ScanCode version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that are considered to be bugs scanner About the scanner tool
Projects
None yet
Development

No branches or pull requests

3 participants