dgtlmoon / changedetection.io

The best and simplest free open source web page change detection, website watcher, restock monitor and notification service. Restock Monitor, change detection. Designed for simplicity - Simply monitor which websites had a text change for free. Free Open source web page change detection, Website defacement monitoring, Price change notification
https://changedetection.io
Apache License 2.0
17.3k stars 965 forks source link

Internal Server Error when accessing the RSS feed #521

Closed tohn closed 2 years ago

tohn commented 2 years ago

Describe the bug When I'm trying to access the RSS feed (i.e. https://changedetection.io/rss?token=xyz), I'm getting a 500 Internal Server Error.

I'm using docker compose. In the logs I can find this:

(1) accepted ('$ip', $port?)
ERROR:changedetectionio:Exception on /rss [GET]
Traceback (most recent call last):
  File "/usr/local/flask/app.py", line 2077, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/flask/app.py", line 1525, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/flask/app.py", line 1523, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/flask/app.py", line 1509, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/usr/local/flask_login/utils.py", line 277, in decorated_view
    return current_app.ensure_sync(func)(*args, **kwargs)
  File "/app/changedetectionio/__init__.py", line 311, in rss
    prev_fname = watch['history'][dates[1]]
IndexError: list index out of range
$ip,$ip - - [05/Apr/2022 17:32:04] "GET /rss?token=xyz HTTP/1.0" 500 445 0.001966

Version v0.39.11

Expected behavior I should see the RSS feed

hmmcclish commented 2 years ago

Same error on my instance, since updating 4 days ago. But I noticed I only get the above error trying to load the RSS feeds for my group tags with at least one watched page without a Last Changed timestamp ("Not Yet").

I tested this by removing all of the watched pages with a Last Changed timestamp of "Not Yet" from one of my affected group tags, and I can now load that RSS feed again.

tohn commented 2 years ago

Interesting, can confirm this behaviour, thanks!

dgtlmoon commented 2 years ago

@hmmcclish @tohn please try a docker pull of :latest once https://github.com/dgtlmoon/changedetection.io/actions/runs/2098059510 is finished, and report back if this fixes the issue for you :) thanks for the good report!!

hmmcclish commented 2 years ago

Fixed my instance! Updated just now, and my RSS feeds are all working again even if the tag includes a watch that has "Not Yet" changed.

Thanks for doing what you do!

tohn commented 2 years ago

Amazing, that was really fast, thank you very much for the fix! 🎉