petio-team / petio

Petio Request, Discover, Review
https://petio.tv
MIT License
251 stars 28 forks source link

Radarr/Sonnar tests say success even if they actually failed #507

Closed Fronix closed 3 years ago

Fronix commented 3 years ago

Describe the bug While configuring radarr/sonarr you can click the [Test] button to check if Petio can access it. The problem I faced was that I had missed adding the correct URL Base, but the test was still successful.

The console was also not helpful since it only showed an empty Error

:: ERROR ::

To Reproduce Steps to reproduce the behavior:

  1. Have a radarr or sonarr instance running with a URL base like /radarr
  2. Go to Settings->Radarr add a new server
  3. Input all your settings but leave the URL Base empty and click test
  4. The test should be successful, but when you request something, it won't be added.
  5. Check the console errors after requesting (only worked for me when testing sonarr btw)

Expected behavior The test should fail unless correct settings are entered.

Screenshots Screenshot of successful radarr test with the correct settings: image

Screenshot of successful radarr test with the incorrect settings: image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

ADRFranklin commented 3 years ago

It seems this only is a problem when you are modifying an already existing instance of sonarr/radarr, I will look into this.

ADRFranklin commented 3 years ago

@Fronix this should be fixed in dev now, fancy giving it a go and making sure?

Fronix commented 3 years ago

@ADRFranklin just tested latest dev image, I'm still getting success messages while leaving URL Base empty and if I save it and request something it never shows up in radarr or sonarr.

This only seems to happen if you leave the URL Base empty. If I put /some_incorrect_path it does fail.

Fronix commented 3 years ago

Here's the log for the request:

petio_1     | 2021-07-24T22:36:53.701553766Z 2021-07-25 00:36:53 info: ROUTE: Movie Discovery Profile returned for 1
petio_1     | 2021-07-24T22:37:07.360075602Z 2021-07-25 00:37:07 warn: MAILER: Email disabled, skipping sending emails
petio_1     | 2021-07-24T22:37:07.361924448Z 2021-07-25 00:37:07 warn: DSCRD: No Webhook defined
petio_1     | 2021-07-24T22:37:07.362517555Z 2021-07-25 00:37:07 warn: Telegram: No config defined
petio_1     | 2021-07-24T22:37:07.502389728Z 2021-07-25 00:37:07 info: REQ: Sending to DVR
petio_1     | 2021-07-24T22:37:07.502748095Z 2021-07-25 00:37:07 info: REQ: No profile for DVR
petio_1     | 2021-07-24T22:37:07.503524885Z 2021-07-25 00:37:07 info: SERVICE - RADARR: Processing request
petio_1     | 2021-07-24T22:37:07.506592625Z 2021-07-25 00:37:07 info: SERVICE - RADARR: Request passed to queue
petio_1     | 2021-07-24T22:37:07.930070313Z 2021-07-25 00:37:07 info: SERVICE - RADARR: [Radarr] Radarr job added for Contact

The film Contact never shows up in Radarr

ADRFranklin commented 3 years ago

I'm confused at this, because I can not recreate the issue. If I leave the URL Base empty, it fails if the connection details are wrong and passes if they are right. If I put a / in the URL Base, it gives the same behaviour which is expected.

If I put an invalid URL Base, it fails to test it.

Fronix commented 3 years ago

@ADRFranklin yeah, this is weird...

This is my Radarr Host config: image

I've tested adding a new radarr server and editing an existing while leaving URL Base empty, and it still gives me success.