wgilpin / recruitment-ascee

2 stars 0 forks source link

Black screen when looking at screenshots tab from an alt #503

Open mcgibbon opened 5 years ago

mcgibbon commented 5 years ago

Steps to reproduce:

Open applicant Pohjola Ty. Go to alt Shang Thanos. Open screenshots tab. Note that the screenshots tab does actually work on the main.

2019-05-15T18:00:22.343957+00:00 app[web.1]: [2019-05-15 18:00:22,343] ERROR in app: Exception on /api/character/summary [GET]
2019-05-15T18:00:22.343961+00:00 app[web.1]: Traceback (most recent call last):
2019-05-15T18:00:22.343962+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app
2019-05-15T18:00:22.343964+00:00 app[web.1]: response = self.full_dispatch_request()
2019-05-15T18:00:22.343968+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
2019-05-15T18:00:22.343970+00:00 app[web.1]: rv = self.handle_user_exception(e)
2019-05-15T18:00:22.343971+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception
2019-05-15T18:00:22.343973+00:00 app[web.1]: reraise(exc_type, exc_value, tb)
2019-05-15T18:00:22.343974+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
2019-05-15T18:00:22.343976+00:00 app[web.1]: raise value
2019-05-15T18:00:22.343977+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
2019-05-15T18:00:22.343978+00:00 app[web.1]: rv = self.dispatch_request()
2019-05-15T18:00:22.343980+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
2019-05-15T18:00:22.343981+00:00 app[web.1]: return self.view_functions[rule.endpoint](**req.view_args)
2019-05-15T18:00:22.343983+00:00 app[web.1]: File "/app/server/security.py", line 14, in decorated
2019-05-15T18:00:22.343984+00:00 app[web.1]: return func(*args, **kwargs)
2019-05-15T18:00:22.343985+00:00 app[web.1]: File "/app/server/routes/character/summary.py", line 43, in api_character_summary
2019-05-15T18:00:22.343987+00:00 app[web.1]: current_user=current_user
2019-05-15T18:00:22.343988+00:00 app[web.1]: File "/app/server/character/summary.py", line 15, in get_character_summary
2019-05-15T18:00:22.343989+00:00 app[web.1]: character.user_id).id
2019-05-15T18:00:22.343991+00:00 app[web.1]: AttributeError: 'NoneType' object has no attribute 'id'
2019-05-15T18:00:22.344045+00:00 app[web.1]: ERROR:flask.app:Exception on /api/character/summary [GET]
2019-05-15T18:00:22.344047+00:00 app[web.1]: Traceback (most recent call last):
2019-05-15T18:00:22.344049+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app
2019-05-15T18:00:22.344050+00:00 app[web.1]: response = self.full_dispatch_request()
2019-05-15T18:00:22.344052+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
2019-05-15T18:00:22.344053+00:00 app[web.1]: rv = self.handle_user_exception(e)
2019-05-15T18:00:22.344054+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception
2019-05-15T18:00:22.344055+00:00 app[web.1]: reraise(exc_type, exc_value, tb)
2019-05-15T18:00:22.344057+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
2019-05-15T18:00:22.344058+00:00 app[web.1]: raise value
2019-05-15T18:00:22.344059+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
2019-05-15T18:00:22.344061+00:00 app[web.1]: rv = self.dispatch_request()
2019-05-15T18:00:22.344062+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
2019-05-15T18:00:22.344063+00:00 app[web.1]: return self.view_functions[rule.endpoint](**req.view_args)
2019-05-15T18:00:22.344065+00:00 app[web.1]: File "/app/server/security.py", line 14, in decorated
2019-05-15T18:00:22.344066+00:00 app[web.1]: return func(*args, **kwargs)
2019-05-15T18:00:22.344067+00:00 app[web.1]: File "/app/server/routes/character/summary.py", line 43, in api_character_summary
2019-05-15T18:00:22.344069+00:00 app[web.1]: current_user=current_user
2019-05-15T18:00:22.344070+00:00 app[web.1]: File "/app/server/character/summary.py", line 15, in get_character_summary
2019-05-15T18:00:22.344071+00:00 app[web.1]: character.user_id).id
2019-05-15T18:00:22.344073+00:00 app[web.1]: AttributeError: 'NoneType' object has no attribute 'id'
2019-05-15T18:00:22.344315+00:00 app[web.1]: ERROR:root:An error occurred during a request.
2019-05-15T18:00:22.344317+00:00 app[web.1]: Traceback (most recent call last):
2019-05-15T18:00:22.344318+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app
2019-05-15T18:00:22.344320+00:00 app[web.1]: response = self.full_dispatch_request()
2019-05-15T18:00:22.344321+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
2019-05-15T18:00:22.344323+00:00 app[web.1]: rv = self.handle_user_exception(e)
2019-05-15T18:00:22.344324+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception
2019-05-15T18:00:22.344325+00:00 app[web.1]: reraise(exc_type, exc_value, tb)
2019-05-15T18:00:22.344327+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
2019-05-15T18:00:22.344328+00:00 app[web.1]: raise value
2019-05-15T18:00:22.344329+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
2019-05-15T18:00:22.344330+00:00 app[web.1]: rv = self.dispatch_request()
2019-05-15T18:00:22.344332+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
2019-05-15T18:00:22.344333+00:00 app[web.1]: return self.view_functions[rule.endpoint](**req.view_args)
2019-05-15T18:00:22.344334+00:00 app[web.1]: File "/app/server/security.py", line 14, in decorated
2019-05-15T18:00:22.344336+00:00 app[web.1]: return func(*args, **kwargs)
2019-05-15T18:00:22.344337+00:00 app[web.1]: File "/app/server/routes/character/summary.py", line 43, in api_character_summary
2019-05-15T18:00:22.344338+00:00 app[web.1]: current_user=current_user
2019-05-15T18:00:22.344340+00:00 app[web.1]: File "/app/server/character/summary.py", line 15, in get_character_summary
2019-05-15T18:00:22.344341+00:00 app[web.1]: character.user_id).id
2019-05-15T18:00:22.344342+00:00 app[web.1]: AttributeError: 'NoneType' object has no attribute 'id'
mcgibbon commented 5 years ago

OK now I'm getting this error:

2019-05-16T00:29:11.374383+00:00 heroku[router]: at=info method=GET path="/api/user/images/2114034014" host=ascee-recruit.herokuapp.com request_id=d63eafea-7142-45a1-b3d5-ee4d3c4711ce fwd="162.244.138.97" dyno=web.1 connect=0ms service=14ms status=403 bytes=225 protocol=http

Likely because we're using heroku.

I'll fix the summary issue, but that's likely not even what was causing the blank screen - it was just because a call was sent to get my own summary (even though it shouldn't have to), where it found I have no open application.

In fact, I see no valid use for the /api/character/summary endpoint, since it can only be accessed by recruiters, and they never want to see their own summary anyways.

mcgibbon commented 5 years ago

Ah, nvm, you use it to determine the status of an applicant's application when seeing what window to show them.

mcgibbon commented 5 years ago

I'm saying this is closed by #521 because the other part can't be "fixed" until we move off heroku, and will likely disappear at that point. We can open a new issue if there are image problems on the new server.

mcgibbon commented 5 years ago

Reopening the issue as we're now on digital ocean and we still have the issue (though there are also still image issues).