bagetter / BaGetter

A lightweight NuGet and symbol server
https://www.bagetter.com
MIT License
166 stars 38 forks source link

Symbols server page returning 404 #154

Open vh54 opened 2 weeks ago

vh54 commented 2 weeks ago

Describe the bug

I've uploaded a nupkg and a snupkg but I can't consult or autoload the symbols via the url in the documentation.

on page https://www.bagetter.com/docs/Installation/docker it is stated http:///api/download/symbols but it always returns 404

root@buildmachine:/root # dockerps
bagetter/bagetter:latest           bagetter                    Up 21 minutes  2024-06-12 16:58:56 +0200 CEST 0.0.0.0:4444->8080/tcp, :::4444->8080/tcp
√root@buildmachine:/root # curl http://localhost:4444/api/v2/symbol -kv
*   Trying 127.0.0.1:4444...
* Connected to localhost (127.0.0.1) port 4444 (#0)
> GET /api/v2/symbol HTTP/1.1
> Host: localhost:4444
> User-Agent: curl/7.81.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Content-Length: 0
< Date: Wed, 12 Jun 2024 13:26:21 GMT
< Server: Kestrel
<

To Reproduce

Steps to reproduce the behavior:

root@buildmachine:/agu/bagetter # find data
data
data/baget.db
data/packages
data/packages/packages
data/packages/packages/factsdataobjects
data/packages/packages/factsdataobjects/4.9.9
data/packages/packages/factsdataobjects/4.9.9/factsdataobjects.4.9.9.nupkg
data/packages/packages/factsdataobjects/4.9.9/factsdataobjects.nuspec
data/packages/symbols
data/packages/symbols/factsdataobjects.pdb
data/packages/symbols/factsdataobjects.pdb/7dc8b3ca5b174bd1a0a6400423cf5b90ffffffff
root@buildmachine:/agu/bagetter # cat bagetter.yml
version: '3.8'

services:
  nuget-server:
    image: bagetter/bagetter:latest
    container_name: bagetter
    restart: unless-stopped
    ports:
      - "4444:8080"
    env_file:
      - bagetter.env
    environment:
      - BaseURL=https://bagetter.foo.com/
    volumes:
      - ./data:/data
root@buildmachine:/agu/bagetter # cat bagetter.env
# The following config is the API Key used to publish packages.
# You should change this to a secret value to secure your server.
ApiKey=foo
Storage__Type=FileSystem
Storage__Path=/data/packages
Database__Type=Sqlite
Database__ConnectionString=Data Source=/data/baget.db
Search__Type=Database
AllowPackageOverwrites=true
Symbols__Enabled=true 

Expected behavior

Not a 404 but a usefull where symbols could be looked up

Regenhardt commented 2 weeks ago

curl http://localhost:4444/api/v2/symbol will not work, there's no GET mapped to that endpoint.

In your case, what if you run curl http://localhost:4444/api/download/symbols/factsdataobjects.pdb/7dc8b3ca5b174bd1a0a6400423cf5b90?

Will test this soon, just don't have the time right now.

vh54 commented 2 weeks ago

Thank you for your response. It does not return a result no. Here some curls

√root@buildmachine:/agu/bagetter # curl  http://localhost:4444/api/download/symbols/factsdataobjects.pdb/7dc8b3ca5b174bd1a0a6400423cf5b90 -v
*   Trying 127.0.0.1:4444...
* Connected to localhost (127.0.0.1) port 4444 (#0)
> GET /api/download/symbols/factsdataobjects.pdb/7dc8b3ca5b174bd1a0a6400423cf5b90 HTTP/1.1
> Host: localhost:4444
> User-Agent: curl/7.81.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Content-Length: 0
< Date: Thu, 13 Jun 2024 07:20:48 GMT
< Server: Kestrel
<
* Connection #0 to host localhost left intact
√root@buildmachine:/agu/bagetter # curl  http://localhost:4444/api/download/symbols/factsdataobjects.pdb/7dc8b3ca5b174bd1a0a6400423cf5b90ffffffff -v
*   Trying 127.0.0.1:4444...
* Connected to localhost (127.0.0.1) port 4444 (#0)
> GET /api/download/symbols/factsdataobjects.pdb/7dc8b3ca5b174bd1a0a6400423cf5b90ffffffff HTTP/1.1
> Host: localhost:4444
> User-Agent: curl/7.81.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Content-Length: 0
< Date: Thu, 13 Jun 2024 07:21:43 GMT
< Server: Kestrel
<
* Connection #0 to host localhost left intact
√root@buildmachine:/agu/bagetter # curl  http://localhost:4444/v3/symbol/factsdataobjects.pdb/7dc8b3ca5b174bd1a0a6400423cf5b90 -v
*   Trying 127.0.0.1:4444...
* Connected to localhost (127.0.0.1) port 4444 (#0)
> GET /v3/symbol/factsdataobjects.pdb/7dc8b3ca5b174bd1a0a6400423cf5b90 HTTP/1.1
> Host: localhost:4444
> User-Agent: curl/7.81.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Content-Length: 0
< Date: Thu, 13 Jun 2024 07:20:26 GMT
< Server: Kestrel
<
* Connection #0 to host localhost left intact
√root@buildmachine:/agu/bagetter # curl -o factsdataobjects.4.9.9.nupkg http://localhost:4444/v3/package/factsdataobjects/4.9.9/factsdataobjects.4.9.9.nupkg
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  156k  100  156k    0     0  19.4M      0 --:--:-- --:--:-- --:--:-- 21.7M
√root@buildmachine:/agu/bagetter # curl  http://localhost:4444/api/download/symbols -v
*   Trying 127.0.0.1:4444...
* Connected to localhost (127.0.0.1) port 4444 (#0)
> GET /api/download/symbols HTTP/1.1
> Host: localhost:4444
> User-Agent: curl/7.81.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Content-Length: 0
< Date: Thu, 13 Jun 2024 07:21:56 GMT
< Server: Kestrel
<
* Connection #0 to host localhost left intact

My ultimate goal would be to have the url of symbol server in visual studio to it's possible to automatically download uploaded symbols:

image