Skip to content
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

[Bug]: Issue Parsing RSS Feed #2401

Closed
tomershvueli opened this issue Dec 9, 2023 · 6 comments
Closed

[Bug]: Issue Parsing RSS Feed #2401

tomershvueli opened this issue Dec 9, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@tomershvueli
Copy link

tomershvueli commented Dec 9, 2023

Describe the issue

Starting maybe a week or 2 ago I've had a podcast feed of mine not be able to pull in any new shows. Logs look like this:

Dec 08 15:12:18Line: 0
Dec 08 15:12:18Column: 1
Dec 08 15:12:18Char: {
Dec 08 15:12:18at error (/app/code/node_modules/sax/lib/sax.js:651:10)
Dec 08 15:12:18at strictFail (/app/code/node_modules/sax/lib/sax.js:677:7)
Dec 08 15:12:18at beginWhiteSpace (/app/code/node_modules/sax/lib/sax.js:951:7)
Dec 08 15:12:18at SAXParser.write (/app/code/node_modules/sax/lib/sax.js:1006:11)
Dec 08 15:12:18at Parser.exports.Parser.Parser.parseString (/app/code/node_modules/xml2js/lib/parser.js:327:31)
Dec 08 15:12:18at Parser.parseString (/app/code/node_modules/xml2js/lib/parser.js:5:59)
Dec 08 15:12:18at exports.parseString (/app/code/node_modules/xml2js/lib/parser.js:373:19)
Dec 08 15:12:18at /app/code/server/utils/index.js:49:5
Dec 08 15:12:18at new Promise (<anonymous>)
Dec 08 15:12:18at xmlToJSON (/app/code/server/utils/index.js:48:10) (index.js:51)
Dec 08 15:12:18[2023-12-08 20:12:18.610] ERROR: [podcastUtils] Invalid XML or RSS feed (podcastUtils.js:200)

Here's a shortened, redacted version of the feed:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atomic="http://atomicpublishing.com/rss/1.0/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:spotify="http://www.spotify.com/ns/rss">
  <channel>
    <title>Dithering</title>
    <link>https://dithering.fm</link>
    <description>A new podcast from Ben Thompson and John Gruber. Two episodes per week, 15 minutes per episode. Not a minute less, not a minute more.</description>
    <language>en-us</language>
    <copyright><![CDATA[Dithering, LLC]]></copyright>
    <managingEditor>admin@dithering.fm (Ben Thompson and John Gruber)</managingEditor>
    <webMaster>admin@dithering.fm (Ben Thompson and John Gruber)</webMaster>
    <pubDate>Fri, 08 Dec 2023 10:00:34 +0000</pubDate>
    <lastBuildDate>Fri, 08 Dec 2023 20:12:34 +0000</lastBuildDate>
    <category>Technology</category>
    <ttl>60</ttl>
    <image>
      <url>https://dithering.fm/wp-content/uploads/2023/12/DitheringCoverart.jpg</url>
      <title>Dithering</title>
      <link>https://dithering.fm</link>
    </image>
    <item>
      <title>Gemini</title>
      <link>https://dithering.fm/?access_token=</link>
      <description>Google released Gemini with demos that weren&#39;t entirely honest. Plus, Apple&#39;s new AI framework.</description>
      <content:encoded><![CDATA[<p><a target="_blank" href="https://wavelength.app/invite/3tXVGtqnFOk#jEhmAZ9H._ra17OCpDYMqQ--">Join the Dithering group chat on Wavelength</a>.</p>
<hr/>
<meta charset="UTF-8"/>
<hr/>

<p><a href="https://dithering.passport.online/oauth/session?access_token=">Subscribe to Stratechery Plus</a> to get full episodes of <a href="https://sharptech.fm">Sharp Tech</a>, plus <a href="https://stratechery.com/stratechery-plus/">Stratechery Updates and Interviews</a>, <a href="https://sharpchina.fm">Sharp China</a> and <a href="https://goat.passport.online/">Greatest of All Talk</a>.</p>


<hr/>
<ul>
    <li><a target="_blank" href="" class="button">Add Stratechery to your podcast player</a></li>
    <li><a target="_blank" href="" class="button">Add Sharp Tech to your podcast player</a></li>
    <li><a target="_blank" href="" class="button">Add Sharp China to your podcast player</a></li>
    <li><a target="_blank" href="" class="button">Add Greatest Of All Talk to your podcast player</a></li>
    <li><a target="_blank" href="https://daringfireball.net/thetalkshow/">Add The Talk Show to your podcast player</a>.</li>

</ul>
<hr/>
<p>Subscription Information</p>
<p>
    Member: Tomer S<br/>
    Email: tomer@shvueli.com<br/>
    
</p>
<p><a href="https://dithering.passport.online/oauth/session?access_token=">Manage your account</a></p>
]]></content:encoded>
      <author>dithering</author>
      <enclosure url="https://assets.dithering.passport.online/assets/2023-12-08-dithering-0405.mp3?access_token=" length="14887335" type="audio/mpeg"></enclosure>
      <guid isPermaLink="true">https://dithering.fm/?p=1269</guid>
      <pubDate>Fri, 08 Dec 2023 10:00:34 +0000</pubDate>
      <atomic:distribution id="8XD4XeaJDW34rmyMqZhkRb" article="7Mndyhu2SRusBXMx1TewGg" template="3fWXGshjw7dsqertEG39tY" audience="WthnL9Dwj9BCmiAfajrCd" asset="MKe83bowBJf9NWt4aKxfWK">
        <atomic:distroDate>Fri, 08 Dec 2023 10:00:29 +0000</atomic:distroDate>
        <atomic:categories>
          <atomic:category id="AovjVXmPSbXw9TrahHELPV" name="dithering"></atomic:category>
        </atomic:categories>
      </atomic:distribution>
      <itunes:author>dithering</itunes:author>
      <itunes:image href="https://dithering.fm/wp-content/uploads/2023/12/DitheringCoverart-630x630.jpg"></itunes:image>
      <itunes:duration>00:15:00</itunes:duration>
      <itunes:summary>Google released Gemini with demos that weren&#39;t entirely honest. Plus, Apple&#39;s new AI framework.</itunes:summary>
    </item>
    <itunes:image href="https://dithering.fm/wp-content/uploads/2023/12/DitheringCoverart.jpg"></itunes:image>
    <atom:link href="" rel="self" type="application/rss+xml"></atom:link>
    <itunes:owner>
      <itunes:name>Ben Thompson and John Gruber</itunes:name>
      <itunes:email>admin@dithering.fm</itunes:email>
    </itunes:owner>
    <itunes:author>Ben Thompson and John Gruber</itunes:author>
    <atomic:instance id="4XZpMcPBGowTRADmCrRVN4" build="bdfa7f29" version="v0.5.21"></atomic:instance>
    <sy:updatePeriod></sy:updatePeriod>
    <sy:updateFrequency>0</sy:updateFrequency>
    <itunes:block>yes</itunes:block>
    <itunes:explicit>no</itunes:explicit>
    <itunes:category text="Technology"></itunes:category>
  </channel>
</rss>

Not sure what's wrong here but would appreciate any help in looking into this!

Steps to reproduce the issue

  1. See code snippets above for parsing issue.

Audiobookshelf version

2.6.0

How are you running audiobookshelf?

Other

@tomershvueli tomershvueli added the bug Something isn't working label Dec 9, 2023
@nichwall
Copy link
Contributor

nichwall commented Dec 9, 2023

Is this during an automatic download or when you're manually searching for episodes to download? Does it work for either or are both broken?

@tomershvueli
Copy link
Author

@nichwall both. I first noticed that after a few days I wasn't seeing the pods I was expecting to in my feed. Then when I try to manually fetch new pods, I get an error:
Screenshot 2023-12-09 at 9 54 00 AM

@advplyr
Copy link
Owner

advplyr commented Dec 9, 2023

This is unusual in that the RSS feed is returning a JSON response when no request headers were set. I wasn't actually able to reproduce this in Postman but when I logged the response we were getting from axios it was JSON.
I added Accept: application/rss+xml request header and it is working now

@advplyr advplyr added the awaiting release Issue is resolved and will be in the next release label Dec 9, 2023
@tomershvueli
Copy link
Author

Thanks for your prompt responses and action on this issue! I'm looking forward to the next release!

@advplyr
Copy link
Owner

advplyr commented Dec 24, 2023

Fixed in v2.7.0

@advplyr advplyr closed this as completed Dec 24, 2023
@advplyr advplyr removed the awaiting release Issue is resolved and will be in the next release label Dec 24, 2023
@tomershvueli
Copy link
Author

Confirmed fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants