Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public shared links refreshing continuously since v28 upgrade #42200

Closed
5 of 8 tasks
Tracked by #3888
psy0rz opened this issue Dec 13, 2023 · 37 comments · Fixed by #42853
Closed
5 of 8 tasks
Tracked by #3888

Public shared links refreshing continuously since v28 upgrade #42200

psy0rz opened this issue Dec 13, 2023 · 37 comments · Fixed by #42853

Comments

@psy0rz
Copy link

psy0rz commented Dec 13, 2023

⚠️ This issue respects the following points: ⚠️

Bug description

Demo url: https://cloud.datux.nl/s/qokf5AXDKN2S4E8

It keeps refreshing, nothing to see in the logs and nextcloud.log.

I'm running the official docker images behind a reverse proxy. (nextcloud:fpm-alpine)

Steps to reproduce

  1. Share public link
  2. Try to open it
  3. Browser keeps refreshing.

Expected behavior

should show the shared folder in the browser, without a reload loop.

Installation method

Community Docker image

Nextcloud Server version

28

Operating system

Other

PHP engine version

PHP 8.2

Web server

Nginx

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "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
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.datux.nl"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.0.11",
        "overwrite.cli.url": "https:\/\/cloud.datux.nl",
        "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_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "overwriteprotocol": "https",
        "overwritehost": "cloud.datux.nl",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 2,
        "maintenance": false,
        "theme": "",
        "app_install_overwrite": [
            "epubreader"
        ]
    }
}

List of activated Apps

Enabled:
  - activity: 2.20.0
  - bruteforcesettings: 2.8.0
  - cloud_federation_api: 1.11.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - federatedfilesharing: 1.18.0
  - files: 2.0.0
  - files_external: 1.20.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - notes: 4.9.0
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - related_resources: 1.3.0
  - settings: 1.10.0
  - sharebymail: 1.18.0
  - support: 1.11.0
  - suspicious_login: 6.0.0
  - systemtags: 1.18.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - twofactor_totp: 10.0.0-beta.2
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - workflowengine: 2.10.0
Disabled:
  - admin_audit: 1.18.0
  - circles: 28.0.0-dev (installed 27.0.1)
  - comments: 1.18.0 (installed 1.17.0)
  - contactsinteraction: 1.9.0 (installed 1.8.0)
  - encryption: 2.16.0
  - federation: 1.18.0 (installed 1.17.0)
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - nextcloud_announcements: 1.17.0 (installed 1.16.0)
  - recommendations: 2.0.0 (installed 1.6.0)
  - serverinfo: 1.18.0 (installed 1.17.0)
  - survey_client: 1.16.0 (installed 1.15.0)
  - theming_customcss: 1.15.0 (installed 1.15.0)
  - user_ldap: 1.19.0
  - weather_status: 1.8.0 (installed 1.7.0)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

(empty log, only contained old entries)

Additional info

No response

@psy0rz psy0rz added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Dec 13, 2023
@stemod
Copy link

stemod commented Dec 13, 2023

We got the same problems with multiple instances after upgrade.

@psy0rz
Copy link
Author

psy0rz commented Dec 13, 2023

vote it up, people! :)

@torrentkino
Copy link

It does not seem to affect new shared public links but old ones. At least in our case.

@torrentkino
Copy link

Ah. I figured it out. Sharing files still works. Sharing directories result in this refreshing bug.

@x5355
Copy link

x5355 commented Dec 13, 2023

I can confirm this bug on Debian Bookworm with Apache and PHP 8.1. I also can confirm that it affects directories shared by link or mail. I had to rollback the affected instance.

@peacepenguin
Copy link

Same issue here after v28 upgrade. sharing directories, new and old share links of directories. ubuntu 20.04, php 8.1, apache.

@peacepenguin
Copy link

peacepenguin commented Dec 13, 2023

WORKAROUND FOUND:

Disable this setting under "Administrative Settings" -> "Administration" -> "Sharing"

Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)

@torrentkino
Copy link

WORKAROUND FOUND:

Disable this setting under "Administrative Settings" -> "Administration" -> "Sharing"

Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)

For me, it was the opposite. Enabling this option helped. Hm. Anyway. Thank you!

@dkmonaghan
Copy link

Same issue, however mine was fixed by enabling "Allow users on this server to send shares to other servers".

@vitormfgoncalves
Copy link

Same issue, however mine was fixed by enabling "Allow users on this server to send shares to other servers".

Same here. I dont like to leave this option enabled...

@OliJue
Copy link

OliJue commented Dec 14, 2023

Same issue, however mine was fixed by enabling "Allow users on this server to send shares to other servers".

Same here. Fixed by above mentioned workaround.

@psy0rz
Copy link
Author

psy0rz commented Dec 15, 2023

WORKAROUND FOUND:

Disable this setting under "Administrative Settings" -> "Administration" -> "Sharing"

Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)

can confirm that this works.

@dorianborovina
Copy link

dorianborovina commented Dec 15, 2023

WORKAROUND FOUND:

Disable this setting under "Administrative Settings" -> "Administration" -> "Sharing"

Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)

I can confirm that upgrade from the v27.1.4 (or which one was it) to v28, killed sharing on both NC instances.

Enabling this option has fixed it on my end! 👍

@cmdflow
Copy link

cmdflow commented Dec 15, 2023

I created a new folder and shared it => Browser keeps redirecting not showing anything
Old shares => Browser keeps redirecting, not showing anything

Bug still exists

@cmdflow
Copy link

cmdflow commented Dec 15, 2023

WORKAROUND FOUND:
Disable this setting under "Administrative Settings" -> "Administration" -> "Sharing"
Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)

can confirm that this works.

ENABLING does "solve" the issue and the folder is displayed properly. But without enabling it does not work

@joshtrichards
Copy link
Member

joshtrichards commented Dec 18, 2023

The underlying cause is documented in #42313 thanks to analysis by @AsamK.

Either need to figure out where the duplicate X-Requested-With is being added or modify the check for it to not look for a single value.

The above (in this thread) mentioned toggling is just a workaround that can work in some environments.

@joshtrichards joshtrichards added 1. to develop Accepted and waiting to be taken care of feature: files and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Dec 21, 2023
@joshtrichards
Copy link
Member

Possibly a regression introduced via #39924 or #40951

More reports on the Help Forums too about public shares not working with NC28 like in this issue.

Cc: @nextcloud/files

@ownedge13
Copy link

ownedge13 commented Dec 31, 2023

disabling "Administrative Settings" -> "Administration" -> "Sharing" -> "Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)" doesn't work for me, when i access a shared folder it's stuck in a refresh loop, and if i enable it it doesn't loop, but the folder is empty (there is files in it)

the error.log give that when i access a share with the option enable:
2023/12/31 11:08:08 [error] 385#385: *474 open() "/app/www/public/js/core/merged-template-prepend.js" failed (2: No such file or directory), client: ip.ip.ip.ip, server: _, request: "GET /js/core/merged-template-prepend.js?v=009700fe-0 HTTP/1.1", host: "nextcloud.mydomain.com", referrer: "https://nextcloud.mydomain.com/s/ybbiLa9Dn6kjEbF"

@nfp0
Copy link

nfp0 commented Dec 31, 2023

@ownedge13 Hmm, the empty folder part sounds like it might be a different issue than the one discussed here.

@ownedge13
Copy link

ownedge13 commented Dec 31, 2023

idk, here videos enable and disable : "Administrative Settings" -> "Administration" -> "Sharing" -> "Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)"

https://drive.google.com/drive/folders/1VTQCKMLvORB7GdPtpD-koxeMV-OOL4ua?usp=drive_link

edit : i was having 2 problems, now with the option enable, it work.

@joshtrichards joshtrichards changed the title [Bug]: public shared links keep refreshing since v28 upgrade Public shared links refreshing continuously since v28 upgrade Jan 1, 2024
@Ducknuke
Copy link

Ducknuke commented Jan 8, 2024

Hello everybody,
Since update 28 I have the same problem on my Nextcloud instance (container). Unable to have the side panel (endless refresh).
I notice that nextcloud is looking for files in a folder that does not exist :

[error] 402#402: *197 open() "/app/www/public/js/core/merged-template-prepend.js" failed (2: No such file or directory), client: x.x.x.x, server: domaine.fr, request: "GET /js/core/merged-template-prepend.js?v=9aa19e9a-0 HTTP/1.1", host: "nextcloud.domaine.fr", referrer: "https://nextcloud.domaine.fr/apps/files/"

I noticed that these files were in /data/appdata_ocmx20us7sn3/js/core/.
I also found a "merged-template-prepend.JSON" (not js) in app/www/public/core/js/ so I have a .../core/js/... but not .../js/core/...

So I copied the files from the /data/appdata_ocmx20us7sn3/js/core/ folder to put them in a new folder /app/www/public/js and the shares and the side panel returned...
I don't understand this sudden change of folder path... I hate copying and pasting without really understanding what's happening. Since update in NC28 I have been fighting against all kinds of new problems :(

@wabadoo-wabadee

This comment was marked as off-topic.

@msklywenn

This comment was marked as spam.

@skjnldsv
Copy link
Member

Fix in #42853

@joho1968
Copy link

WORKAROUND FOUND:
Disable this setting under "Administrative Settings" -> "Administration" -> "Sharing"
Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)

We don't have any of that enabled, and we're still seeing the issue(s).

@FerencIstvan
Copy link

We don't have any of that enabled, and we're still seeing the issue(s).

Toggle this option. In my case, all was off, but when I turned this option on, the issue past.
So I leave it enabled, till the fix (thanks for that) will be available.

@b-pfl
Copy link

b-pfl commented Jan 22, 2024

As much as I love Nextcloud and value the hard work that all volunteers (and paid developers) put into NC, I need to admit that I am surprised that such a bug slips through all tests for a final release...

@b-pfl
Copy link

b-pfl commented Jan 22, 2024

Fix in #42853

@skjnldsv so does this mean that the workaround mentioned by
@joho1968 (see below) can be revoked once the next update is out? Can you confirm / inform people in this thread once the fix of #42853 is released?

WORKAROUND FOUND:
Disable this setting under "Administrative Settings" -> "Administration" -> "Sharing"
Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)

We don't have any of that enabled, and we're still seeing the issue(s).

@joshtrichards
Copy link
Member

@b-pfl The fix has already been merged into the stable28 code base by way of #42882 (a backport of #42853). It'll be in the final release of v28.0.2.

Can you confirm / inform people in this thread once the fix of #42853 is released?

That's what release notes are for. :)

It's already released in the latest Release Candidate build and listed in the associated RC release notes:

https://help.nextcloud.com/t/rcs-of-28-0-2-27-1-6-and-26-0-11/179353

So probably won't hear any other follow-up here. :-)

@joshtrichards joshtrichards unpinned this issue Jan 23, 2024
@joshtrichards joshtrichards pinned this issue Jan 23, 2024
@oculos
Copy link

oculos commented Jan 24, 2024

@joshtrichards Please test the side panel - I realized that after updating the patch above, the activity panel shows "Unable to load activity list"

@demlak
Copy link

demlak commented Jan 24, 2024

In here, the patch stopped the refreshing..
but i still cant open imagesfiles on a public shared folder..

@susnux
Copy link
Contributor

susnux commented Jan 24, 2024

I realized that after updating the patch above, the activity panel shows "Unable to load activity list"

Did you just apply the patch or upgrade to RC3? Because there was a bug like this fixed for activity in RC2 / RC3

@oculos
Copy link

oculos commented Jan 24, 2024 via email

@GHBLoos
Copy link

GHBLoos commented Mar 15, 2024

App cfg_share_links does not work anymore on NC28. Is this issue related to the issue that's solved here? In other words, is there a bug in NC28 or is it in the app? I hope someone can dive into that.
jimmyl0l3c/cfg_share_links#182

EDIT: This is fixed.

@Piceeeeeee

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.