Closed Hritik14 closed 2 weeks ago
I'm unable to run live server tests (any of them) because of dev server error:
00:11:26 changedetectionio.flask_app: ERROR Exception on /preview/first [GET]
Traceback (most recent call last):
File "/Users/neo/Projects/offsec/changedetection.io/venv/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
File "/Users/neo/Projects/offsec/changedetection.io/venv/lib/python3.10/site-packages/flask/app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/neo/Projects/offsec/changedetection.io/venv/lib/python3.10/site-packages/flask_restful/__init__.py", line 298, in error_router
return original_handler(e)
File "/Users/neo/Projects/offsec/changedetection.io/venv/lib/python3.10/site-packages/flask_cors/extension.py", line 178, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/Users/neo/Projects/offsec/changedetection.io/venv/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/neo/Projects/offsec/changedetection.io/venv/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/Users/neo/Projects/offsec/changedetection.io/changedetectionio/flask_app.py", line 211, in decorated_view
return func(*args, **kwargs)
File "/Users/neo/Projects/offsec/changedetection.io/changedetectionio/flask_app.py", line 1099, in preview_page
timestamp = versions[-1]
IndexError: list index out of range
Not sure what's wrong here but I've run tests without live server, they're ok and the actual application is also working fine
thanks for the PR! nice to see a test here
File "/Users/neo/Projects/offsec/changedetection.io/changedetectionio/flask_app.py", line 1099, in preview_page timestamp = versions[-1] IndexError: list index out of range
this usually means the test is trying to load the preview page, but there is no succesfully fetched version yet
Thanks again :)
Thanks for completing this! I worked around this by using regex /"(.*)",?/ as output filter.
Builds on top of https://github.com/dgtlmoon/changedetection.io/pull/1744
Fixes: #1472