Thanks for using the TrueNAS Community Edition issue tracker! TrueNAS Enterprise users receive direct support for their reports from our support portal.

EE RC.2 - RESTful API endpoint GET /app returns a 500

Description

When I call the /app RESTful endpoint, I get a 500 error:

{ "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" }

I have nearly 30 apps, I don’t know if that’s the problem.

Problem/Justification

None

Impact

None

Activity

Show:

Bug Clerk October 22, 2024 at 11:34 AM

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 22, 2024 at 11:34 AM

Thank you for reporting this issue! This has already been reported (see the "Duplicate" ticket linked above), so this issue is being closed to focus effort in the existing ticket.

Mike Gleason jr Couturier October 22, 2024 at 10:35 AM

If nobody has the error like me, I’ll attach a debug, but since it contains private infos, I’ll wait to see if you can reproduce first folded hands

Bug Clerk October 22, 2024 at 10:30 AM

Thank you for submitting this TrueNAS Bug Report! So that we can quickly investigate your issue, please attach a Debug file and any other information related to this issue through our secure and private upload service below. Debug files can be generated in the UI by navigating to System -> Advanced -> Save Debug.

https://ixsystems.atlassian.net/servicedesk/customer/portal/15/group/37/create/153

Duplicate
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Fix versions

Priority

More fields

Katalon Platform

Created October 22, 2024 at 10:30 AM
Updated October 22, 2024 at 11:34 AM
Resolved October 22, 2024 at 11:34 AM