oxtyped / gpodder2go

gpodder2go is a simple self-hosted, golang, drop-in replacement for gpodder/mygpo server to handle podcast subscriptions management for gpodder clients
GNU Affero General Public License v3.0
103 stars 13 forks source link

Cant connect via AntennaPod #30

Open SmurgBurglar opened 6 months ago

SmurgBurglar commented 6 months ago

I have managed to connect via gPodder on the desktop but not via AntennaPod. photo_2024-05-13_21-03-25

oxtyped commented 6 months ago

Hi @SmurgBurglar, can you paste me the output log of the server after you fail to login?

SmurgBurglar commented 6 months ago

VERIFIER_SECRET_KEY="22" gpodder2go serve 2024/05/23 23:49:10 💻 Starting server at localhost:3005

oxtyped commented 6 months ago

Thanks!

Is there no other output from the server after you attempt to login via Antennapod?

SmurgBurglar commented 6 months ago

Nah, nothing even Gpodder cant connect, although that gives a message.

VERIFIER_SECRET_KEY="22" gpodder2go serve 2024/05/24 17:36:58 💻 Starting server at localhost:3005 2024/05/24 17:37:00 http: named cookie not present 2024/05/24 17:37:00 [j-b650maoruselite/zniYQHkHEG-000001] "PUT http://localhost:3005/subscriptions/jay/j-b650maoruselite.json HTTP/1.1" from 127.0.0.1:55816 - 400 0B in 30.347µs

oxtyped commented 4 months ago

@SmurgBurglar if you're using gpodder client, you need to run it with --no-auth else it will error out like this.

Can you share your logs when you connect to Antennapod?

p/s: I've pushed in 566505b645909490d73b621adbd6699d51ad1e0b which should return a more detailed error if the cookie is not found, do update to the latest master and try again before pulling the logs.

Thanks for the bug report!

SmurgBurglar commented 4 months ago

So just to be clear, how should the address be formatted? Should it be just a plain IP address, or should it include the port, and should it be prefaced by HTTP/HTTPS?

SmurgBurglar commented 4 months ago

It seems like the only way it will accept a connection is with "localhost:3005" Here is what i get from that. VERIFIER_SECRET_KEY="22" gpodder2go serve --no-auth 2024/07/24 00:14:08 💻 Starting server at localhost:3005 2024/07/24 00:14:46 username is jay, deviceName is j-b650maoruselite 2024/07/24 00:14:46 DDR is &apis.DeviceDataRequest{Caption:"gPodder on j-b650maoruselite", Type:"desktop"} and "jay" "j-b650maoruselite" 2024/07/24 00:14:46 [j-b650maoruselite/5r6xeFu0o7-000001] "POST http://localhost:3005/api/2/devices/jay/j-b650maoruselite.json HTTP/1.1" from 127.0.0.1:48066 - 200 0B in 17.585971ms 2024/07/24 00:14:46 [j-b650maoruselite/5r6xeFu0o7-000002] "GET http://localhost:3005/api/2/subscriptions/jay/j-b650maoruselite.json?since=1721743927 HTTP/1.1" from 127.0.0.1:48080 - 200 45B in 203.995µs 2024/07/24 00:14:46 error getting device_sync_group_id: &sqlite.Error{msg:"SQL logic error: no such table: device_sync_group_devices (1)", code:1} 2024/07/24 00:14:46 error trying to retrieve devices in sync_group: SQL logic error: no such table: device_sync_group_devices (1) 2024/07/24 00:14:46 [j-b650maoruselite/5r6xeFu0o7-000003] "POST http://localhost:3005/api/2/subscriptions/jay/j-b650maoruselite.json HTTP/1.1" from 127.0.0.1:48092 - 500 0B in 84.118µs 2024/07/24 00:14:46 [j-b650maoruselite/5r6xeFu0o7-000004] "GET http://localhost:3005/api/2/episodes/jay.json?since=1721743927 HTTP/1.1" from 127.0.0.1:48102 - 200 37B in 49.152µs 2024/07/24 00:14:46 [j-b650maoruselite/5r6xeFu0o7-000005] "GET http://localhost:3005/api/2/subscriptions/jay/j-b650maoruselite.json?since=1721744086 HTTP/1.1" from 127.0.0.1:48110 - 200 45B in 103.856µs 2024/07/24 00:14:46 error getting device_sync_group_id: &sqlite.Error{msg:"SQL logic error: no such table: device_sync_group_devices (1)", code:1} 2024/07/24 00:14:46 error trying to retrieve devices in sync_group: SQL logic error: no such table: device_sync_group_devices (1) 2024/07/24 00:14:46 [j-b650maoruselite/5r6xeFu0o7-000006] "POST http://localhost:3005/api/2/subscriptions/jay/j-b650maoruselite.json HTTP/1.1" from 127.0.0.1:48116 - 500 0B in 77.206µs 2024/07/24 00:14:46 [j-b650maoruselite/5r6xeFu0o7-000007] "GET http://localhost:3005/api/2/episodes/jay.json?since=1721744086 HTTP/1.1" from 127.0.0.1:48126 - 200 37B in 8.176µs 2024/07/24 00:14:46 [j-b650maoruselite/5r6xeFu0o7-000008] "GET http://localhost:3005/api/2/subscriptions/jay/j-b650maoruselite.json?since=1721744086 HTTP/1.1" from 127.0.0.1:48132 - 200 45B in 76.454µs 2024/07/24 00:14:46 error getting device_sync_group_id: &sqlite.Error{msg:"SQL logic error: no such table: device_sync_group_devices (1)", code:1} 2024/07/24 00:14:46 error trying to retrieve devices in sync_group: SQL logic error: no such table: device_sync_group_devices (1) 2024/07/24 00:14:46 [j-b650maoruselite/5r6xeFu0o7-000009] "POST http://localhost:3005/api/2/subscriptions/jay/j-b650maoruselite.json HTTP/1.1" from 127.0.0.1:48142 - 500 0B in 97.805µs 2024/07/24 00:14:46 [j-b650maoruselite/5r6xeFu0o7-000010] "GET http://localhost:3005/api/2/episodes/jay.json?since=1721744086 HTTP/1.1" from 127.0.0.1:48146 - 200 37B in 6.432µs

SmurgBurglar commented 4 months ago

It may just be that Antenna Pod is incompatible with this, does anyone know if any android apps are confirmed to work with this?

oxtyped commented 4 months ago

Hi @SmurgBurglar

I'm not quite sure what the issue is being described from your latest 2 comments. Could you rephrase it?

But just looking at your last two logs,

both are listening on the same host and port, the difference would be in the --no-auth which needs to be set in order to use it with gpodder client.

SmurgBurglar commented 4 months ago

@oxtyped I'm trying to use it with AntennaPod

SmurgBurglar commented 4 months ago

What I mean is that when the app asks me to input the address should it be http://192.168.1.14:3005, https://192.168.1.14:3005, 192.168.1.14 or 192.168.1.14:3005.

oxtyped commented 4 months ago

Ah got it!

For that, the answer depends on your network configuration.

It sounds like your gpodder2go might be hosted on a separate machine from your client, in that case you will need to ensure it is listening on your 192.168.1.14 ip or use 0.0.0.0

$ gpodder2go serve --no-auth -b 192.168.1.14:3005

You should use http:// to connect to it.