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

404 errors when attempting to download missing files in JI #5722

Closed
zenmonkeykstop opened this issue Jan 19, 2021 · 2 comments · Fixed by #5733
Closed

404 errors when attempting to download missing files in JI #5722

zenmonkeykstop opened this issue Jan 19, 2021 · 2 comments · Fixed by #5733

Comments

@zenmonkeykstop
Copy link
Contributor

Description

#5573 added a flash message to be displayed when a user attempts to download submissions that are missing from the application store. The message should be displayed on the original page - sources list or individual source page - but is being displayed on a 404 page for /col/None in the former case and /None in the latter.

Steps to Reproduce

  • submit multiple files as a source in SI
  • delete one from the file store on the app server
  • attempt to download via the various singular and collective download options on the JI

Expected Behavior

Flash message is displayed, rest of behaviour as expected

Actual Behavior

404s as described.

error logs as follows:

[Tue Jan 19 15:34:43.815637 2021] [wsgi:error] [pid 9079:tid 129093955651328] [remote 127.0.0.1:52968]   File "/var/www/securedrop/journalist_app/__init__.py", line 96, in _handle_http_exception
[Tue Jan 19 15:34:43.815640 2021] [wsgi:error] [pid 9079:tid 129093955651328] [remote 127.0.0.1:52968]     handler = list(app.error_handler_spec['api'][error.code].values())[0]
[Tue Jan 19 15:34:43.815662 2021] [wsgi:error] [pid 9079:tid 129093955651328] [remote 127.0.0.1:52968] KeyError
[Tue Jan 19 15:46:50.450869 2021] [wsgi:error] [pid 9079:tid 129093955651328] [remote 127.0.0.1:53004] ERROR:flask.app:File /var/lib/securedrop/store/D7NFN2FZRXJVQIU7FBLUCLPGMGM6YUEQ7WLNY6Y2U5IVFOGTQEFO6NGONBE6YKOBE54O6O4QR52VK7BPXBG26HXZXJPT33CCVBEJDSY=/1-homemade_flanker-msg.gpg not found
[Tue Jan 19 15:46:51.078081 2021] [wsgi:error] [pid 9080:tid 129094201378560] [remote 127.0.0.1:53004] ERROR:flask.app:Found none when one was expected: No row was found for one()
[Tue Jan 19 15:48:00.505418 2021] [wsgi:error] [pid 9080:tid 129094201378560] [remote 127.0.0.1:53016] ERROR:flask.app:File /var/lib/securedrop/store/D7NFN2FZRXJVQIU7FBLUCLPGMGM6YUEQ7WLNY6Y2U5IVFOGTQEFO6NGONBE6YKOBE54O6O4QR52VK7BPXBG26HXZXJPT33CCVBEJDSY=/1-homemade_flanker-msg.gpg not found
[Tue Jan 19 15:48:01.232360 2021] [wsgi:error] [pid 9079:tid 129094200379136] [remote 127.0.0.1:53016] ERROR:flask.app:Found none when one was expected: No row was found for one()
[Tue Jan 19 15:48:15.683907 2021] [wsgi:error] [pid 9079:tid 129093955651328] [remote 127.0.0.1:53028] ERROR:flask.app:File /var/lib/securedrop/store/D7NFN2FZRXJVQIU7FBLUCLPGMGM6YUEQ7WLNY6Y2U5IVFOGTQEFO6NGONBE6YKOBE54O6O4QR52VK7BPXBG26HXZXJPT33CCVBEJDSY=/1-homemade_flanker-msg.gpg not found
[Tue Jan 19 15:48:56.431962 2021] [wsgi:error] [pid 9080:tid 129094201378560] [remote 127.0.0.1:53032] ERROR:flask.app:File /var/lib/securedrop/store/D7NFN2FZRXJVQIU7FBLUCLPGMGM6YUEQ7WLNY6Y2U5IVFOGTQEFO6NGONBE6YKOBE54O6O4QR52VK7BPXBG26HXZXJPT33CCVBEJDSY=/1-homemade_flanker-msg.gpg not found
[Tue Jan 19 15:55:15.465256 2021] [wsgi:error] [pid 9080:tid 129094009444096] [remote 127.0.0.1:53048] ERROR:flask.app:File /var/lib/securedrop/store/D7NFN2FZRXJVQIU7FBLUCLPGMGM6YUEQ7WLNY6Y2U5IVFOGTQEFO6NGONBE6YKOBE54O6O4QR52VK7BPXBG26HXZXJPT33CCVBEJDSY=/1-homemade_flanker-msg.gpg not found
[Tue Jan 19 15:55:37.184542 2021] [wsgi:error] [pid 9079:tid 129093955651328] [remote 127.0.0.1:53058] ERROR:flask.app:File /var/lib/securedrop/store/D7NFN2FZRXJVQIU7FBLUCLPGMGM6YUEQ7WLNY6Y2U5IVFOGTQEFO6NGONBE6YKOBE54O6O4QR52VK7BPXBG26HXZXJPT33CCVBEJDSY=/1-homemade_flanker-msg.gpg not found

@eloquence eloquence added this to SecureDrop Sprint #64 - 1/6-1/20 in SecureDrop Team Board Jan 19, 2021
@sssoleileraaa
Copy link
Contributor

I tested on nuc7 hardware, 1.7.0~rc2:

  • When I click on the name of the file to try to download it (the /col path) I see the expected behavior.
  • When I select the file and then click "Download", I hit the /None path and see the expected flash message but also the unexpected 404 Not Found message:

Screenshot from 2021-01-19 22-36-41

@sssoleileraaa
Copy link
Contributor

  • I also see an Internal Server Error on the /download_unread/None path (by clicking the X unread button)
  • I was unable to repro in the dev environment

@eloquence eloquence removed this from SecureDrop Sprint #64 - 1/6-1/20 in SecureDrop Team Board Jan 20, 2021
@emkll emkll mentioned this issue Jan 22, 2021
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants