server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: Files - files are downloaded instead of opened on click, folders show as empty

Open gerbrent opened this issue 1 year ago • 7 comments

⚠️ This issue respects the following points: ⚠️

Bug description

In certain circumstances (see below), selecting a file with the intention of opening/editing does not open the file in an editor, but instead downloads the file locally via browser dialogue. Selecting a folder will browse to it but show as empty.

Circumstances

Not 100% on how to reproduce, so speculating:

  • This seems to occur after the browser window has been open for extended periods of time, i.e. open in the background for many hours, or after a suspend of the laptop/computer.
  • heartbeats seem to be succeeding, despite the behaviour
  • it does, indeed, download the correct document, but sometimes takes long to begin the download (30s+)
  • occurs with .md, .ods
  • if you are having this behaviour w files, if you click to open a folder then it browses to the folder, but it is show as empty, even if this is incorrect (i.e. clearly this folder has contents):
    • "empty" folder image
    • error while opening the folder: 401 Unauthorized Screenshot_20231116_100110 - empty folder 2

problem occuring in both Firefox 119.0 and Chromium 118.0.5993.117 linux/openSUSE Tumbleweed

Steps to reproduce

  1. leave Files session open for extended period of time (speculation..)
  2. click on a file or folder
  3. file will download, folder will open but show as empty

Expected behavior

click on a file opens the file in the appropriate editor (.md or .ods..) click on a folder opens the folder for browsing and shows the actual contents

Installation method

None

Nextcloud Server version

28

Operating system

Other

PHP engine version

None

Web server

None

Database engine version

None

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

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

cloud.nextcloud.com 28.0.0 beta 3

I have additional helpful browser logs, but would appreciate some eyes on it to censor sensitive info before posting publicly. Please ping me.

gerbrent avatar Nov 16 '23 17:11 gerbrent

hmm, unfortunately confirming that this behaviour occurs on a freshly opened browser session with a freshly loaded page aswell. So... my speculations on potential cause are somewhat dismissed.

gerbrent avatar Nov 20 '23 07:11 gerbrent

This issue occurred again on 2023-12-12 (Firefox)

The method thought to be able to reproduce it is not reliable. Will continue searching for a reliable method to reproduce...

gerbrent avatar Dec 14 '23 09:12 gerbrent

I saw similar behavior after updating from 27.1.4 to 28.0.0.

I did all of these things, and don't know which solved the problem (but I don't see it any more):

  • sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices
  • sudo apt-get install php8.2-bz2
  • sudo -u www-data php /var/www/nextcloud/occ maintenance:repair
  • sudo -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess
  • sudo systemctl restart apache2 php8.2-fpm redis
  • Clear my browser cache

mjmccarn avatar Dec 18 '23 16:12 mjmccarn

Confirming again this behaviour just occurred.

Is there anything I can capture that would be helpful in diagnosing or investigating this behaviour? Any ideas?

gerbrent avatar Dec 27 '23 17:12 gerbrent

Is there anything I can capture that would be helpful in diagnosing or investigating this behaviour? Any ideas?

Maybe do a screencast with the browser console opened?

skjnldsv avatar Dec 28 '23 07:12 skjnldsv

Behaviour screencast and console log provided internally to engineering - reason: potentially sensitive. Will update here when more is discovered.

gerbrent avatar Jan 04 '24 04:01 gerbrent

I have successfully found the download issue! I will work on a fix, it's a bit more complicated that I thought!

For the folder shows as empty part, it seems different, I still can't reproduce the issue :shrug:

skjnldsv avatar Jan 04 '24 13:01 skjnldsv