After leaving a share I can not restore the File from the "Deleted Share" folder

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 33.0.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian/Ubuntu
  • Web server and version (e.g, Apache 2.4.25):
    • Apache (supported)
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • -
  • PHP version (e.g, 8.3):
    • PHP 8.3
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • After leaving a share
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    *
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

When the user leaving a shared folder/file, the files within that folder cannot be restored by the recipient, the access to the shared content is lost once the share is removed.

Steps to replicate it (hint: details matter!):

  1. Navigate to a shared file or folder

  2. Click on “Diese Freigabe verlassen” (see Picture)

  3. Then go to the “Gelöschte Freigaben”

  4. Then try to restore the shared file/folder leads to an error (see second Screenshot)

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

[PHP] Warning: Undefined array key 1 at /var/www/vhosts/testcustomer.anexia-cloudstore.com/htdocs/lib/private/Share20/Manager.php#1387
    POST /ocs/v2.php/apps/files_sharing/api/v1/deletedshares/76216473
    from 10.12.68.250 by 5303-38032c4-group1testanexiacom at Apr 29, 2026, 1:20:06 PM

​
{
  "reqId": "rKKewQ8qdgNQHCyBY4Iz",
  "level": 2,
  "time": "2026-04-29T13:20:06+02:00",
  "remoteAddr": "10.12.68.250",
  "user": "5303-38032c4-group1testanexiacom",
  "app": "PHP",
  "method": "POST",
  "url": "/ocs/v2.php/apps/files_sharing/api/v1/deletedshares/76216473",
  "scriptName": "/ocs/v2.php",
  "message": "Undefined array key 1 at /var/www/vhosts/testcustomer.anexia-cloudstore.com/htdocs/lib/private/Share20/Manager.php#1387",
  "userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0",
  "version": "33.0.1.2",
  "data": {
    "app": "PHP"
  },
  "id": "69f1e96cdf7a6"
}

​

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

XHRPOST
https://testcustomer.anexia-cloudstore.com/ocs/v2.php/apps/files_sharing/api/v1/deletedshares/75909079
[HTTP/2 404  247ms]

	
POST
	https://testcustomer.anexia-cloudstore.com/ocs/v2.php/apps/files_sharing/api/v1/deletedshares/75909079
Status
404
VersionHTTP/2
Übertragen831 B (92 B Größe)
Referrer Policyno-referrer
Anfrage-PrioritätHighest
DNS-AuflösungSystem

    	
    cache-control
    	no-cache, no-store, must-revalidate
    content-length
    	92
    content-security-policy
    	default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none'
    content-type
    	application/json; charset=utf-8
    date
    	Thu, 30 Apr 2026 04:39:37 GMT
    feature-policy
    	autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'
    referrer-policy
    	no-referrer
    server
    	Apache
    strict-transport-security
    	max-age=63072000; includeSubDomains
    x-content-type-options
    	nosniff
    X-Firefox-Spdy
    	h2
    x-frame-options
    	SAMEORIGIN
    x-permitted-cross-domain-policies
    	none
    x-request-id
    	qulX6P4FlhrFiZksbjqZ
    x-robots-tag
    	noindex, nofollow
    x-user-id
    	jg7y8v7rk1_nextcloud2@anexia.com
    	
    Accept
    	application/json, text/plain, */*
    Accept-Encoding
    	gzip, deflate, br, zstd
    Accept-Language
    	de,en-US;q=0.9,en;q=0.8
    Connection
    	keep-alive
    Content-Length
    	0
    Cookie
    	oc_sessionPassphrase=MyM4XVhANJPiY3j6aavEI02bJSSDaaaYJlz6MEZqhTIfl249y6pdZwF%2FZ6Ywu3v2tCTZHoi%2BQ9IjJWVfCMfcLYYuBGLra2KKrVRtnHeE9vEaHah3mnk4294BfUoscBtx; __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; 5294b18fe8a60=fo91n5n33h7ih39qhh85c7a2n5gp5bh1; nc_username=jg7y8v7rk1_nextcloud2%40anexia.com; nc_token=9wc3iIsLgvdpkpj6%2F4qZ5BqL20dN1%2FOS; nc_session_id=fo91n5n33h7ih39qhh85c7a2n5gp5bh1
    Host
    	testcustomer.anexia-cloudstore.com
    Origin
    	https://testcustomer.anexia-cloudstore.com
    Priority
    	u=0
    requesttoken
    	qZFTKkxZVrB0YlL72eOa29R481aZuwM8gwdE0DSpuvU=:xdhnbC0KAuoOJz2NmoD+tboTsR/62DIL6258ugzI2MU=
    Sec-Fetch-Dest
    	empty
    Sec-Fetch-Mode
    	cors
    Sec-Fetch-Site
    	same-origin
    TE
    	trailers
    User-Agent
    	Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0
    X-Requested-With
    	XMLHttpRequest, XMLHttpRequest

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

-

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

-

Apps

The output of occ app:list (if possible).

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.