I am having a trouble about shared link error

Thank you for your continuous support.

Nextcloud version (eg, 20.0.5): 25.0.6
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.52
PHP version (eg, 7.4): PHP 8.1.2

The issue you are facing:

※Recorded on the previous day
I am having a trouble about shared link error.
I am using the service in JST(UTC+9:00), however, I cannot create shared link at 0:00 am to 9:00 am in JST.
I can create it from 9:00 am.
I use OS and PHP in JST.
Locale of profile in nextcloud user setting is set as Japanese and the time is shown correct in JST.
Is there any other way to set the shared link correct and solve the problem?
Please kindly give me some advice.

※Listed today
Today I took a log and tried to solve the problem and here’s what I found out.

When I create a link at 0:00 am to 8:59 am in JST, expiration date validation error occurs.

If I create a link with today’s date, 22/06/2023 will be an error, however, once I change the expiration date to 21/06/2023, it succeeded to create the link properly.
After 9:00 am I was able to create a link with the date 22/06/2023.

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:
1 Admin> Sharing >Set default expiration date
→Expire after 30 day(s) (Enforce expiration date checked)

・Error Pattern
2. I cannot create a share link at 8:39(JST) setting Exiration date 22/06/2023


・Sccess Pattern1
2. I can create a share link at 8:41(JST) setting Exiration date 21/06/2023


・Sccess Pattern2
2. I can creat a share link at 9:01(JST) setting Exiration date 22/06/2023


SueccessShareLink_After900_2

The output of your Nextcloud log in Admin > Logging:

{"reqId":"ZGv9KFTZBckxJzzkhJJGWgAAAA8","level":3,"time":"2023-05-23T08:39:21+09:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"admin","app":"no app in context","method":"POST","url":"/drive/ocs/v2.php/apps/files_sharing/api/v1/shares","message":"Cannot set expiration date more than 30 days in the future","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36","version":"25.0.6.1","exception":{"Exception":"OCP\\Share\\Exceptions\\GenericShareException","Message":"Cannot set expiration date more than 30 days in the future","Code":404,"Trace":[{"file":"/var/www/hostname_8004/htdocs/drive/lib/private/Share20/Manager.php","line":779,"function":"validateExpirationDateLink","class":"OC\\Share20\\Manager","type":"->"},{"file":"/var/www/hostname_8004/htdocs/drive/apps/files_sharing/lib/Controller/ShareAPIController.php","line":715,"function":"createShare","class":"OC\\Share20\\Manager","type":"->"},{"file":"/var/www/hostname_8004/htdocs/drive/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"createShare","class":"OCA\\Files_Sharing\\Controller\\ShareAPIController","type":"->"},{"file":"/var/www/hostname_8004/htdocs/drive/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/hostname_8004/htdocs/drive/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/hostname_8004/htdocs/drive/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/hostname_8004/htdocs/drive/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/hostname_8004/htdocs/drive/ocs/v2.php","line":23,"args":["/var/www/hostname_8004/htdocs/drive/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/hostname_8004/htdocs/drive/lib/private/Share20/Manager.php","Line":516,"Hint":"Cannot set expiration date more than 30 days in the future","CustomMessage":"--"}}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

## Server configuration detail

**Operating system:** Linux 5.15.0-71-generic #78-Ubuntu SMP Tue Apr 18 09:00:29 UTC 2023 x86_64

**Webserver:** Apache (fpm-fcgi)

**Database:** mysql 10.6.12

**PHP version:** 8.1.2-1ubuntu2.11

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, imap, intl, ldap, exif, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache

**Nextcloud version:** 25.0.6 - 25.0.6.1

**Updated from an older Nextcloud/ownCloud or fresh install:** 

**Where did you install Nextcloud from:** unknown

<details><summary>Signing status</summary>

[]
</details>

<details><summary>List of activated apps</summary>

Enabled:

  • circles: 25.0.0
  • cloud_federation_api: 1.8.0
  • comments: 1.15.0
  • contactsinteraction: 1.6.0
  • dav: 1.24.0
  • federatedfilesharing: 1.15.0
  • federation: 1.15.0
  • files: 1.20.1
  • files_pdfviewer: 2.6.0
  • files_rightclick: 1.4.0
  • files_sharing: 1.17.0
  • files_trashbin: 1.15.0
  • files_versions: 1.18.0
  • firstrunwizard: 2.14.0
  • logreader: 2.10.0
  • lookup_server_connector: 1.13.0
  • nextcloud_announcements: 1.14.0
  • notifications: 2.13.1
  • oauth2: 1.13.0
  • password_policy: 1.15.0
  • privacy: 1.9.0
  • provisioning_api: 1.15.0
  • recommendations: 1.4.0
  • related_resources: 1.0.4
  • serverinfo: 1.15.0
  • settings: 1.7.0
  • sharebymail: 1.15.0
  • support: 1.8.0
  • survey_client: 1.13.0
  • systemtags: 1.15.0
  • text: 3.6.0
  • theming: 2.0.1
  • twofactor_backupcodes: 1.14.0
  • updatenotification: 1.15.0
  • user_ldap: 1.15.0
  • user_status: 1.5.0
  • viewer: 1.9.0
  • weather_status: 1.5.0
  • workflowengine: 2.7.0
    Disabled:
  • activity: 2.17.0
  • admin_audit
  • bruteforcesettings
  • dashboard: 7.5.0
  • encryption
  • files_external
  • photos: 2.0.1
  • suspicious_login
  • twofactor_email: 2.7.3
  • twofactor_totp
</details>

<details><summary>Configuration (config/config.php)</summary>

{
“instanceid”: “REMOVED SENSITIVE VALUE”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“172.18.1.33:8004”
],
“datadirectory”: “REMOVED SENSITIVE VALUE”,
“dbtype”: “mysql”,
“version”: “25.0.6.1”,
“overwrite.cli.url”: “http://172.18.1.33:8004/drive”,
“dbname”: “REMOVED SENSITIVE VALUE”,
“dbhost”: “REMOVED SENSITIVE VALUE”,
“dbport”: “”,
“dbtableprefix”: “oc_”,
“mysql.utf8mb4”: true,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“installed”: true,
“mail_smtpmode”: “smtp”,
“mail_sendmailmode”: “smtp”,
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“mail_smtphost”: “REMOVED SENSITIVE VALUE”,
“mail_smtpport”: “25”,
“auth.bruteforce.protection.enabled”: false,
“trusted_proxies”: “REMOVED SENSITIVE VALUE”,
“memcache.local”: “\OC\Memcache\APCu”,
“memcache.distributed”: “\OC\Memcache\Redis”,
“redis”: {
“host”: “REMOVED SENSITIVE VALUE”,
“port”: 6379
},
“default_language”: “ja”,
“default_locale”: “ja”,
“default_phone_region”: “JP”,
“maintenance”: false,
“ldapProviderFactory”: “OCA\User_LDAP\LDAPProviderFactory”,
“updater.secret”: “REMOVED SENSITIVE VALUE”,
“theme”: “”,
“loglevel”: 0,
“logfile”: “/var/www/hostname_8004/log/nextcloud.log”,
“log_type”: “file”,
“logtimezone”: “Asia/Tokyo”,
“log_rotate_size”: 104857600
}

</details>


**Browser:** Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36


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

xxx.xxx.xxx.xxx - - [23/May/2023:08:38:22 +0900] "PROPFIND /drive/remote.php/dav/files/nextcloudadmin/DSC_1483.JPG HTTP/1.1" 207 1574 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:38:22 +0900] "PROPFIND /drive/remote.php/dav/systemtags-relations/files/17752 HTTP/1.1" 207 1235 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:38:22 +0900] "PROPFIND /drive/remote.php/dav/systemtags-relations/files/17752 HTTP/1.1" 207 1262 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:38:22 +0900] "PROPFIND /drive/remote.php/dav/versions/nextcloudadmin/versions/17752 HTTP/1.1" 207 1241 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:38:22 +0900] "GET /drive/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=%2FDSC_1483.JPG&reshares=true HTTP/1.1" 200 995 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chro
me/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:38:22 +0900] "GET /drive/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=%2FDSC_1483.JPG&shared_with_me=true HTTP/1.1" 200 995 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko
) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:38:22 +0900] "REPORT /drive/remote.php/dav/comments/files/17752 HTTP/1.1" 207 943 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:38:23 +0900] "GET /drive/ocs/v2.php/apps/related_resources/related/files/17752?format=json HTTP/1.1" 200 968 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.3
6"
xxx.xxx.xxx.xxx - - [23/May/2023:08:38:23 +0900] "GET /drive/ocs/v2.php/apps/user_status/api/v1/statuses/nextcloudadmin HTTP/1.1" 200 1016 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:38:23 +0900] "GET /drive/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 881 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:38:23 +0900] "GET /drive/ocs/v2.php/apps/files_sharing/api/v1/sharees_recommended?format=json&itemType=file HTTP/1.1" 200 1012 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.
0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:38:30 +0900] "GET /drive/ocs/v2.php/apps/password_policy/api/v1/generate HTTP/1.1" 200 1016 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:38:31 +0900] "GET /drive/ocs/v2.php/apps/password_policy/api/v1/generate HTTP/1.1" 200 989 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:38:42 +0900] "GET /drive/index.php/csrftoken HTTP/1.1" 200 1038 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:38:53 +0900] "GET /drive/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 908 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:39:20 +0900] "GET /drive/ocs/v2.php/apps/password_policy/api/v1/generate HTTP/1.1" 200 1016 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:39:20 +0900] "POST /drive/ocs/v2.php/apps/files_sharing/api/v1/shares HTTP/1.1" 404 1006 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:39:23 +0900] "GET /drive/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 908 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:39:53 +0900] "GET /drive/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 908 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:39:56 +0900] "PUT /drive/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1033 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:40:12 +0900] "PUT /drive/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1033 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:40:22 +0900] "GET /drive/ocs/v2.php/apps/password_policy/api/v1/generate HTTP/1.1" 200 1016 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:40:23 +0900] "GET /drive/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 908 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:40:23 +0900] "POST /drive/ocs/v2.php/apps/files_sharing/api/v1/shares HTTP/1.1" 200 1450 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:40:34 +0900] "PUT /drive/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1033 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:40:35 +0900] "PROPFIND /drive/remote.php/dav/files/nextcloudadmin/DSC_1483.JPG HTTP/1.1" 207 1557 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:40:36 +0900] "PROPFIND /drive/remote.php/dav/systemtags-relations/files/17752 HTTP/1.1" 207 1235 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:40:36 +0900] "PROPFIND /drive/remote.php/dav/systemtags-relations/files/17752 HTTP/1.1" 207 1262 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:40:39 +0900] "DELETE /drive/ocs/v2.php/apps/files_sharing/api/v1/shares/33 HTTP/1.1" 200 995 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:40:43 +0900] "GET /drive/ocs/v2.php/apps/password_policy/api/v1/generate HTTP/1.1" 200 1016 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:40:44 +0900] "GET /drive/ocs/v2.php/apps/password_policy/api/v1/generate HTTP/1.1" 200 989 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:40:53 +0900] "GET /drive/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 908 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:41:05 +0900] "PUT /drive/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1033 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:41:09 +0900] "PUT /drive/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1033 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:41:20 +0900] "PUT /drive/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1033 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:41:23 +0900] "GET /drive/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 908 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:41:24 +0900] "PUT /drive/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1006 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:41:36 +0900] "GET /drive/ocs/v2.php/apps/password_policy/api/v1/generate HTTP/1.1" 200 1016 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:41:37 +0900] "POST /drive/ocs/v2.php/apps/files_sharing/api/v1/shares HTTP/1.1" 200 1449 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:41:42 +0900] "PUT /drive/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1033 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:41:46 +0900] "PUT /drive/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1033 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:41:53 +0900] "GET /drive/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 908 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [23/May/2023:08:41:59 +0900] "PUT /drive/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1033 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

{"reqId":"ZGv9KFTZBckxJzzkhJJGWgAAAA8","level":3,"time":"2023-05-23T08:39:21+09:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"admin","app":"no app in context","method":"POST","url":"/drive/ocs/v2.php/apps/files_sharing/api/v1/shares","message":"Cannot set expiration date more than 30 days in the future","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36","version":"25.0.6.1","exception":{"Exception":"OCP\\Share\\Exceptions\\GenericShareException","Message":"Cannot set expiration date more than 30 days in the future","Code":404,"Trace":[{"file":"/var/www/hostname_8004/htdocs/drive/lib/private/Share20/Manager.php","line":779,"function":"validateExpirationDateLink","class":"OC\\Share20\\Manager","type":"->"},{"file":"/var/www/hostname_8004/htdocs/drive/apps/files_sharing/lib/Controller/ShareAPIController.php","line":715,"function":"createShare","class":"OC\\Share20\\Manager","type":"->"},{"file":"/var/www/hostname_8004/htdocs/drive/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"createShare","class":"OCA\\Files_Sharing\\Controller\\ShareAPIController","type":"->"},{"file":"/var/www/hostname_8004/htdocs/drive/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/hostname_8004/htdocs/drive/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/hostname_8004/htdocs/drive/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/hostname_8004/htdocs/drive/ocs/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/hostname_8004/htdocs/drive/ocs/v2.php","line":23,"args":["/var/www/hostname_8004/htdocs/drive/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/hostname_8004/htdocs/drive/lib/private/Share20/Manager.php","Line":516,"Hint":"Cannot set expiration date more than 30 days in the future","CustomMessage":"--"}}

Where are the logs? Please add them so we can see the specific errors.

Hi @fukumaru,
You are missing the required support template. Please fill this form out and edit into your post.

This will give us the technical info and logs needed to help you! Thanks.

Thanks for the reply.
Failed to retrieve the log.
I will try again at the time the error occurs.
Please wait until tomorrow to correct your submission.

Thank you for all your help.

Collected logs and updated ticket.

Fixed in https://github.com/nextcloud/server/pull/42660
Should be in next point releases.