Skip to content

backend, crashed on the bad response from twitter profile retrieving #2174

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

Open
beastoin opened this issue Apr 9, 2025 · 3 comments
Open

Comments

@beastoin
Copy link
Collaborator

beastoin commented Apr 9, 2025

the backend should not be crashing, ofc.

logs:

Date Host Service Message
2025-04-09T03:32:52.538Z "unknown" "backend" For further information visit https://errors.pydantic.dev/2.8/v/string_type
2025-04-09T03:32:52.538Z "unknown" "backend" Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
2025-04-09T03:32:52.538Z "unknown" "backend" id
2025-04-09T03:32:52.538Z "unknown" "backend" For further information visit https://errors.pydantic.dev/2.8/v/int_type
2025-04-09T03:32:52.538Z "unknown" "backend" Input should be a valid integer [type=int_type, input_value=None, input_type=NoneType]
2025-04-09T03:32:52.538Z "unknown" "backend" sub_count
2025-04-09T03:32:52.538Z "unknown" "backend" For further information visit https://errors.pydantic.dev/2.8/v/int_type
2025-04-09T03:32:52.538Z "unknown" "backend" Input should be a valid integer [type=int_type, input_value=None, input_type=NoneType]
2025-04-09T03:32:52.538Z "unknown" "backend" friends
2025-04-09T03:32:52.538Z "unknown" "backend" For further information visit https://errors.pydantic.dev/2.8/v/string_type
2025-04-09T03:32:52.538Z "unknown" "backend" Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
2025-04-09T03:32:52.538Z "unknown" "backend" desc
2025-04-09T03:32:52.538Z "unknown" "backend" For further information visit https://errors.pydantic.dev/2.8/v/string_type
2025-04-09T03:32:52.538Z "unknown" "backend" Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
2025-04-09T03:32:52.538Z "unknown" "backend" rest_id
2025-04-09T03:32:52.538Z "unknown" "backend" For further information visit https://errors.pydantic.dev/2.8/v/string_type
2025-04-09T03:32:52.538Z "unknown" "backend" Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
2025-04-09T03:32:52.538Z "unknown" "backend" profile
2025-04-09T03:32:52.538Z "unknown" "backend" For further information visit https://errors.pydantic.dev/2.8/v/string_type
2025-04-09T03:32:52.538Z "unknown" "backend" Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
2025-04-09T03:32:52.538Z "unknown" "backend" name
2025-04-09T03:32:52.538Z "unknown" "backend" pydantic_core._pydantic_core.ValidationError: 7 validation errors for TwitterProfile
2025-04-09T03:32:52.538Z "unknown" "backend" self.pydantic_validator.validate_python(data, self_instance=self)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/pydantic/main.py", line 193, in init
2025-04-09T03:32:52.538Z "unknown" "backend" ^^^^
2025-04-09T03:32:52.538Z "unknown" "backend" return cls(
2025-04-09T03:32:52.538Z "unknown" "backend" File "/app/utils/social.py", line 45, in from_dict
2025-04-09T03:32:52.538Z "unknown" "backend" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-09T03:32:52.538Z "unknown" "backend" return TwitterProfile.from_dict(data)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/app/utils/social.py", line 98, in fetch_profile
2025-04-09T03:32:52.538Z "unknown" "backend" ^^^^^^
2025-04-09T03:32:52.538Z "unknown" "backend" return func()
2025-04-09T03:32:52.538Z "unknown" "backend" File "/app/utils/social.py", line 67, in with_retry
2025-04-09T03:32:52.538Z "unknown" "backend" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-09T03:32:52.538Z "unknown" "backend" return with_retry(f"fetching Twitter profile for {handle}", fetch_profile)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/app/utils/social.py", line 102, in get_twitter_profile
2025-04-09T03:32:52.538Z "unknown" "backend" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-09T03:32:52.538Z "unknown" "backend" profile = await get_twitter_profile(handle)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/app/routers/apps.py", line 585, in get_twitter_profile_data
2025-04-09T03:32:52.538Z "unknown" "backend" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-09T03:32:52.538Z "unknown" "backend" return await dependant.call(**values)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
2025-04-09T03:32:52.538Z "unknown" "backend" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-09T03:32:52.538Z "unknown" "backend" raw_response = await run_endpoint_function(
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
2025-04-09T03:32:52.538Z "unknown" "backend" ^^^^^^^^^^^^^^^^^^^
2025-04-09T03:32:52.538Z "unknown" "backend" response = await func(request)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
2025-04-09T03:32:52.538Z "unknown" "backend" await app(scope, receive, sender)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2025-04-09T03:32:52.538Z "unknown" "backend" raise exc
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
2025-04-09T03:32:52.538Z "unknown" "backend" await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
2025-04-09T03:32:52.538Z "unknown" "backend" await self.app(scope, receive, send)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
2025-04-09T03:32:52.538Z "unknown" "backend" await route.handle(scope, receive, send)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
2025-04-09T03:32:52.538Z "unknown" "backend" await self.middleware_stack(scope, receive, send)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/routing.py", line 756, in call
2025-04-09T03:32:52.538Z "unknown" "backend" await app(scope, receive, sender)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2025-04-09T03:32:52.538Z "unknown" "backend" raise exc
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
2025-04-09T03:32:52.538Z "unknown" "backend" await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in call
2025-04-09T03:32:52.538Z "unknown" "backend" await self.app(scope, receive_or_disconnect, send_no_error)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
2025-04-09T03:32:52.538Z "unknown" "backend" raise app_exc
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
2025-04-09T03:32:52.538Z "unknown" "backend" ^^^^^^^^^^^^
2025-04-09T03:32:52.538Z "unknown" "backend" return fut.result()
2025-04-09T03:32:52.538Z "unknown" "backend" File "/usr/local/lib/python3.11/asyncio/tasks.py", line 489, in wait_for
2025-04-09T03:32:52.538Z "unknown" "backend" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-09T03:32:52.538Z "unknown" "backend" return await asyncio.wait_for(call_next(request), timeout=timeout)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/app/utils/other/timeout.py", line 38, in dispatch
2025-04-09T03:32:52.538Z "unknown" "backend" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-09T03:32:52.538Z "unknown" "backend" response = await self.dispatch_func(request, call_next)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call
2025-04-09T03:32:52.538Z "unknown" "backend" raise exc
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
2025-04-09T03:32:52.538Z "unknown" "backend" self.gen.throw(typ, value, traceback)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
2025-04-09T03:32:52.538Z "unknown" "backend" with collapse_excgroups():
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call
2025-04-09T03:32:52.538Z "unknown" "backend" await self.app(scope, receive, _send)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in call
2025-04-09T03:32:52.538Z "unknown" "backend" raise exc
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in call
2025-04-09T03:32:52.538Z "unknown" "backend" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-09T03:32:52.538Z "unknown" "backend" return await self.app(scope, receive, wrapped_send)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/dd_tracer/python/ddtrace/contrib/internal/asgi/middleware.py", line 310, in call
2025-04-09T03:32:52.538Z "unknown" "backend" await self.middleware_stack(scope, receive, send)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in call
2025-04-09T03:32:52.538Z "unknown" "backend" await super().call(scope, receive, send)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
2025-04-09T03:32:52.538Z "unknown" "backend" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-09T03:32:52.538Z "unknown" "backend" return await self.app(scope, receive, send)
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in call
2025-04-09T03:32:52.538Z "unknown" "backend" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-04-09T03:32:52.538Z "unknown" "backend" result = await app( # type: ignore[func-returns-value]
2025-04-09T03:32:52.538Z "unknown" "backend" File "/opt/venv/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 399, in run_asgi
2025-04-09T03:32:52.538Z "unknown" "backend" Traceback (most recent call last):
2025-04-09T03:32:52.538Z "unknown" "backend" {"hostname":"unknown","service":"backend","status":"error","timestamp":1744169572538}
2025-04-09T03:32:52.538Z "unknown" "backend" During handling of the above exception, another exception occurred:
2025-04-09T03:32:52.538Z "unknown" "backend" {"hostname":"unknown","service":"backend","status":"error","timestamp":1744169572538}
2025-04-09T03:32:52.538Z "unknown" "backend" '+------------------------------------
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.538Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
2025-04-09T03:32:52.537Z "unknown" "backend"
@Marvellous111
Copy link

@beastoin @kodjima33
Uh...what do we do with this, any detail on this??

@beastoin
Copy link
Collaborator Author

the backend should not be crashing, ofc.

@Marvellous111 also you should understand about this functional a bit

@varshith257
Copy link

varshith257 commented Apr 10, 2025

@beastoin Can we get a cleaner reproducer steps? Are this logs are from backend when retreiving profiles from frontend using X handle at home page or during testing backend?? I think this problem could be probably from frontend testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Someday
Development

No branches or pull requests

4 participants