-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync stops with HTTP status code 500 while apps/gpoddersync/episode_action/create #144
Comments
Thanks for debugging this. Please provide a test that is going green with your implementation |
I have the same error. Has the fix been implemented? |
The default identifier is guid. URL is prone to redundancy. The solution might fix your situation but will break it for everyone else. We need a test that reproduces the exception as to assess this solutions effects |
If i read the code above correctly we query the database collumn My hack was to query the collumn
and the line
should read something like this
Does that make any sense ? |
please replicate your current condition in a test (see existing tests for howto set on up) so we can assess the outcome of the proposed changes. |
that´s the difficult part, since my problem ist gone. I´ll try to replicate it ... |
I will do my best to create such a test case. However, I will need some help: |
FYI, the problem still persists on my setup, so I should be able to get the required info for a test case. |
About: Versions: Caution: Overview, aka the short version:
Enable nextcloud logging:
Create the logfile
Patch
Restart webserver and php:
Create json testfile
Create testuser in nextcloud: Test with curl:
Result in
Conclusion: |
Meanwhile:
The testfile contains all permutations of two episodes and two guids for one podcast. The exception vanishes when i use the hack from my initial post (with |
@mf8hd thanks a lot for the detailed information! I will use that to get the log data for my setup - however I won't have time before the weekend. Happy coding - it sounds like you are getting close to a solution :-) |
My impression is that @mf8hd's original solution is actually the correct one. That function (deleteConflictingEpisodeAction) will be hit when you're trying to add an episode action with a guid the already exists in the DB, and a URL that also already exists but on a different row. So it I understand things correctly, in the above example, what will happen is: For the first item: For the second item: For the third item: For the fourth item: If I understand things correctly, the function should be using getEpisode, in order to work as intended. In which case it would find row 2 by episode, delete it, and then be able to change episode on row 1 to 'https://episode2'. The test testDoNotFailToUpdateEpisodeActionByGuidIfThereIsAnotherWithTheSameValueForEpisodeUrl doesn't trip because the item it tries to save at https://github.com/thrillfall/nextcloud-gpodder/blob/main/tests/Integration/EpisodeActionSaverGuidBackwardCompatibilityTest.php#L84C84-L84C100 has the same value for the guid and episode, so it ends up working correctly anyway. |
in a pull request please. Thanks |
Issue:
Sync of episodes from "AntennaPod" to "GPodder Sync" stops with Java IO.Exception (on the AntennaPod side) and HTTP status code 500 (on the NextCloud side) while apps/gpoddersync/episode_action/create. Trace: NextCloudTrace.txt
Versions:
NextCloud 25.0.12, PHP 7.4, GPodder Sync 3.7.3, AntennaPod/3.1.1
Solution:
I replaced both occurances of
$episodeActionEntity->getGuid()
inprivate function deleteConflictingEpisodeAction()
with$episodeActionEntity->getEpisode()
in the file EpisodeActionSaver.php (edited version) becausefindByEpisodeUrl()
takes a url andgetEpisode()
provides it.Old version:
Edited version:
Disclamer:
It works ... for me ... i think ... . I am not a php guy ...
The text was updated successfully, but these errors were encountered: