server
server copied to clipboard
[Bug]: Provisionning API /ocs/v1.php/cloud/apps/<app-id> doesn't return anything in XML format
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug, not a question or a configuration/webserver/proxy issue.
- [X] This issue is not already reported on Github (I've searched it).
- [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [X] Nextcloud Server is running on 64bit capable CPU, PHP and OS.
- [X] I agree to follow Nextcloud's Code of Conduct.
Bug description
Following these instruction : https://docs.nextcloud.com/server/latest/admin_manual/configuration_user/instruction_set_for_apps.html#get-app-info
I get no result when trying to get an app metadata with the provisioning API xml format.
When JSON formatting is requested, I get a valid result. Others app routes are working, I can disable and enable an app.
Steps to reproduce
- Create a fresh install from the official docker image
- Use the following command:
curl -u {admin}:{password -X GET 'http://{nc-instance-domain}/ocs/v1.php/cloud/apps/files' -H "OCS-APIRequest: true"
- You get a HTTP 200 OK response with a content length of 0.
Expected behavior
I would expect the documented response (here):
<?xml version="1.0"?>
<ocs>
<meta>
<statuscode>100</statuscode>
<status>ok</status>
</meta>
<data>
<info/>
<remote>
<files>appinfo/remote.php</files>
<webdav>appinfo/remote.php</webdav>
<filesync>appinfo/filesync.php</filesync>
</remote>
<public/>
<id>files</id>
<name>Files</name>
<description>File Management</description>
<licence>AGPL</licence>
<author>Robin Appelman</author>
<require>4.9</require>
<shipped>true</shipped>
<standalone></standalone>
<default_enable></default_enable>
<types>
<element>filesystem</element>
</types>
</data>
</ocs>
Installation method
Official Docker image
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.0
Web server
Apache (supported)
Database engine version
SQlite
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- [X] Default user-backend (database)
Configuration report
www-data@7faffe3cd28f:~/html$ ./occ config:list system
{
"system": {
"htaccess.RewriteBase": "\/",
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"192.168.1.111:8080"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "sqlite3",
"version": "24.0.2.1",
"overwrite.cli.url": "http:\/\/192.168.1.111:8080",
"installed": true,
"ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory"
}
}
List of activated Apps
www-data@7faffe3cd28f:~/html$ ./occ app:list
Enabled:
- accessibility: 1.10.0
- activity: 2.16.0
- admin_audit: 1.14.0
- bruteforcesettings: 2.4.0
- circles: 24.0.0
- cloud_federation_api: 1.7.0
- comments: 1.14.0
- contactsinteraction: 1.5.0
- dashboard: 7.4.0
- dav: 1.22.0
- federatedfilesharing: 1.14.0
- federation: 1.14.0
- files: 1.19.0
- files_external: 1.16.1
- files_pdfviewer: 2.5.0
- files_rightclick: 1.3.0
- files_sharing: 1.16.2
- files_trashbin: 1.14.0
- files_versions: 1.17.0
- files_videoplayer: 1.13.0
- firstrunwizard: 2.13.0
- logreader: 2.9.0
- lookup_server_connector: 1.12.0
- nextcloud_announcements: 1.13.0
- notifications: 2.12.0
- oauth2: 1.12.0
- password_policy: 1.14.0
- photos: 1.6.0
- privacy: 1.8.0
- provisioning_api: 1.14.0
- quota_warning: 1.14.0
- recommendations: 1.3.0
- serverinfo: 1.14.0
- settings: 1.6.0
- sharebymail: 1.14.0
- support: 1.7.0
- survey_client: 1.12.0
- systemtags: 1.14.0
- text: 3.5.1
- theming: 1.15.0
- twofactor_backupcodes: 1.13.0
- updatenotification: 1.14.0
- user_ldap: 1.14.1
- user_status: 1.4.0
- viewer: 1.8.0
- weather_status: 1.4.0
- workflowengine: 2.6.0
Disabled:
- encryption: 2.12.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
No response
Additional info
No response
Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!
My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!
If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+
@szaimen If it's the same cause (see forms issue) then this is still valid in 26
@szaimen I was able to reproduce it on 25.0.3.2 and 25.0.4.1 in the same environment.
@szaimen If it's the same cause (see forms issue) then this is still valid in 26
Seems like the same issue.
I tested it once on forms - Seems like it works, when returning an array (forms/api/v2/forms returns a list of forms), while it does not work, when returning an object (forms/api/v2/form/1 returns a single form).
Corresponding error log should be this one (no trace unfortunately):
PHP - TypeError: XMLWriter::writeElement(): Argument #2 ($content) must be of type ?string, stdClass given at /var/www/nc/lib/private/AppFramework/OCS/BaseResponse.php#148
Cc @provokateurin
If the error message you are seeing is related to the bug, then I already fixed it in https://github.com/nextcloud/server/pull/38745. It was meant as a feature though, so apparently some apis misbehave. It is only available on master right now, but I guess it could be backported to fix this bug. I will first try it myself and see if it fixes this problem.
@MercierCorentin I tried your command to reproduce the problem but I get a valid XML response. I tested it on 27.0.0 which doesn't have the PR I mentioned above applied. Can you try again on 27.0.0 and see if your problem is solved?
I assume this problem is fixed in the latest release, please re-open if that is not the case.
@provokateurin I still get the error message from @jotoeri's post in Forms with NC 27.0.1 when I try to get a single form.
TypeError: XMLWriter::writeElement(): Argument #2 ($content) must be of type ?string, stdClass given at /srv/www/htdocs/nextcloud/lib/private/AppFramework/OCS/BaseResponse.php#151