Podcaster plugin - problem fetching Apple data?

Hi,

I try the Podcaster plugin on my local machine and get an issue. (Thanks @mauricehh for this amazing plugin)

When I create or access a podcasterfeed page or navigate trough tabs, my page is frozen and load very slowly and finally show me some error messages.

The problem seems to come from fetching data from the Apple API, but when I disable this option by adding the instruction “‘mauricerenck.podcaster.externalApi’ => false,” to my config file, it doesn’t solve the problem.

Here are the error messages I get:

NetworkError when attempting to fetch resource.

In some fields like “Apple categories” and “Podcaster language”

Operation timed out after 10001 milliseconds with 0 bytes received in file: /xxx/xxx/www/kirby/src/Http/Remote.php line: 253

Any idea what’s could going on?

Hi,

Do you get the same error message when disabling the external api?

When disabling the API the plugin tries to access the json files locally, so in theory there should be no timeouts.

yes I get the same error when I add mauricerenck.podcaster.externalApi’ => false to my config file.

Which is odd, by the way :thinking:

I’ll do a test with the starterkit … and come back with the result

Get the same problem with the Starterkit (last version)

I only tested on my local machine, I use PHP 8.3.2 and use the internal PHP server
php -S localhost:8000 kirby/router.php

Can you reproduce this problem or is it something wrong with my environment?

I just realized there’s a mixup in the documentation…the API option is called useApi not externaApi. If you look into the list of all options it’s correct in one of the other pages of the docs I used the other name which was a “working title”.
Can you please try and change it?

“useApi” does not change the problem on my local server.

But … I did a test on a remote server and everything works correctly, the Apple API can be fetch without any latency.

So the problem seems to be linked with my local web server.

Could you make a test on your own machine using php -S localhost:8000 kirby/router.php and tell me if you observes the same API latency problem?

I can confirm your problems. As soon as I locally switch from MAMP to the php server the requests get really really slow and run into timeouts, even when just serving local json files.

I’ll have a look into that!

Thank you Maurice for testing locally on your PC and add an issue in your Github repo.

This should be fixed in version 3.2, see: API Timeouts · Issue #65 · mauricerenck/kirby-podcaster · GitHub

Thanks @mauricehh for this release. The API issue is effectively gone on my local installation :slight_smile:

I see a “Podcasts” item in the left Kirby Panel sidebar menu. If I click on it, I get a error message:

Could not connect to Database: could not find driver {"status":"error","message":"Call to a member function query() on null","code":500,"exception":"Error","key":null,"file":"\/site\/plugins\/kirby-podcaster\/app\/PodcasterStatsSqlite.php","line":121,"details":[],"route":"podcaster\/stats\/top-episodes\/([a-zA-Z0-9\\.\\-_%= \\+\\@\\(\\)]+)"}

So I tried to disable the analytics (no database is installed on my installation) by adding this in my config file:

'mauricerenck.podcaster' => [
   'statsInternal' => false,
],

But the “Podcasts” item is still there in my menu sidebar.

Is there any other way to disable this analytics access?

fixed it

Excellent, you rocks @mauricehh :slight_smile:

1 Like