GET /api/v2.0/app gives traceback (Error 500)
Description
Problem/Justification
None
Impact
None
Attachments
1
is duplicated by
Activity
Show:

Bug Clerk October 25, 2024 at 2:49 PM
This issue has now been closed. Comments made after this point may not be viewed by the TrueNAS Teams. Please open a new issue if you have found a problem or need to re-engage with the TrueNAS Engineering Teams.

Bug Clerk October 25, 2024 at 2:45 PM
24.10.0 PR: https://github.com/truenas/middleware/pull/14780

Bug Clerk October 25, 2024 at 2:32 PM
This issue has now been closed. Comments made after this point may not be viewed by the TrueNAS Teams. Please open a new issue if you have found a problem or need to re-engage with the TrueNAS Engineering Teams.

Bug Clerk October 25, 2024 at 2:31 PM
24.10.1 PR: https://github.com/truenas/middleware/pull/14779

David Pierce October 21, 2024 at 12:42 AM
here is an image as well
Complete
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee

Reporter

Time remaining
0m
Components
Affects versions
Priority
Katalon Platform
Linked Test Cases, Katalon Defect Results, Katalon Studio Test Results
Katalon Platform
Linked Test Cases, Katalon Defect Results, Katalon Studio Test Results
Created October 21, 2024 at 12:41 AM
Updated February 27, 2025 at 9:12 PM
Resolved October 25, 2024 at 2:49 PM
To Replicate
1) Go to API Docs
2) Login to authorize
3) Navigate to GET /app
4) Try it out, execute
5) Receive Error
a copy of the error is below:
{
"message": "'Application' object has no attribute 'request'",
"traceback": "Traceback (most recent call last):\n File \"/usr/lib/python3/dist-packages/middlewared/restful.py\", line 855, in do\n result = await self.middleware.call_with_audit(methodname, serviceobj, methodobj, method_args,\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1525, in call_with_audit\n result = await self._call(method, serviceobj, methodobj, params, app=app,\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1467, in call\n return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1360, in run_in_executor\n return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.11/concurrent/futures/thread.py\", line 58, in run\n result = self.fn(*self.args, **self.kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/schema/processor.py\", line 55, in nf\n res = f(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/schema/processor.py\", line 183, in nf\n return func(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py\", line 101, in query\n 'host_ip': extra.get('host_ip') or self.middleware.call_sync('interface.websocket_local_ip', app=app),\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1650, in call_sync\n return self.run_coroutine(methodobj(*prepared_call.args))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1690, in run_coroutine\n return fut.result()\n ^^^^^^^^^^^^\n File \"/usr/lib/python3.11/concurrent/futures/_base.py\", line 449, in result\n return self._get_result()\n ^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.11/concurrent/futures/_base.py\", line 401, in __get_result\n raise self._exception\n File \"/usr/lib/python3/dist-packages/middlewared/schema/processor.py\", line 179, in nf\n return await func(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/schema/processor.py\", line 49, in nf\n res = await f(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/plugins/network.py\", line 1459, in websocket_local_ip\n sock = app.request.transport.get_extra_info('socket')\n ^^^^^^^^^^^\nAttributeError: 'Application' object has no attribute 'request'\n"
}
Session ID: a470631f-4a7a-5df8-98ac-976c0c129258