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

issues logging in with #329

Open
BlueEther opened this issue Jul 1, 2024 · 7 comments
Open

issues logging in with #329

BlueEther opened this issue Jul 1, 2024 · 7 comments

Comments

@BlueEther
Copy link

BlueEther commented Jul 1, 2024

Hi
Having issues with both Amperly (ios) and Submariner (macos) connecting to a nghe docker container

Log:

Caused by:
    0: missing field `s`
    1: missing field `s`
2024-07-01T09:28:53.610985Z ERROR tower_http::trace::on_failure: response failed classification=Status code: 500 Internal Server Error latency=0 ms
2024-07-01T09:28:53.772580Z ERROR nghe::open_subsonic::common::error: missing field `s`

Caused by:
    0: missing field `s`
    1: missing field `s`
2024-07-01T09:28:53.772599Z ERROR tower_http::trace::on_failure: response failed classification=Status code: 500 Internal Server Error latency=0 ms
2024-07-01T09:29:11.407422Z ERROR nghe::open_subsonic::common::error: missing field `s`

Caused by:
    0: missing field `s`
    1: missing field `s`
2024-07-01T09:29:11.407441Z ERROR tower_http::trace::on_failure: response failed classification=Status code: 500 Internal Server Error latency=0 ms

Docker:

services:
  nghe:
    image: ghcr.io/vnghia/nghe-musl:latest
    ports:
      - 3000:3000
    restart: unless-stopped
    environment:
      NGHE_DATABASE__URL: postgres://postgres:postgres@db:5432/postgres
      NGHE_DATABASE__KEY: nnnxxxnnnxxxnnnxxxnnnxxxnnnxxxnnn
    volumes:
      - /mnt/Media/Music/:/data/music/:ro
    depends_on:
      db:
        condition: service_healthy

  db:
    image: postgres:16
    environment:
      POSTGRES_PASSWORD: postgres
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 5s
      timeout: 5s
      retries: 5
@vnghia
Copy link
Owner

vnghia commented Jul 1, 2024

Hi, thank you very much for the very first issue.

The issue is nghe only supports the newer authencation scheme of Opensubsonic as seen here: https://opensubsonic.netlify.app/docs/api-reference/#authentication. I think you can toggle the authentication method in both Amperly and Submariner

@BlueEther
Copy link
Author

Thanks for the project, I was looking for a used based server and saw this on lemmy and thought it worth a try.

I test the above latter

@vnghia
Copy link
Owner

vnghia commented Jul 2, 2024

Please try and give me some feedback. Thank you very much!

@BlueEther
Copy link
Author

Hi can seem to login ok now, but have this in the logs on trying to read from the server:

2024-07-03T06:48:04.030649Z ERROR nghe::open_subsonic::common::error: missing field `id`
Caused by:
    0: missing field `id`
    1: missing field `id`
2024-07-03T06:48:04.031764Z ERROR tower_http::trace::on_failure: response failed classification=Status code: 500 Internal Server Error latency=5 ms

The same library is working in Navidrome

@vnghia
Copy link
Owner

vnghia commented Jul 3, 2024

So there are two fields for artist id in the OpenSubsonic response. The artistId for the old API with the assumption that there is only one artist per song. And the newer ones artists to include multiple artists in the same song.

Nghe only returns artists field while some client might assume that artistId will always be non-null and they will use that empty id to request other information which causes the error above.

I am fine with including the first artist in the artists. But it will not be really consistent because the order of the artists might change everytime. Maybe an environment option to toggle this behavior is good enough for you (the option will sort for consistency and include the first artist) ?

Also, in client that supports multiple artists, you will see something like this (symfonium)
image

or (airsonic)
image

@BlueEther
Copy link
Author

Thanks for the time, you seem to be correct and it is a client problem causing the errors. Substreamer seems to work well, at least with a single album with a single artist, which is more than I can say for either Amperly and Submariner

@vnghia
Copy link
Owner

vnghia commented Jul 3, 2024

I would add an option to add the artistid into the artistid field soon.

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

No branches or pull requests

2 participants