eladkal opened a new issue, #68354:
URL: https://github.com/apache/airflow/issues/68354
> Hi team,
>
> We're hitting the same `TypeError` on FAB admin pages in production
(Airflow **3.2.2**, Helm chart, K8s).
>
> **Symptoms**
> - `GET /auth/roles/list/` → **500**
> - Traceback ends with:
>
> TypeError: super(type, obj): obj (instance of BS3TextFieldWidget) is not
an instance or subtype of type (MockAnyWidget)
> ```shell
> 2026-06-10T10:42:27.718691Z [error ] Exception on /roles/list/ [GET]
[airflow.providers.fab.www.app] loc=app.py:875
request_id=086677e05c236df049734c59506c0b48
> Traceback (most recent call last):
> File "/home/airflow/.local/lib/python3.13/site-packages/flask/app.py",
line 1511, in wsgi_app
> response = self.full_dispatch_request()
> File "/home/airflow/.local/lib/python3.13/site-packages/flask/app.py",
line 919, in full_dispatch_request
> rv = self.handle_user_exception(e)
> File "/home/airflow/.local/lib/python3.13/site-packages/flask/app.py",
line 917, in full_dispatch_request
> rv = self.dispatch_request()
> File "/home/airflow/.local/lib/python3.13/site-packages/flask/app.py",
line 902, in dispatch_request
> return
self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type:
ignore[no-any-return]
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask_appbuilder/security/decorators.py",
line 170, in wraps
> return f(self, *args, **kwargs)
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask_appbuilder/views.py",
line 205, in list
> return self.render_template(
> ~~~~~~~~~~~~~~~~~~~~^
> self.list_template, title=self.list_title, widgets=widgets
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> )
> ^
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask_appbuilder/baseviews.py",
line 346, in render_template
> return render_template(
> template, **dict(list(kwargs.items()) +
list(self.extra_args.items()))
> )
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask/templating.py", line
151, in render_template
> return _render(app, template, context)
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask/templating.py", line
132, in _render
> rv = template.render(context)
> File
"/home/airflow/.local/lib/python3.13/site-packages/jinja2/environment.py", line
1295, in render
> self.environment.handle_exception()
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
> File
"/home/airflow/.local/lib/python3.13/site-packages/jinja2/environment.py", line
942, in handle_exception
> raise rewrite_traceback_stack(source=source)
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask_appbuilder/templates/appbuilder/general/model/list.html",
line 2, in top-level template code
> {% import 'appbuilder/general/lib.html' as lib %}
> ^^^^^^^^^^^^^^^^^^^^^^^^^
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask_appbuilder/templates/appbuilder/base.html",
line 1, in top-level template code
> {% extends base_template %}
> ^^^^^^^^^^^^^^^^^^^^^^^^^
> File
"/home/airflow/.local/lib/python3.13/site-packages/airflow/providers/fab/www/templates/airflow/main.html",
line 21, in top-level template code
> {% from 'airflow/_messages.html' import show_message %}
> ^^^^^^^^^^^^^^^^^^^^^^^^^
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask_appbuilder/templates/appbuilder/baselayout.html",
line 2, in top-level template code
> {% import 'appbuilder/baselib.html' as baselib %}
> ^^^^^^^^^^^^^^^^^^^^^^^^^
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask_appbuilder/templates/appbuilder/init.html",
line 42, in top-level template code
> {% block body %}
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask_appbuilder/templates/appbuilder/baselayout.html",
line 19, in block 'body'
> {% block content %}
> ^^^^^^^^^^^^^^^
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask_appbuilder/templates/appbuilder/general/model/list.html",
line 7, in block 'content'
> {% block list_search scoped %}
> ^^^^^^^^^^^^^^^^^^^^^
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask_appbuilder/templates/appbuilder/general/model/list.html",
line 8, in block 'list_search'
> {% call lib.accordion_tag("accordion1",_("Search"), False) %}
> ^^^^^^^^^^^^^^^^^
> File
"/home/airflow/.local/lib/python3.13/site-packages/jinja2/runtime.py", line
784, in _invoke
> rv = self._func(*arguments)
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask_appbuilder/templates/appbuilder/general/lib.html",
line 304, in template
> {{ caller() }}
> ^^^^^
> File
"/home/airflow/.local/lib/python3.13/site-packages/jinja2/runtime.py", line
784, in _invoke
> rv = self._func(*arguments)
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask_appbuilder/templates/appbuilder/general/model/list.html",
line 9, in template
> {{ widgets.get('search')()|safe }}
> ^^^^^^^^^^^^^
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask_appbuilder/widgets.py",
line 114, in __call__
> form_fields[col] = self.template_args["form"][col]()
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
> File
"/home/airflow/.local/lib/python3.13/site-packages/wtforms/fields/core.py",
line 164, in __call__
> return self.meta.render_field(self, kwargs)
> ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
> File
"/home/airflow/.local/lib/python3.13/site-packages/wtforms/meta.py", line 64,
in render_field
> return field.widget(field, **render_kw)
> ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
> File
"/home/airflow/.local/lib/python3.13/site-packages/flask_appbuilder/fieldwidgets.py",
line 68, in __call__
> return super(BS3TextFieldWidget, self).__call__(field, **kwargs)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> TypeError: super(type, obj): obj (instance of BS3TextFieldWidget) is not
an instance or subtype of type (MockAnyWidget).
> 2026-06-10T10:42:27.731524Z [info ] request finished
[http.access] client_addr=192.168.15.114:34836 duration_us=47650
loc=http_access_log.py:98 method=GET path=/auth/roles/list/ query=
request_id=086677e05c236df049734c59506c0b48 status_code=500
>
> ```
> ```shell
> airflow@airflow3-api-server-579768c4f7-bwvng:/opt/airflow$ python -c
"import airflow; print(\"version:\", airflow.__version__)"
> echo "---"
> CONN=$(python -c "import
airflow.api_fastapi.core_api.services.ui.connections as m; print(m.__file__)")
> echo "file: $CONN"
> grep -n "MockAnyWidget\|mock.patch.*BS3TextFieldWidget" "$CONN" || echo
"NO mock patch found (good)"
> '
> version: 3.2.2
> ---
> file:
/home/airflow/.local/lib/python3.13/site-packages/airflow/api_fastapi/core_api/services/ui/connections.py
> 119: class MockAnyWidget:
> 178:
mock.patch("flask_appbuilder.fieldwidgets.BS3TextFieldWidget",
HookMetaService.MockAnyWidget),
> 180:
"flask_appbuilder.fieldwidgets.BS3TextAreaFieldWidget",
HookMetaService.MockAnyWidget
> 183:
"flask_appbuilder.fieldwidgets.BS3PasswordFieldWidget",
HookMetaService.MockAnyWidget
> ^C
> airflow@airflow3-api-server-579768c4f7-bwvng:/opt/airflow$
> ```
>
_Originally posted by @BevisDev in
[#63982](https://github.com/apache/airflow/issues/63982#issuecomment-4669342065)_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]