SamTV12345 / PodFetch

A sleek and efficient podcast downloader.
https://samtv12345.github.io/PodFetch
Apache License 2.0
347 stars 25 forks source link

Can't login with antennapod #523

Closed psongers closed 9 months ago

psongers commented 9 months ago

Describe the bug

I'm using:

What works:

"Login successful"


What doesn't work:
* When i try to add a gpodder.net server it fails
* I enter in `http://podfetch.xxx.net`
* unsecure popup shows "Password and data are not encrypted!" as expected
* When i enter wrong  password i get the error "Unable to connect to Gpodder.net code 403: Forbidden" as expected
* When i enter wrong username i get the error "Unable to connect to Gpodder.net code 404: Not Found" which seems expected too.
* When i try to login with correct details i see a spinner for a millisecond and then the login button shows again. The stack trace in antennapod shows that there is an error without a message (I attach the stack trace below)

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Throwable.getMessage()' on a null object reference at de.danoeh.antennapod.fragment.preferences.synchronization.GpodderAuthenticationFragment.lambda$setupLoginView$4(GpodderAuthenticationFragment.java:143) at de.danoeh.antennapod.fragment.preferences.synchronization.GpodderAuthenticationFragment.$r8$lambda$PblfpjkWv1kDOd7pkvsz-m1lYHc(GpodderAuthenticationFragment.java:0) at de.danoeh.antennapod.fragment.preferences.synchronization.GpodderAuthenticationFragment$$ExternalSyntheticLambda3.accept(R8$$SyntheticClass:0) at io.reactivex.internal.observers.CallbackCompletableObserver.onError(CallbackCompletableObserver.java:64) at io.reactivex.internal.operators.completable.CompletableObserveOn$ObserveOnCompletableObserver.run(CompletableObserveOn.java:87) at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:124) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8194) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)


### Reproduction

restarted docker image and mounted fresh volume

### System Info

```Shell
Docker image: 78345aff3278d7c60236020b59eb22449b2c7ff1eef834e8222f8372dc414c33

Phone
## Environment
Android version: 14
OS version: 5.10.177-android13-4-00003-ga7208022a7ea-ab10815828
AntennaPod version: 3.2.0
Model: Pixel 7
Device: panther
Product: panther

## Crash info
Time: 03-01-2024 00:22:12
AntennaPod version: 3.2.0

Used Package Manager

n/a

Validations

SamTV12345 commented 9 months ago

Hi @psongers, thanks for the issue. Could you please update to the latest image? This issue was fixed yesterday and works at least on my phone without a problem.

psongers commented 9 months ago

I tried pinning to latest image it still has the same problem v4.6.0-7d4fa09. Also for me it seems older versions e.g. v4.5.0-c60dad5 do not work as well. I'm not sure why the Cookie is never returned in the response headers

SamTV12345 commented 9 months ago

Weird. I'll try to investigate that @arcoast did the fix work for you?

Scridgeon commented 9 months ago

I'm getting the same 404 error when trying to log into AntennaPod. I'm using the same username and password that I created through /app/podfetch users add. This is a fresh install on 1/5/2024.

psongers commented 9 months ago

@SamTV12345 Thanks! It doesn't make sense to me either. I might try run it on a different computer and see if it works.

@Scridgeon The 404 error may be because the env var GPODDER_INTEGRATION_ENABLED is not set to true. The error I'm experiencing is logging in with valid details is returning status 200 but then I don't receive a session cookie

Scridgeon commented 9 months ago

That fixed the issue for me. Thanks!

SamTV12345 commented 9 months ago

Should be fixed @psongers . Could it be that you are trying to login with the administrator account or an account similar to the administrator account?

psongers commented 9 months ago

Thanks @SamTV12345! you're exactly right I was using an administrator account. I didn't realise you had to use a user account instead.

Confirming it works as expected when switching to a user account and I see a 409 status code when I try to login with an admin.

SamTV12345 commented 9 months ago

You're welcome 😊. I accidentally returned a status 200 when someone logs in to the admin account via AntennaPod. It should be now a 409 with the clear description that one can't use the admin account for AntennaPod.

BadCo-NZ commented 8 months ago

You're welcome 😊. I accidentally returned a status 200 when someone logs in to the admin account via AntennaPod. It should be now a 409 with the clear description that one can't use the admin account for AntennaPod.

This had me stumped for a while and I never read anywhere about the admin account and gpodder user account needing to be separate.