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

[Bug]: Remote shares are not listed in share views #44318

Closed
4 of 8 tasks
danxuliu opened this issue Mar 19, 2024 · 3 comments · Fixed by #45698
Closed
4 of 8 tasks

[Bug]: Remote shares are not listed in share views #44318

danxuliu opened this issue Mar 19, 2024 · 3 comments · Fixed by #45698

Comments

@danxuliu
Copy link
Member

danxuliu commented Mar 19, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

ocsEntryToNode expects that the OCS entry contains a mimetype field and a file_source field. However, remote shares may not provide them. Due to that, the remote shares are not shown in the Share views.

Short version:

  • If the remote share is pending there is no mimetype nor file_source
  • If the remote share is accepted there is mimetype but no file_source; file_source is instead returned as file_id

Longer version:
Remote shares have several base fields which are then extended from the information of the file based on its mountpoint.

However, when pending remote shares are got they are not extended with those extra fields (as they may be still using a temporary mountpoint), so the mimetype is not available.

Once accepted a real mountpoint is set for remote shares, so the mimetype and the fileid become available. However, the fileid is returned as file_id instead of file_source.

@skjnldsv FYI

Steps to reproduce

Steps to reproduce (scenario 1)

  • Setup Nextcloud server A
  • Setup Nextcloud server B
  • Enable notifications app in server B
  • In server A, share a file with user X of server B
  • In server B, log in as user X
  • Open the Files app
  • Open the "Pending shares" view

Expected result

The pending remote share is shown

Actual result

The pending remote share is not shown; browser console shows Error while parsing OCS entry with error Missing or invalid mandatory mime

Steps to reproduce (scenario 2)

  • Setup Nextcloud server A
  • Setup Nextcloud server B
  • Enable notifications app in server B
  • In server A, share a file with user X of server B
  • In server B, log in as user X
  • Accept the remote share in the notification
  • Open the Files app
  • Open the "Shared with me" view

Expected result

The accepted remote share is shown

Actual result

The accepted remote share is not shown; browser console shows Trying to update/set a node without fileid

Expected behavior

See above

Installation method

None

Nextcloud Server version

master

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?

  • 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

No response

@danxuliu danxuliu added bug feature: sharing 0. Needs triage Pending check for reproducibility or if it fits our roadmap feature: files 28-feedback labels Mar 19, 2024
@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Mar 19, 2024
@nfebe nfebe self-assigned this May 28, 2024
@ShGKme
Copy link
Contributor

ShGKme commented May 31, 2024

27 28+
image image

@skjnldsv
Copy link
Member

@ShGKme any console errors?

@nfebe
Copy link
Contributor

nfebe commented May 31, 2024

[ERROR] files_sharing: Error while parsing OCS entry 
Object { app: "files_sharing", uid: "jane", level: 0, error: Error }
​
app: "files_sharing"
​
error: Error: Missing or invalid mandatory mime
​
level: 0
​
uid: "jane"<prototype>: Object {  }
[ConsoleLogger.js:74:18](webpack:///nextcloud/node_modules/@nextcloud/logger/dist/ConsoleLogger.js)
    value ConsoleLogger.js:74
    value ConsoleLogger.js:100
    et SharingService.ts:45
    it SharingService.ts:127
    getContents shares.ts:108
    fetchContent FilesList.vue:316
    mounted FilesList.vue:288
    VueJS 11
    15021 main.ts:33
    Webpack 5

@skjnldsv skjnldsv added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of labels Jun 1, 2024
@skjnldsv skjnldsv assigned skjnldsv and unassigned nfebe Jun 6, 2024
@skjnldsv skjnldsv added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jun 7, 2024
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.

4 participants