[Bug]: Clicking "Save share" button gives no feedback resulting in error (public email shares) #45436
Open
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
On instances with Nexcloud versions 27.1.7 and 27.1.9, public email share links display an error when created, whereas they are in fact created (and displayed on page reload only).
Full error message : Error creating the share failed, because this item is already shared with user
On the first click to confirm the share, the request is sent, but the front end displays nothing. The user clicks a second time and receives an error (but the share was created on the first click).
Steps to reproduce
- go to a folder and open its
Sharing
parameters - enter an external e-mail address (not existing on the instance) in the first
Search for share recipients
field - click on the desired e-mail address (make sure you have the e-mail icon at the end of the line)
- click once on
Save share
: nothing happens in the user interface - click on
Save share
a second time: the error message appears (Error creating the share <file name> failed, because this item is already shared with user <email address>
) - reload the page: the e-mail link has now been created
Expected behavior
- go to a folder and open its
Sharing
parameters - enter an external e-mail address (not existing on the instance) in the first
Search for share recipients
field - click on the desired e-mail address (make sure you have the e-mail icon at the end of the line)
- click once on
Save share
: the share is created, without error message
Installation method
Community Manual installation with Archive
Nextcloud Server version
27
Operating system
RHEL/CentOS
PHP engine version
PHP 8.1
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
None
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
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
./nextcloud.log:{"reqId":"2tiqC3NkXfRYeoJPlt8X","level":0,"time":"2024-05-22T12:11:01+02:00","remoteAddr":"37.171.179.29","user":"user","app":"Federated File Sharing","method":"POST","url":"/ocs/v2.php/apps/files_sharing/api/v1/shares","message":"Sharing Talk failed, because this item is already shared with user test@example\.fr","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0","version":"27.1.9.1","data":{"app":"Federated File Sharing"}}
./nextcloud.log:{"reqId":"2tiqC3NkXfRYeoJPlt8X","level":3,"time":"2024-05-22T12:11:01+02:00","remoteAddr":"37.171.179.29","user":"user","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/files_sharing/api/v1/shares","message":"Exception thrown: Exception","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0","version":"27.1.9.1","exception":{"Exception":"Exception","Message":"Le partage de Talk a \u00e9chou\u00e9, parce que cet \u00e9l\u00e9ment est d\u00e9j\u00e0 partag\u00e9 avec l'utilisateur test@example\.fr","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/nextcloud\.domain\.fr/lib/private/Share20/Manager.php","line":828,"function":"create","class":"OCA\\ShareByMail\\ShareByMailProvider","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/nextcloud\.domain\.fr/apps/files_sharing/lib/Controller/ShareAPIController.php","line":823,"function":"createShare","class":"OC\\Share20\\Manager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/nextcloud\.domain\.fr/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"createShare","class":"OCA\\Files_Sharing\\Controller\\ShareAPIController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/nextcloud\.domain\.fr/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Files_Sharing\\Controller\\ShareAPIController"],"createShare"]},{"file":"/var/www/html/nextcloud/nextcloud\.domain\.fr/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Files_Sharing\\Controller\\ShareAPIController"],"createShare"]},{"file":"/var/www/html/nextcloud/nextcloud\.domain\.fr/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Files_Sharing\\Controller\\ShareAPIController","createShare",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["ocs.files_sharing.ShareAPI.createShare"]]},{"file":"/var/www/html/nextcloud/nextcloud\.domain\.fr/ocs/v1.php","line":65,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/files_sharing/api/v1/shares"]},{"file":"/var/www/html/nextcloud/nextcloud\.domain\.fr/ocs/v2.php","line":23,"args":["/var/www/html/nextcloud/nextcloud\.domain\.fr/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/nextcloud\.domain\.fr/apps/sharebymail/lib/ShareByMailProvider.php","Line":181,"CustomMessage":"Exception thrown: Exception"}}
Activity