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

API returns no results irrespective of the input #153

Open
KShivendu opened this issue Jan 11, 2023 · 5 comments
Open

API returns no results irrespective of the input #153

KShivendu opened this issue Jan 11, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@KShivendu
Copy link

KShivendu commented Jan 11, 2023

Hi I tried running the license parsing tool with the following test cases:

  1. https://github.com/ecosyste-ms/digest/archive/refs/heads/main.zip
  2. https://repo.clojars.org/org/clojars/majorcluster/clj-data-adapter/0.2.1/clj-data-adapter-0.2.1.jar.

Turns out, none of them are working. I got the following response from the API:

{
  "id": "def8621f-8866-4cea-9119-678be62f17c0",
  "url": "https://repo.clojars.org/org/clojars/majorcluster/clj-data-adapter/0.2.1/clj-data-adapter-0.2.1.jar",
  "status": "complete",
  "results": {
    "licenses": [
      
    ],
    "matched_files": [
      
    ]
  },
  "created_at": "2023-01-11T11:20:26.107Z",
  "updated_at": "2023-01-11T11:20:26.396Z",
  "sidekiq_id": "84305bcfb521b530f1dd7b7a",
  "sha256": "c12d95ba835cd083c723739b5c971c7fb683a30b9a6da35929e265b71cbda323"
}
Fund with Polar
@KShivendu KShivendu changed the title API returns no results irrespective of input. API returns no results irrespective of the input Jan 11, 2023
@andrew andrew added the bug Something isn't working label Jan 11, 2023
@andrew
Copy link
Member

andrew commented Jan 11, 2023

Thanks for reporting, i will investigate

andrew added a commit that referenced this issue Jan 11, 2023
@andrew
Copy link
Member

andrew commented Jan 11, 2023

Turns out redirects were not being correctly handled (url 1), I'm deploying a fix for that now.

Url 2 doesn't have any license files inside the jar, so that's the expected output, not a great test case but was mostly added to check that jar files are correctly extracted.

@andrew
Copy link
Member

andrew commented Jan 11, 2023

@KShivendu
Copy link
Author

Great. Thanks!

I just cross-checked, the .zip file test case is giving results but not the .jar file. Is this expected?

Thanks again :D

@andrew
Copy link
Member

andrew commented Jan 17, 2023

The jar file in that example does not contain a license file, so that's the expected result, although it doesn't appear to be working correctly for jar files that do contain license files such as https://repo.maven.apache.org/maven2/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar, so that needs fixing.

@andrew andrew self-assigned this Jan 17, 2023
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

No branches or pull requests

2 participants