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] Firefox: WARNING:app:404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. #910

Closed
un99known99 opened this issue Dec 22, 2022 · 2 comments · Fixed by #911
Labels
bug Something isn't working

Comments

@un99known99
Copy link

Hi,

while using FF getting often error below (brave seems to be ok), I am switching back and fwd using options pics, video - time and quality filters - and so on, in between getting

ERROR:app:Exception on /search [GET]
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/pi/.local/lib/python3.9/site-packages/app/routes.py", line 112, in decorated
return f(*args, **kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/app/routes.py", line 59, in decorated
return f(*args, **kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/app/routes.py", line 304, in search
response = search_util.generate_response()
File "/home/pi/.local/lib/python3.9/site-packages/app/utils/search.py", line 149, in generate_response
html_soup = content_filter.view_image(html_soup)
File "/home/pi/.local/lib/python3.9/site-packages/app/filter.py", line 617, in view_image
results_div = soup.find_all('div', attrs={'class': "nQvrDb"})[0]
IndexError: list index out of range
WARNING:app:404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

WARNING:app:404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

Regards,
Mike

@un99known99 un99known99 added the bug Something isn't working label Dec 22, 2022
@Moist-Cat
Copy link
Contributor

Moist-Cat commented Dec 22, 2022

I managed to reproduce it with the last commit ( 7041b43 )

  • Configurations:
    • Time period: last hour (as small as possible)
    • Full Size Image Search: True

It seems it breaks when there are no images to display.
This could be fixed by adding some error handling to https://github.com/benbusby/whoogle-search/blob/main/app/filter.py#L600

In the meantime. Either disable Full Size image Search or increase the Time Period. I don't think this is related to the browser at all.

Moist-Cat added a commit to Moist-Cat/whoogle-search that referenced this issue Dec 22, 2022
@un99known99
Copy link
Author

un99known99 commented Dec 22, 2022

Thanks for the reply, I checked in FF and in Brave, whereas Brave seems to be more “stable”, seems I couldn't reproduce the error within Brave - that's why my best guess was to be browser related ...

Will double-check with hint you gave in terms of the full size image and come back ...

Also, when you search, klick on the result then use browser arrow left to step back - log entry showing up:

WARNING:app:404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. ... normal?


some more, not sure if related to same topic (image size already changed)
"500 Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.":

ERROR:app:Exception on /search [GET]
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 1818, in full_dispatch_request
rv = self.preprocess_request()
File "/home/pi/.local/lib/python3.9/site-packages/flask/app.py", line 2309, in preprocess_request
rv = self.ensure_sync(before_func)()
File "/home/pi/.local/lib/python3.9/site-packages/app/routes.py", line 147, in before_request_func
g.user_config = g.user_config.from_params(g.request_params)
File "/home/pi/.local/lib/python3.9/site-packages/app/models/config.py", line 141, in from_params
params_new = self._decode_preferences(params['preferences'])
File "/home/pi/.local/lib/python3.9/site-packages/app/models/config.py", line 212, in _decode_preferences
brotli.decompress(urlsafe_b64decode(preferences.encode()))
File "/usr/lib/python3.9/base64.py", line 133, in urlsafe_b64decode
return b64decode(s)
File "/usr/lib/python3.9/base64.py", line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
WARNING:app:404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

@benbusby benbusby linked a pull request Dec 29, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants