akhilrex / podgrab

A self-hosted podcast manager/downloader/archiver tool to download podcast episodes as soon as they become live with an integrated player.
GNU General Public License v3.0
1.61k stars 88 forks source link

Can't add podcasts (EOF - forbidden) #225

Open kyrawertho opened 2 years ago

kyrawertho commented 2 years ago

Hi, I am just setting up Podgrab for the first time and I can't seem to add several podcasts. When I add them, an error message shows only "EOF" and Docker shows this:

/api/db/dbfunctions.go:17 record not found
[0.433ms] [rows:0] SELECT * FROM `podcasts` WHERE `podcasts`.`url` = "https://feeds.buzzsprout.com/1403161.rss" ORDER BY `podcasts`.`id` LIMIT 1
Response status: 403 Forbidden
{"level":"dpanic","ts":1658264273.0248008,"caller":"zap@v1.16.0/sugar.go:191","msg":"Ignored key without a value.","ignored":"EOF","stacktrace":"go.uber.org/zap.(*SugaredLogger).Errorw\n\t/go/pkg/mod/go.uber.org/zap@v1.16.0/sugar.go:191\ngithub.com/akhilrex/podgrab/service.AddPodcast\n\t/api/service/podcastService.go:217\ngithub.com/akhilrex/podgrab/controllers.AddPodcast\n\t/api/controllers/podcast.go:406\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/context.go:165\ngithub.com/gin-gonic/gin.CustomRecoveryWithWriter.func1\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/recovery.go:99\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/context.go:165\nmain.setupSettings.func1\n\t/api/main.go:216\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/context.go:165\ngithub.com/gin-gonic/gin.CustomRecoveryWithWriter.func1\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/recovery.go:99\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/context.go:165\ngithub.com/gin-gonic/gin.LoggerWithConfig.func1\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/logger.go:241\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/context.go:165\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/gin.go:489\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/gin.go:445\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2843\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1925"

Also, I tried adding a random podcast from the search results and it worked, but I found no way to delete it again. Is there a way to delete a podcast apart from deleting podgrab.db?

Thanks

akhilrex commented 2 years ago

Let me see what I can do.

On Wed, 20 Jul 2022, 2:27 am kyrawertho, @.***> wrote:

Hi, I am just setting up Podgrab for the first time and I can't seem to add several podcasts. When I add them, an error message shows only "EOF" and Docker shows this:

/api/db/dbfunctions.go:17 record not found [0.433ms] [rows:0] SELECT * FROM podcasts WHERE podcasts.url = " https://feeds.buzzsprout.com/1403161.rss" ORDER BY podcasts.id LIMIT 1

— Reply to this email directly, view it on GitHub https://github.com/akhilrex/podgrab/issues/225, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEMVPSX7PFDOS7SQUJEVQLVU4JDFANCNFSM54BJ5TKA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jazzsnobeatcake commented 2 years ago

I'm chiming in because I also face this issue and noticed that it's only happening when the feed URL points to feeds.buzzsprout.com, just like in @kyrawertho log. Podcasts hosted elsewhere are working fine for me.

shellyeah commented 2 years ago

Getting the same error with buzzsprout feeds.

Trying to curl with the user agent podgrab provides (Go-http-client/2.0) returns "error code: 1020" which is a cloudflare thing. Same with using the UA in a browser. server responds with a much more detailed cloudflare error page with the same error code.

Workaround could be to set a custom useragent.

I never worked with cloudflare before but since other cloudflare protected sites work just fine with this user agent it is most likely on buzzsprouts side to fix this.

Screenshot_20220801-140218

t3rminalx commented 2 years ago

I've tried adding a podcast which also seems to come from buzzsprout and had the same EOF issue.

https://podcastaddict.com/podcast/4040551

tomrossi7 commented 2 years ago

Hey guys! This is Tom from Buzzsprout. Are you able to set the user agent to something that reflects podgrab?

wiseindy commented 2 years ago

+1 I have the same issue with Buzzsprout podcasts: e.g.: https://podcastaddict.com/podcast/3386743

tomrossi7 commented 2 years ago

Has the user agent been updated?

wiseindy commented 2 years ago

There's an open PR that fixes this issue: https://github.com/akhilrex/podgrab/pull/214

t3rminalx commented 2 years ago

There's an open PR that fixes this issue: #214

Thats awesome, thank you. I've noticed you've approved the changes too. How long until we see the changes in the code?

wiseindy commented 2 years ago

Not sure, since I don't have the access to merge. Pinging @akhilrex

wiseindy commented 2 years ago

@t3rminalx In the meantime, I created a fork here with the user agent fix: https://github.com/wiseindy/podgrab

If you use docker and want to use it, you can swap out the image akhilrex/podgrab with wiseindy/podgrab until we wait for the PR to be merged in this repo.

t3rminalx commented 2 years ago

@tomrossi7 In the meantime, I created a fork here with the user agent fix: https://github.com/wiseindy/podgrab

If you use docker and want to use it, you can swap out the image akhilrex/podgrab with wiseindy/podgrab until we wait for the PR to be merged in this repo.

It's working like a charm :-)

neontechtra commented 2 years ago

Just commenting to follow along, having some issues here as well.

t3rminalx commented 2 years ago

So the docker image from @wiseindy and the updated image from @akhilrex both now enable me to add the podcast I was having trouble with however it’s not grabbing the episode artwork or anything newer than when the podcast was initially added.

ghenry22 commented 1 year ago

Having the same issue with buzzsprout, what should be setting the user agent to here? Something to mimic a browser or something specific to identify podgrab?

ghenry22 commented 1 year ago

So the docker image from @wiseindy and the updated image from @akhilrex both now enable me to add the podcast I was having trouble with however it’s not grabbing the episode artwork or anything newer than when the podcast was initially added.

what did you use for the user-agent setting? I've tried leaving it blank or setting it the same as chrome on my mac and in either case still get the EOF error with a 403 denied in the container logs. using latest akhilrex docker container from docker hub

tomrossi7 commented 1 year ago

You should set the user-agent to something to identify yourself or your app -- do not spoof Chrome or any other app since you would then get blocked.

ghenry22 commented 1 year ago

@tomrossi7 yep no problem, the issue I was seeing was that the user agent was still not being applied at one point in the code so it wasn't working regardless of what I put in there, have submitted a PR to resolve.

Once that gets merged I'll put together something to ensure that a default user-agent that identifies podgrab and the version is used instead of the library default or people putting in random spoofing unnecessarily.

tomrossi7 commented 1 year ago

Perfect! Thanks!

chiefy commented 1 year ago

I'm still seeing this issue even when using @wiseindy 's version 2022.07.07

zanish commented 1 year ago

Is there any update to this? I see PR #243 hasn't been touched in a few months. I'm still seeing the issue.

thrillhouse2342 commented 1 year ago

I'm unfortunately also experiencing this issue. Just tried setting it up for the first time and the 4 that failed were all buzzsprout.

2600box commented 1 year ago

I had trouble with this and a buzzsprouts podcast. setting the docker image to wiseindy/podgrab and setting the user-agent to something Podgrab - docker worked

Patriot2407 commented 1 year ago

I'm also having this issue +1

Patriot2407 commented 3 months ago

@2600box comment above solved my issue