⚠️ This issue respects the following points: ⚠️
Bug description
The file picker does not load for moving or copying a file or a folder when not logged in.

Steps to reproduce
- While being logged in, share link of any folder
- Click on
at the right of the folder name,
- "Open details", "Sharing" tab, "+" at the right of "Share link"
- Set the sharling link as "can edit" (Screenshot below)
- after the preceding steps, click on "View only", then click on "Can edit" in the drop-down list.
- Go into the folder and create a new file (any type) or folder.
- Log-out of Nextcloud or open a Private window of your web browser.
- Paste the sharing link of your newly shared folder.
- Click on
at the right of the previously created file.
- Click on "Move or copy".

Expected behavior
The file picker should load and display the current directory.
Installation method
None
Nextcloud Server version
28
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
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
The browser console output
Error: No user id found
M index.mjs:871
l FilePicker-DBGB1Rec.mjs:797
f FilePicker-DBGB1Rec.mjs:825
async* FilePicker-DBGB1Rec.mjs:829
VueJS 25
render index.mjs:33
VueJS 8
s index.mjs:30
pick index.mjs:88
pick index.mjs:87
filepicker dialogs.js:360
actionHandler fileactions.js:701
action fileactions.js:136
_onClickAction fileactionsmenu.js:63
jQuery 10
Backbone 6
_showMenu fileactions.js:375
Underscore 3
_renderInlineAction fileactions.js:467
jQuery 5
vue.runtime.esm.js:3065:16
VueJS 29
render index.mjs:33
VueJS 8
s index.mjs:30
pick index.mjs:88
pick index.mjs:87
filepicker dialogs.js:360
actionHandler fileactions.js:701
action fileactions.js:136
_onClickAction fileactionsmenu.js:63
jQuery 10
Backbone 6
_showMenu fileactions.js:375
Underscore 3
_renderInlineAction fileactions.js:467
jQuery 5
This is the error thrown:
|
throw new Error('No user id found') |
I think it is where it is called from:
|
const otherNodes = await getContents(destination.path) |
The call of getContents seems to be the culprit there. And it is not systematic in this file.
- When
method === MoveCopyAction.COPY, it's using client.getDirectoryContents.
- Otherwise (e.g.,
MoveCopyAction.MOVE_OR_COPY) , getContents (which looks for the user id) is used.
Moreover, it seems the comments are not consistent with the code.
Example:
https://github.com/nextcloud/server/blob/5a6e48e85034aa81862b1fcbd93cb4ce58165e72/apps/files/src/actions/moveOrCopyAction.ts#L144C1-L146C52
// show conflict file popup if we do not allow overwriting
const otherNodes = await getContents(destination.path)
if (hasConflict([node], otherNodes.contents)) {
It seems nothing is testing of we allow or not overwriting since 9d613d0.
@emoral435, do you have an insight on this?
Bug description
The file picker does not load for moving or copying a file or a folder when not logged in.
Steps to reproduce
Expected behavior
The file picker should load and display the current directory.
Installation method
None
Nextcloud Server version
28
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
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
The browser console output
This is the error thrown:
server/apps/files/src/services/Files.ts
Line 45 in 5a6e48e
I think it is where it is called from:
server/apps/files/src/actions/moveOrCopyAction.ts
Line 145 in 5a6e48e
The call of
getContentsseems to be the culprit there. And it is not systematic in this file.method === MoveCopyAction.COPY, it's usingclient.getDirectoryContents.MoveCopyAction.MOVE_OR_COPY) ,getContents(which looks for the user id) is used.Moreover, it seems the comments are not consistent with the code.
Example:
https://github.com/nextcloud/server/blob/5a6e48e85034aa81862b1fcbd93cb4ce58165e72/apps/files/src/actions/moveOrCopyAction.ts#L144C1-L146C52
It seems nothing is testing of we allow or not overwriting since 9d613d0.
@emoral435, do you have an insight on this?