Repository navigation
FileActionMenu entry does not appear #848
Description
Describe the bug
Our app was running and working until we had to update NC from v32 to v33.
What happens
Our ExApp registers a file menu entry inside the method reacting to Nextcloud enabling it (GET /enable?enable=1). The request reaches the proper method inside the ExApp Plugin. Nevertheless, the menu entry is not shown.
What we tried
We debugged the flow of all information and every step including all HTTPS request
- registration of daemon
- registration of the app
- call to ExApp /heartbeat
- call to ExApp /init
- call to ExApp /enable
- call to Nextcloud to register the UiFileActionEntry (V2, synchro)
We could follow the flow until inapp_api/lib/Controller/OCSUiController.php:69the entry is registered.
We are able to GET the entry (nc.ui.files_dropdown_menu.get_entry), hence it is accepted and saved.
Nevertheless, the entry is not shown (we also switched the mime type from audio to file to ""). We did not set the icon parameter (see also FileActionMenu with icon is not shown even though its registered #630). We cleared redis cache and APCu cache.
- call to Nextcloud to register the UiFileActionEntry (V2, synchro)
We are out of ideas.
What is a minimal Python-ExApp that reliably shows a dummy context menu entry for any file in NC33?
Steps/Code to Reproduce
"""Nextcloud AppApi Server for a whisper transcription service"""
import logging
from contextlib import asynccontextmanager
from os import environ
from fastapi import (
FastAPI, # type: ignore[import-untyped]
)
from nc_py_api import NextcloudApp # type: ignore[import-untyped]
from nc_py_api.ex_app import (
LogLvl,
run_app, # type: ignore[import-untyped]
set_handlers,
)
HOST = environ["APP_HOSTNAME"]
APP_ID = environ["APP_ID"]
APP_VERSION = environ["APP_VERSION"]
APP_TAG = environ["APP_TAG"]
WS_ENDPOINT = "/whisper"
logging.basicConfig(format="%(levelname)s: %(message)s", level=logging.DEBUG)
logger = logging.getLogger("ncsst_whisper")
def enabled_handler(enabled: bool, nc: NextcloudApp) -> str: # type: ignore[arg-type]
"""enable/disable app"""
# This will be called each time application is `enabled` or `disabled`
if enabled:
nc.log(LogLvl.WARNING, f"Hello from {nc.app_cfg.app_name} :)")
logger.info("AppId %s enabled", APP_ID)
nc.ui.files_dropdown_menu.register_ex(
APP_ID,
"Transcribe",
WS_ENDPOINT,
mime="file"
)
result = nc.ui.files_dropdown_menu.get_entry(APP_ID)
logger.info("Files dropdown menu registered: %s", result)
else:
nc.log(LogLvl.WARNING, f"Bye bye from {nc.app_cfg.app_name} :(")
logger.info("AppId %s disabled", APP_ID)
nc.ui.files_dropdown_menu.unregister(APP_ID)
return ""
@asynccontextmanager
async def lifespan(app: FastAPI):
"""initialize NC ExApp wrapper"""
set_handlers(app, enabled_handler, default_init=False) # type: ignore[arg-type]
yield
APP = FastAPI(lifespan=lifespan)
if __name__ == "__main__":
logger.info("Running %s (v%s)", APP_TAG, APP_VERSION)
run_app("lib.main:APP", log_level="info")Expected Results
UiFileActionEntry entry is visible
Actual Results
No entry is visible for any file
Setup configuration
NC: v33.0
ExAppPlugin in the newest version
ExApp installed via a manual-install daemon, the app running as a docker container on a k8s cluster, written in Python, using nc_py_api. The app is communicating via HTTPS with Nextcloud.
Activity
oleksandr-nc commentedon Apr 30, 2026
Hello. I will take a loot at this. Could you post a link to your app in case if it is open-source?
oleksandr-nc commentedon Apr 30, 2026
Looks like this is a regression, the Server repo ships the new
@nextcloud/filesfrontend package and AppAPI ships the old one.Now is the hardest part - to add test in the CI that will prove this and will shield us against future regressions...
test(exapp_integration): add Playwright file action menu regression for
test(exapp_integration): add Playwright file action menu regression for
test(exapp_integration): add Playwright file action menu regression for
test(exapp_integration): add Playwright file action menu regression for
test(exapp_integration): add Playwright file action menu regression for
Merge pull request #855 from nextcloud/fix/848-fileaction-registry-mi…
oleksandr-nc commentedon May 4, 2026
@BerengarWLehr will be fixed in the next NC33 release.
If you need it, here's the PR for stable 33 that fixed it: #856