[Bug]: OC.dialogs.message() throws "TypeError: setHTML is not a function" when allowHtml=true (NC33 regression)
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
The legacy compatibility shim OC.dialogs.message() throws an uncaught TypeError when called with allowHtml = true (the 7th argument). This makes the confirmation dialog never appear for the end user.
The shim is defined in core-main.js and internally does:
const dialog = builder.build()
if (allowHtml) {
dialog.setHTML(content) // ← throws here
}
return dialog.show()
The Dialog instance returned by DialogBuilder.build() no longer exposes a setHTML() method in the version of @nextcloud/dialogs bundled with NC33. The method existed in previous Nextcloud versions and was part of the behaviour that third-party apps rely on through the OC.dialogs public API.
As a result, any app that passes HTML content through OC.dialogs.message() will silently fail — the promise rejects, no dialog is shown, and the user sees no feedback.
This was confirmed by inspecting core-common.js at module 87651 (which exports DialogBuilder as ik): the built Dialog object has show() but not setHTML(). The source map at core-main.js.map confirms the shim still expects setHTML() to exist.
Steps to reproduce
- Install/Update Nextcloud 33.x
- Install any app that calls
OC.dialogs.message()with the last argumentallowHtmlset totrue. For exampleintegration_mastodon v5.0.0 - Open the Dashboard and click the "Connect to Mastodon" button on the widget
- No dialog appears; the browser console shows an uncaught error
Expected behavior
A confirmation dialog is displayed with HTML content (links, line breaks).
Nextcloud Server version
33
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.3
Web server
Apache (supported)
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 31 to 32)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": {
"2": "localhost",
"0": "colours-cloud-test.univ-lemans.fr",
"3": "colours-cloud-test",
"1": "colours-cloud-oo.univ-lemans.fr",
"4": "colours-cloud-oo"
},
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "33.0.2.2",
"overwrite.cli.url": "http:\/\/colours-cloud-test.univ-lemans.fr",
"overwriteprotocol": "https",
"overwritehost": "colours-cloud-test.univ-lemans.fr",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbpersistent": true,
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"lost_password_link": "disabled",
"hide_login_form": true,
"ldapIgnoreNamingRules": false,
"ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.locking": "\\OC\\Memcache\\Redis",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"dbindex": 0,
"timeout": 1.5
},
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"forwarded_for_headers": [
"HTTP_X_FORWARDED",
"HTTP_FORWARDED_FOR",
"HTTP_X_FORWARDED_FOR",
"X_FORWARDED_FOR"
],
"auth.bruteforce.protection.enabled": true,
"trashbin_retention_obligation": "3,30",
"versions_retention_obligation": "3,30",
"appstoreenabled": true,
"filesystem_check_changes": 1,
"debug": false,
"activity_expire_days": 30,
"log_type": "file",
"logfile": "\/var\/www\/html\/nextcloud\/data\/nextcloud.log",
"loglevel": "2",
"logfilemode": 416,
"log_rotate_size": 0,
"logtimezone": "Europe\/Paris",
"allow_user_to_change_display_name": false,
"proxy": "proxy.univ-lemans.fr:3128",
"maintenance": false,
"mail_sendmailmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "25",
"sharing.minSearchStringLength": 3,
"upgrade.disable-web": true,
"updatechecker": false,
"maintenance_window_start": 1,
"profile.enabled": false,
"enable_previews": false,
"has_valid_subscription": true,
"remember_login_cookie_lifetime": 14400,
"localstorage.allowsymlinks": true,
"default_phone_region": "FR",
"data-fingerprint": "9861553a5d0be6e208cff1559db65dbe",
"defaultapp": "",
"apps_paths": [
{
"path": "\/var\/www\/html\/nextcloud\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/nextcloud\/extra-apps",
"url": "\/extra-apps",
"writable": true
}
],
"app_install_overwrite": [
"files_mindmap"
]
}
}
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": {
"2": "localhost",
"0": "colours-cloud-test.univ-lemans.fr",
"3": "colours-cloud-test",
"1": "colours-cloud-oo.univ-lemans.fr",
"4": "colours-cloud-oo"
},
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "33.0.2.2",
"overwrite.cli.url": "http:\/\/colours-cloud-test.univ-lemans.fr",
"overwriteprotocol": "https",
"overwritehost": "colours-cloud-test.univ-lemans.fr",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbpersistent": true,
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"lost_password_link": "disabled",
"hide_login_form": true,
"ldapIgnoreNamingRules": false,
"ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.locking": "\\OC\\Memcache\\Redis",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"dbindex": 0,
"timeout": 1.5
},
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"forwarded_for_headers": [
"HTTP_X_FORWARDED",
"HTTP_FORWARDED_FOR",
"HTTP_X_FORWARDED_FOR",
"X_FORWARDED_FOR"
],
"auth.bruteforce.protection.enabled": true,
"trashbin_retention_obligation": "3,30",
"versions_retention_obligation": "3,30",
"appstoreenabled": true,
"filesystem_check_changes": 1,
"debug": false,
"activity_expire_days": 30,
"log_type": "file",
"logfile": "\/var\/www\/html\/nextcloud\/data\/nextcloud.log",
"loglevel": "2",
"logfilemode": 416,
"log_rotate_size": 0,
"logtimezone": "Europe\/Paris",
"allow_user_to_change_display_name": false,
"proxy": "proxy.univ-lemans.fr:3128",
"maintenance": false,
"mail_sendmailmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "25",
"sharing.minSearchStringLength": 3,
"upgrade.disable-web": true,
"updatechecker": false,
"maintenance_window_start": 1,
"profile.enabled": false,
"enable_previews": false,
"has_valid_subscription": true,
"remember_login_cookie_lifetime": 14400,
"localstorage.allowsymlinks": true,
"default_phone_region": "FR",
"data-fingerprint": "9861553a5d0be6e208cff1559db65dbe",
"defaultapp": "",
"apps_paths": [
{
"path": "\/var\/www\/html\/nextcloud\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/nextcloud\/extra-apps",
"url": "\/extra-apps",
"writable": true
}
],
"app_install_overwrite": [
"files_mindmap"
]
}
}
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": {
"2": "localhost",
"0": "colours-cloud-test.univ-lemans.fr",
"3": "colours-cloud-test",
"1": "colours-cloud-oo.univ-lemans.fr",
"4": "colours-cloud-oo"
},
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "33.0.2.2",
"overwrite.cli.url": "http:\/\/colours-cloud-test.univ-lemans.fr",
"overwriteprotocol": "https",
"overwritehost": "colours-cloud-test.univ-lemans.fr",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbpersistent": true,
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"lost_password_link": "disabled",
"hide_login_form": true,
"ldapIgnoreNamingRules": false,
"ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.locking": "\\OC\\Memcache\\Redis",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"dbindex": 0,
"timeout": 1.5
},
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"forwarded_for_headers": [
"HTTP_X_FORWARDED",
"HTTP_FORWARDED_FOR",
"HTTP_X_FORWARDED_FOR",
"X_FORWARDED_FOR"
],
"auth.bruteforce.protection.enabled": true,
"trashbin_retention_obligation": "3,30",
"versions_retention_obligation": "3,30",
"appstoreenabled": true,
"filesystem_check_changes": 1,
"debug": false,
"activity_expire_days": 30,
"log_type": "file",
"logfile": "\/var\/www\/html\/nextcloud\/data\/nextcloud.log",
"loglevel": "2",
"logfilemode": 416,
"log_rotate_size": 0,
"logtimezone": "Europe\/Paris",
"allow_user_to_change_display_name": false,
"proxy": "proxy.univ-lemans.fr:3128",
"maintenance": false,
"mail_sendmailmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "25",
"sharing.minSearchStringLength": 3,
"upgrade.disable-web": true,
"updatechecker": false,
"maintenance_window_start": 1,
"profile.enabled": false,
"enable_previews": false,
"has_valid_subscription": true,
"remember_login_cookie_lifetime": 14400,
"localstorage.allowsymlinks": true,
"default_phone_region": "FR",
"data-fingerprint": "9861553a5d0be6e208cff1559db65dbe",
"defaultapp": "",
"apps_paths": [
{
"path": "\/var\/www\/html\/nextcloud\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/nextcloud\/extra-apps",
"url": "\/extra-apps",
"writable": true
}
],
"app_install_overwrite": [
"files_mindmap"
]
}
}
List of activated Apps
Enabled:
- activity: 6.0.0
- admin_audit: 1.23.0
- app_api: 33.0.0
- bruteforcesettings: 6.0.0
- calendar: 6.2.2
- circles: 33.0.0
- cloud_federation_api: 1.17.0
- comments: 1.23.0
- contacts: 8.4.3
- contactsinteraction: 1.14.1
- dashboard: 7.13.0
- dav: 1.36.0
- deck: 1.17.0
- drawio: 4.2.3
- federatedfilesharing: 1.23.0
- federation: 1.23.0
- files: 2.5.0
- files_downloadlimit: 5.1.0
- files_pdfviewer: 6.0.0
- files_reminders: 1.6.0
- files_sharing: 1.25.2
- files_trashbin: 1.23.0
- files_versions: 1.26.0
- firstrunwizard: 6.0.0
- groupfolders: 21.0.6
- integration_mastodon: 5.0.0
- logreader: 6.0.0
- lookup_server_connector: 1.21.0
- notifications: 6.0.0
- oauth2: 1.21.0
- onlyoffice: 10.0.0
- privacy: 5.0.0
- profile: 1.2.0
- provisioning_api: 1.23.0
- quota_warning: 1.23.0
- recommendations: 6.0.0
- related_resources: 4.0.0
- serverinfo: 5.0.0
- settings: 1.16.0
- sharebymail: 1.23.0
- spreed: 23.0.3
- survey_client: 5.0.0
- systemtags: 1.23.0
- text: 7.0.0
- theming: 2.8.0
- theming_customcss: 1.20.0
- twofactor_backupcodes: 1.22.0
- twofactor_totp: 15.0.0
- uid_transform: 1.0.0
- updatenotification: 1.23.0
- user_saml: 7.1.4
- viewer: 6.0.0
- webhook_listeners: 1.5.0
- workflowengine: 2.15.0
- workspace: 4.3.1
Disabled:
- encryption: 2.21.0
- files_antivirus: 6.2.0 (installed 6.2.0)
- files_external: 1.25.1
- nextcloud_announcements: 5.0.0 (installed 1.18.0)
- password_policy: 5.0.0 (installed 1.19.0)
- photos: 6.0.0 (installed 6.0.0)
- socialsharing_email: 4.1.0 (installed 4.1.0)
- support: 5.0.0 (installed 1.12.0)
- suspicious_login: 11.0.0
- testing: 1.23.0
- twofactor_nextcloud_notification: 7.0.0
- user_ldap: 1.24.0
- user_status: 1.13.0 (installed 1.9.0)
- weather_status: 1.13.0 (installed 1.9.0)
Enabled:
- activity: 6.0.0
- admin_audit: 1.23.0
- app_api: 33.0.0
- bruteforcesettings: 6.0.0
- calendar: 6.2.2
- circles: 33.0.0
- cloud_federation_api: 1.17.0
- comments: 1.23.0
- contacts: 8.4.3
- contactsinteraction: 1.14.1
- dashboard: 7.13.0
- dav: 1.36.0
- deck: 1.17.0
- drawio: 4.2.3
- federatedfilesharing: 1.23.0
- federation: 1.23.0
- files: 2.5.0
- files_downloadlimit: 5.1.0
- files_pdfviewer: 6.0.0
- files_reminders: 1.6.0
- files_sharing: 1.25.2
- files_trashbin: 1.23.0
- files_versions: 1.26.0
- firstrunwizard: 6.0.0
- groupfolders: 21.0.6
- integration_mastodon: 5.0.0
- logreader: 6.0.0
- lookup_server_connector: 1.21.0
- notifications: 6.0.0
- oauth2: 1.21.0
- onlyoffice: 10.0.0
- privacy: 5.0.0
- profile: 1.2.0
- provisioning_api: 1.23.0
- quota_warning: 1.23.0
- recommendations: 6.0.0
- related_resources: 4.0.0
- serverinfo: 5.0.0
- settings: 1.16.0
- sharebymail: 1.23.0
- spreed: 23.0.3
- survey_client: 5.0.0
- systemtags: 1.23.0
- text: 7.0.0
- theming: 2.8.0
- theming_customcss: 1.20.0
- twofactor_backupcodes: 1.22.0
- twofactor_totp: 15.0.0
- uid_transform: 1.0.0
- updatenotification: 1.23.0
- user_saml: 7.1.4
- viewer: 6.0.0
- webhook_listeners: 1.5.0
- workflowengine: 2.15.0
- workspace: 4.3.1
Disabled:
- encryption: 2.21.0
- files_antivirus: 6.2.0 (installed 6.2.0)
- files_external: 1.25.1
- nextcloud_announcements: 5.0.0 (installed 1.18.0)
- password_policy: 5.0.0 (installed 1.19.0)
- photos: 6.0.0 (installed 6.0.0)
- socialsharing_email: 4.1.0 (installed 4.1.0)
- support: 5.0.0 (installed 1.12.0)
- suspicious_login: 11.0.0
- testing: 1.23.0
- twofactor_nextcloud_notification: 7.0.0
- user_ldap: 1.24.0
- user_status: 1.13.0 (installed 1.9.0)
- weather_status: 1.13.0 (installed 1.9.0)
Enabled:
- activity: 6.0.0
- admin_audit: 1.23.0
- app_api: 33.0.0
- bruteforcesettings: 6.0.0
- calendar: 6.2.2
- circles: 33.0.0
- cloud_federation_api: 1.17.0
- comments: 1.23.0
- contacts: 8.4.3
- contactsinteraction: 1.14.1
- dashboard: 7.13.0
- dav: 1.36.0
- deck: 1.17.0
- drawio: 4.2.3
- federatedfilesharing: 1.23.0
- federation: 1.23.0
- files: 2.5.0
- files_downloadlimit: 5.1.0
- files_pdfviewer: 6.0.0
- files_reminders: 1.6.0
- files_sharing: 1.25.2
- files_trashbin: 1.23.0
- files_versions: 1.26.0
- firstrunwizard: 6.0.0
- groupfolders: 21.0.6
- integration_mastodon: 5.0.0
- logreader: 6.0.0
- lookup_server_connector: 1.21.0
- notifications: 6.0.0
- oauth2: 1.21.0
- onlyoffice: 10.0.0
- privacy: 5.0.0
- profile: 1.2.0
- provisioning_api: 1.23.0
- quota_warning: 1.23.0
- recommendations: 6.0.0
- related_resources: 4.0.0
- serverinfo: 5.0.0
- settings: 1.16.0
- sharebymail: 1.23.0
- spreed: 23.0.3
- survey_client: 5.0.0
- systemtags: 1.23.0
- text: 7.0.0
- theming: 2.8.0
- theming_customcss: 1.20.0
- twofactor_backupcodes: 1.22.0
- twofactor_totp: 15.0.0
- uid_transform: 1.0.0
- updatenotification: 1.23.0
- user_saml: 7.1.4
- viewer: 6.0.0
- webhook_listeners: 1.5.0
- workflowengine: 2.15.0
- workspace: 4.3.1
Disabled:
- encryption: 2.21.0
- files_antivirus: 6.2.0 (installed 6.2.0)
- files_external: 1.25.1
- nextcloud_announcements: 5.0.0 (installed 1.18.0)
- password_policy: 5.0.0 (installed 1.19.0)
- photos: 6.0.0 (installed 6.0.0)
- socialsharing_email: 4.1.0 (installed 4.1.0)
- support: 5.0.0 (installed 1.12.0)
- suspicious_login: 11.0.0
- testing: 1.23.0
- twofactor_nextcloud_notification: 7.0.0
- user_ldap: 1.24.0
- user_status: 1.13.0 (installed 1.9.0)
- weather_status: 1.13.0 (installed 1.9.0)
Nextcloud Signing status
Nextcloud Logs
N/A — this is a client-side JavaScript error.
The bug occurs entirely in the browser: the call chain is `OC.dialogs.message()` → `DialogBuilder.build()` → `dialog.setHTML()` (throws). No HTTP request fails and no server-side exception is generated, so nextcloud.log contains no relevant entries related to this issue.
The relevant error is captured in the browser console:
Uncaught (in promise) TypeError: u.setHTML is not a function
message dialogs.js:359
onOauthClick utils.js:76
onOauthClick utils.js:72
onOauthClick Dashboard.vue:167
s runtime-core.esm-bundler.js:199
i runtime-core.esm-bundler.js:206
Et runtime-core.esm-bundler.js:4378
h NcButton-Dc8V4Urj.mjs:84
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in core-main.js at the OC.dialogs.message() compatibility shim and inspect the DialogBuilder export in core-common.js module 87651. Reproduce the integration_mastodon Dashboard flow with allowHtml=true, then verify that the supported dialog behavior displays the HTML confirmation without an uncaught TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100