nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.31k stars 4.06k forks source link

[Bug]: Files - files are downloaded instead of opened on click #41551

Open gerbrent opened 11 months ago

gerbrent commented 11 months ago

⚠️ 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:

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. browser's file download dialogue appears, ~~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?

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 commented 11 months ago

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 commented 10 months ago

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...

mjmccarn commented 10 months ago

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):

gerbrent commented 10 months ago

Confirming again this behaviour just occurred.

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

skjnldsv commented 10 months ago

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?

gerbrent commented 10 months ago

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

skjnldsv commented 10 months ago

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:

gerbrent commented 2 weeks ago

to reproduce:

in Chrome(ium):