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

Exception Investigation: builtins:ValueError #1395

Closed
3 tasks
ccostino opened this issue Apr 5, 2024 · 1 comment · Fixed by #1606
Closed
3 tasks

Exception Investigation: builtins:ValueError #1395

ccostino opened this issue Apr 5, 2024 · 1 comment · Fixed by #1606
Assignees

Comments

@ccostino
Copy link
Contributor

ccostino commented Apr 5, 2024

This is one of the errors we've seen captured in New Relic that we'd like to dig into and understand, if not also resolve.

This one is likely related to #1394 due to the same error message showing up with the transaction:

Invalid IPv6 URL

Error message:
'RequestContext' object has no attribute 'service'
Path: /
Exception: builtins:ValueError

Traceback (most recent call last):
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/eventlet/greenthread.py", line 221, in main
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/gunicorn/workers/geventlet.py", line 157, in handle
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/gunicorn/workers/base_async.py", line 55, in handle
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/gunicorn/workers/base_async.py", line 108, in handle_request
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/newrelic/api/wsgi_application.py", line 669, in _nr_wsgi_application_wrapper_
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/flask/app.py", line 2213, in __call__
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/notifications_utils/request_helper.py", line 80, in __call__
File "/home/vcap/app/app/proxy_fix.py", line 11, in __call__
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/werkzeug/middleware/proxy_fix.py", line 182, in __call__
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/newrelic/api/wsgi_application.py", line 564, in _nr_wsgi_application_wrapper_
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/flask/app.py", line 2190, in wsgi_app
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/flask/app.py", line 1482, in full_dispatch_request
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/newrelic/api/function_trace.py", line 166, in literal_wrapper
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/flask/app.py", line 1974, in preprocess_request
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/newrelic/hooks/framework_flask.py", line 231, in _nr_wrapper_Flask_before_request_wrapped_
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/newrelic/api/function_trace.py", line 166, in literal_wrapper
File "/home/vcap/app/app/__init__.py", line 361, in redirect_notify_to_beta
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/werkzeug/utils.py", line 106, in __get__
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/werkzeug/sansio/request.py", line 210, in url
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/werkzeug/sansio/utils.py", line 137, in get_current_url
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/werkzeug/urls.py", line 84, in uri_to_iri
File "/home/vcap/deps/0/python/lib/python3.9/urllib/parse.py", line 496, in urlsplit

Implementation Sketch and Acceptance Criteria

  • Look through our log history at https://logs.fr.cloud.gov/ and see if any patterns emerge that might indicate what conditions cause this
  • Try and replicate the error, if possible
  • Follow up in this issue with any findings and possible remediation steps

Security Considerations

  • Be mindful of not sharing sensitive information.
  • We'd like to reduce the errors that occur in the application where possible to maintain application stability and performance, and reduce the chances that the application ends up in an error or invalid state.
@ccostino ccostino moved this from 🌱 New to 🔜 Backlog in Notify.gov product board May 9, 2024
@terrazoon terrazoon self-assigned this Jun 7, 2024
@terrazoon terrazoon moved this from 🔜 Backlog to 🏗 In progress (WIP: ≤ 3 per person) in Notify.gov product board Jun 7, 2024
@terrazoon
Copy link
Contributor

This error message actually looks slightly bogus. In the logs, there are several error messages chained together.

500 error -> Invalid IPv6 URL -> Request Context has no attribute 'service'

It's not totally clear what's going on but it seems like maybe the cause is the IPv6 URL.

@terrazoon terrazoon linked a pull request Jun 10, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from 🏗 In progress (WIP: ≤ 3 per person) to ✅ Done in Notify.gov product board Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants