Giter VIP home page Giter VIP logo

gpodder2go's Issues

Synchronizing devices fails

I am trying to sync two devices, and getting this error:

gpodder2go[180592]: 2024/05/09 20:08:12 error selecting sync group id: &sqlite.Error{msg:"SQL logic error: no such column: device_sync_group_id (1)", code:1}

It seems

err := tx.QueryRow("SELECT device_sync_group_id from devices WHERE id = ? AND user_id = ?", deviceId, userId).Scan(&deviceSyncGroupId)

expects that device_sync_group_id is in the devices table, but this column does not exist. Am I missing something?

Link to alternatives in readme

First, thanks for making this. I really look forward to #16 so I can start using this and syncing between devices.

In the meantime, would you consider adding an alternatives section to the readme?
It should probably include the Antennapod docs about sync tools (which yours isn't mentioned in yet but I'll ask them to once I get sync working with your service) and maybe micro-gpodder-server since that's probably one of the most similar projects around.

Cheers!

Can't log in via cloudflare tunnel

I setup a docker on my Unraid server with gpodder2go and am routing it through treafik and a cloudflare tunnel so I can reach it via something like https://podder.server.com (server.com would be changed to my actual domain that points to the tunnel).

After running /gpodder2go -d g2g.db accounts create user --email="[email protected]" --name="user" --password="8%zm!$c01kRd6OPg" trying to log in via AntennaPod using https://podder.server.com or podder.server.com just displays an error "Wrong username or password"

leaving out the treafik and unraid specific configuration my unraid docker config looks like this compose:

gpodder2go:
    image: ghcr.io/oxtyped/gpodder2go:main
    ports:
      - 3005:3005
    environment:
      - NO_AUTH=true // I did also try it with false
    volumes:
      - /mnt/user/appdata/gpodder2go:/data

The logs of the docker look like this:

2024/08/15 14:03:43 💻 Starting server at 0.0.0.0:3005
2024/08/15 14:02:46 [988dd16708e9/5sWA4rd1fN-000001] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 1.841944ms
2024/08/15 14:02:59 [988dd16708e9/5sWA4rd1fN-000002] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 339.988µs
2024/08/15 14:02:59 [988dd16708e9/5sWA4rd1fN-000003] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 593.261µs
2024/08/15 14:02:59 [988dd16708e9/5sWA4rd1fN-000004] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 475.507µs
2024/08/15 14:03:00 [988dd16708e9/5sWA4rd1fN-000005] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 607.985µs
2024/08/15 14:03:00 [988dd16708e9/5sWA4rd1fN-000006] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 292.786µs
2024/08/15 14:03:55 [988dd16708e9/OaUL0Z3nLg-000001] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 2.084872ms
2024/08/15 14:03:56 [988dd16708e9/OaUL0Z3nLg-000002] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 556.889µs
2024/08/15 14:03:56 [988dd16708e9/OaUL0Z3nLg-000003] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 656.044µs
2024/08/15 14:04:18 [988dd16708e9/OaUL0Z3nLg-000004] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 528.636µs
2024/08/15 14:04:18 [988dd16708e9/OaUL0Z3nLg-000005] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 458.358µs
2024/08/15 14:04:18 [988dd16708e9/OaUL0Z3nLg-000006] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 474.394µs
2024/08/15 14:04:18 [988dd16708e9/OaUL0Z3nLg-000007] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 377.907µs
2024/08/15 14:04:19 [988dd16708e9/OaUL0Z3nLg-000008] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 506.481µs
2024/08/15 14:04:19 [988dd16708e9/OaUL0Z3nLg-000009] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 410.054µs
2024/08/15 14:04:19 [988dd16708e9/OaUL0Z3nLg-000010] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 329.459µs
2024/08/15 14:04:19 [988dd16708e9/OaUL0Z3nLg-000011] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 517.326µs
2024/08/15 14:04:19 [988dd16708e9/OaUL0Z3nLg-000012] "POST http://podder.server.com/api/2/auth/user/login.json HTTP/1.1" from 172.18.0.2 - 401 0B in 401.562µs

every POST is one "Log in" click in the AntennaPod app
172.18.0.2 is the internal IP of the docker running the tunnel

Is a connection via https/cloudflare tunnel just not possible or do I need additional configuration to get it to work? Happy to provide more information

Unable to use with gPodder 3.11.4

I tried to synchronize but got the following errors:

gpodder-1  | 2024/07/11 21:05:18 [fa9419552ab6/5mjlPUOo79-000001] "PUT http://localhost:3005/subscriptions/patrick/pc-101.home.json HTTP/1.1" from 172.19.0.1:32810 - 500 0B in 1.594257ms
gpodder-1  | 2024/07/11 21:05:18 error parsing device id: sql: no rows in result set

I used docker-compose with NO_AUTH=true. In gpodder under Preferences the gpodder.net when I clock "Upload local subscriptions" I get the following error: "Error while upload 500". I used username: patrick, password: unused and device name: xps13 and server: localhost:3005.

Cannot build for armv7

When I try to build for armv7 in a Docker container, I receive the following error:

[7/8] RUN cd gpodder2go && ./gpodder2go init:
#10 0.770 panic: suint(-301924841) expects input >= 0
#10 0.771
#10 0.771 goroutine 24 [running]:
#10 0.772 github.com/golang-migrate/migrate/v4.suint(...)
#10 0.773 /go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/util.go:46
#10 0.774 github.com/golang-migrate/migrate/v4.(*Migrate).readUp(0x25426c0, 0xffffffff, 0xffffffff, 0x2542880)
#10 0.776 /go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:582 +0x7b8
#10 0.779 created by github.com/golang-migrate/migrate/v4.(*Migrate).Up
#10 0.779 /go/pkg/mod/github.com/golang-migrate/migrate/[email protected]/migrate.go:283 +0x10c

The problem seems to be some option of migrate already reported here, together with a possible solution: golang-migrate/migrate#213

Synchronization Api missing

Is synchronization api implemented?
I spinned up a docker image of gpodder2go (https://github.com/owenvoke/gpodder2go-docker), set up two devices under one account, now I would like to sync those two devices.

When I run http://192.168.2.40:8081/api/2/sync-devices/gp2goadmin.json -> I get 404 page not found

How are you supposed to sync two clients (Antennapod on Android installations) without sync api?

If I understand it correctly, you set up and list synchronizations using this: https://gpoddernet.readthedocs.io/en/latest/api/reference/sync.html

My understanding of devices under one account is coming from here: https://antennapod.org/documentation/general/synchronization

AntennaPod fails to sync using latest gpodder2go docker image

Problem description

Using ghcr.io/oxtyped/gpodder2go:main and ghcr.io/oxtyped/gpodder2go:latest images, AntennaPod can log in to gpodder2go, but cannot be synchronized. When using the ghcr.io/oxtyped/gpodder2go:gha image, AntennaPod can be synchronized, but cannot be synchronized when the image is upgraded to ghcr.io/oxtyped/gpodder2go:main.

Error log

2024-05-29T12:35:42.114 app[17815615c49e89] nrt [info] 2024/05/29 12:35:42 error getting device_sync_group_id: &sqlite.Error{msg:"SQL logic error: no such table: device_sync_group_devices (1)", code:1}

2024-05-29T12:35:42.114 app[17815615c49e89] nrt [info] 2024/05/29 12:35:42 error trying to retrieve devices in sync_group: SQL logic error: no such table: device_sync_group_devices (1)

Safest way to serve to gpodder desktop?

I'm deploying gpodder2go on a raspberry pi, and I was wondering the safest way to deploy without auth that doesn't make all my subscriptions _too_ public.

I tested it today and failed to coax gpodder desktop to using the password I gave it, but --no-auth works just fine (still can't believe that's a real bug.)

micro-gpodder deals with this with a password slug attached to the username, and I'm wondering if doing that manually is the best way to deploy with gpodder2go as well.

Something like:

SLUG=$(cat /dev/urandom | tr -cd '[:graph:]'  | head -c 10)
gpodder accounts create "username_$SLUG" -p 'unused'

Then just serving without auth and keeping the actual username username_gT]Ks(EPR7 or whatever in your password manager.

Thanks for making this cool project! golang is a dream to deploy.

Update libc and sqlite to compile on FreeBSD

Hi. The version of modernc.org/libc and modernc.org/sqlite you currently use don't compile on FreeBSD, but just updating to

        modernc.org/libc v1.24.1 // indirect
        modernc.org/sqlite v1.26.0

was enough to make it compile and produce a running binary. With the caveat that I haven't actually tested it beyond seeing if it starts at all.

Compatibility with Garmin Podcasts

I want to use gpodder2go to sync with the Podcasts app for Garmin smartwatches: https://github.com/lucasasselli/garmin-podcasts

So far, I have been able to login, but I get the following error when I try to manage subscriptions (from the smartwatch):

2023/04/23 13:15:02 [a9fa47634dce/fzJfjUtl27-000080] "POST http://IPADDRESS/api/2/auth/USERNAME/login.json HTTP/1.1" from MYIP - 200 0B in 1.284052ms
2023/04/23 13:15:17 error adding RSS feed from URL: &url.Error{Op:"Get", URL:"https://digitec.podigee.io/feed/mp3", Err:context.deadlineExceededError{}}
2023/04/23 13:15:39 error adding RSS feed from URL: context.deadlineExceededError{}

And when I try to download episodes:

2023/04/23 13:20:30 [a9fa47634dce/fzJfjUtl27-000082] "POST http://IPADDRESS/api/2/auth/USERNAME/login.json HTTP/1.1" from MYIP - 200 0B in 838.948µs
2023/04/23 13:20:53 error adding RSS feed from URL: context.deadlineExceededError{}
2023/04/23 13:21:17 error adding RSS feed from URL: &url.Error{Op:"Get", URL:"https://podcastfuerdeutschland.podigee.io/feed/mp3", Err:context.deadlineExceededError{}}
2023/04/23 13:21:28 error adding RSS feed from URL: &url.Error{Op:"Get", URL:"https://gehtdanochwas.podigee.io/feed/mp3", Err:context.deadlineExceededError{}}
2023/04/23 13:21:28 [a9fa47634dce/fzJfjUtl27-000083] "GET http://IPADDRESS/subscriptions/USERNAME/DEVICENAME.json HTTP/1.1" from MYIP - 200 14301B in 57.586016429s

On the smartwatch, it shows Error -2 in both cases.

I am currently trying to understand if the problem lies on gpodder2go or garmin-podcasts.

Login not working in AntennaPod

I run the server:

./gpodder2go init
VERIFIER_SECRET_KEY="test" ./gpodder2go serve --addr 10.100.0.1:3005 --no-auth

Create user:

./gpodder2go accounts --api-addr='10.100.0.1:3005' create soz --name="soz" --email="[email protected]" --password="test"

It reports 'User soz created!'

However, when trying to login from AntennaPod, this happens:

photo_2022-11-26_18-44-29

On the terminal it shows:
2022/11/26 18:43:19 [tamandua/dz6KGee0SZ-000001] "POST http://10.100.0.1:3005/api/2/auth/soz/login.json HTTP/1.1" from 10.100.0.7:49978 - 401 0B in 478.362µs

However, it does work on the gPodder desktop client.

Am I doing something wrong in AntennaPod? Thanks in advance.

not compiling

After the last commit aaf2c66, a } was removed from a file, which is preventing the compilation to succeed.

pkg/apis/handlers.go:719:1: syntax error: unexpected EOF, expected }

gpodder2go serve should have a daemon mode

gpodder2go serve should have a daemon mode. Ideally, gpodder2go serve -d to let it run into the background.

I suspect we might want to also add a default log file so that we can view the logs while in daemon mode too.

Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work

I tried to run binary on my arm64 (armbian) and then x86-64 (manjaro) machines. Unfortunately, every time I am getting error like:

./gpodder2go init
2023/09/27 23:41:09 Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

Is there anything wrong with my systems or with binaries? Any idea? I am not into Go in any way :-(

First time synchronisation cannot find device ID

I am running gpodder2go from Docker with the AntennaPod client. I am experiencing an issue where whenever I try to synchronise, the server errors with the following:

gpodder2go-gpodder2go-1  | 2024/04/14 12:12:34 unable to find device id from device name: &errors.errorString{s:"sql: no rows in result set"}
gpodder2go-gpodder2go-1  | 2024/04/14 12:12:34 error retrieving subscription history: &errors.errorString{s:"sql: no rows in result set"}

I have created a user and have successfully authenticated with the AntennaPod client.

Dockerfile

I have been tried to run gpodder2go in a dockerized environment but I have not been fully successful yet. I was wondering if somebody already managed to do it.

This is the Dockerfile I wrote (not working)

# Use a base image
FROM golang:1.16-alpine

ENV VERIFIER_SECRET_KEY='test'
EXPOSE 3005

# Set working directory
WORKDIR /app

# Install dependencies
# Musl-dev is required to fix stdlib.h
RUN apk update && apk add --no-cache wget git gcc musl-dev make sqlite 
RUN apk add --no-cache curl \     
  && curl -L https://github.com/golang-migrate/migrate/releases/download/v4.15.2/migrate.linux-armv7.tar.gz | tar xzv \
  && mv migrate /usr/local/bin/migrate \     
  && apk del curl

# Pull source code
RUN git clone https://github.com/oxtyped/gpodder2go.git /app/gpodder2go

# Make
RUN cd /app/gpodder2go && make build

# Init
RUN cd gpodder2go && ./gpodder2go init

# Run
CMD ["sh", "-c", "echo $VERIFIER_SECRET_KEY && /app/gpodder2go/gpodder2go serve"]

# Create a new user
RUN cd /app/gpodder2go && ./gpodder2go accounts create username --email="[email protected]" --name="MyName" --password="mypasswd"

I build and run it with

docker build . -t gpodder2go:latest
docker run -dp 3005:3005 gpodder2go:latest

When I look at the the logs it seems like being starting fine.

2023/04/01 17:30:15 💻 Starting server at localhost:3005

However, when I try to sync with AntennaPod, it sais that the connection failed. Same thing with the gPodder Desktop client. Any hint?

gPodder subscriptions not syncing

When I click "restore subscriptions from gpodder.net", enter in my hosting URL, and then login I see this in the logs:

2024/04/23 22:44:54 [e0e267359302/8lsLJcgZ8n-000071] "GET http://localhost:3005/subscriptions/jpeeler.opml HTTP/1.1" from 10.0.2.100:51636 - 400 0B in 27.642µs
2024/04/23 22:44:54 http: named cookie not present

The subscriptions do not sync. Am I doing anything wrong?

Using https://github.com/oxtyped/gpodder2go/pkgs/container/gpodder2go/206777676?tag=main
sha256:e91cce9f36a0ee32f89c0028d85bb37fcbb92b3e95b936013b34462b14f88189

Antennaepod seems to sync correctly, but hard to test without another working client.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.