nextcloud / files_lock

GNU Affero General Public License v3.0
25 stars 8 forks source link

[Bug]: Automatic (smart) file locking is not working when odt file is directly open with LibreOffice #156

Closed Jerome-Herbinet closed 1 year ago

Jerome-Herbinet commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

I've tested a lot of file locking (smart/automatic + manual) and I've noticed that when I open a file (ex : odt) directly and locally with LibreOffice, no locking happens.

Before I give some more details and/or logs, @jancborchardt @szaimen @ChristophWurst is it a bug or a feature ?

See also #157 issue (related topic)

Steps to reproduce

  1. Make sure that smart file locking is correctly enabled on the instance
  2. Open with LibreOffice an odt file that has been shared with you
  3. Notice that there is no paddock icon, no file locking at all

Expected behavior

File should be locked on both web UI and OS UI ... just like if you launch local edition from web UI (with "Edit locally" button).

Installation method

Community Manual installation with Archive

Nextcloud Server version

26

Operating system

RHEL/CentOS

PHP engine version

PHP 8.0

Web server

Nginx

Database engine version

MySQL

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

Updated from a MINOR version (ex. 22.1 to 22.2)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

{
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "nc26.test.mydomain.fr"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "26.0.4.2",
    "overwrite.cli.url": "https:\/\/nc26.test.mydomain.fr",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "log_type": "file",
    "logfile": "\/var\/log\/nextcloud\/nc26.test.mydomain.fr\/nextcloud.log",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "password": "***REMOVED SENSITIVE VALUE***",
        "port": 6379,
        "dbindex": 8,
        "timeout": 0
    },
    "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
    "skeletondirectory": "",
    "logtimezone": "Europe\/Paris",
    "updater.release.channel": "stable",
    "mail_smtpmode": "smtp",
    "mail_smtpsecure": "ssl",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauthtype": "PLAIN",
    "default_language": "fr",
    "default_phone_region": "FR",
    "defaultapp": "files",
    "trashbin_retention_obligation": "20,40",
    "versions_retention_obligation": "auto,40",
    "check_for_working_wellknown_setup": false,
    "quota_include_external_storage": false,
    "cron_log": true,
    "has_internet_connection": true,
    "updatechecker": true,
    "appstoreenabled": true,
    "filelocking.enabled": true,
    "session_keepalive": true,
    "knowledgebaseenabled": true,
    "allow_user_to_change_display_name": true,
    "enable_previews": true,
    "enable_avatars": true,
    "auth.bruteforce.protection.enabled": true,
    "loglevel": 1,
    "log_rotate_size": 104857600,
    "mail_smtpauth": 1,
    "mail_smtpport": 465,
    "session_lifetime": 86400,
    "remember_login_cookie_lifetime": 1296000,
    "preview_max_filesize_image": 50,
    "activity_expire_days": 120,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "memcache.distributed": "\\OC\\Memcache\\Redis",
    "app_install_overwrite": [
        "admin_audit",
        "workspace",
        "files_mindmap",
        "twofactor_gateway"
    ],
    "maintenance": false,
    "theme": "",
    "lookup_server": "http:\/\/sandbox2.arawa.fr",
    "gs.enabled": false,
    "appstoreurl": "https:\/\/apps.nextcloud.com\/api\/v1",
    "twofactor_enforced": "false",
    "twofactor_enforced_groups": [],
    "twofactor_enforced_excluded_groups": [],
    "sharing.enable_mail_link_password_expiration": true,
    "sharing.mail_link_password_expiration_interval": 3600
}

List of activated Apps

Enabled:
 - activity: 2.18.0
 - admin_audit: 1.16.0
 - circles: 26.0.0
 - cloud_federation_api: 1.9.0
 - comments: 1.16.0
 - contactsinteraction: 1.7.0
 - dashboard: 7.6.0
 - dav: 1.25.0
 - external: 5.1.0
 - federatedfilesharing: 1.16.0
 - federation: 1.16.0
 - files: 1.21.1
 - files_downloadactivity: 1.16.0
 - files_external: 1.18.0
 - files_lock: 27.0.0
 - files_pdfviewer: 2.7.0
 - files_rightclick: 1.5.0
 - files_sharing: 1.18.0
 - files_trashbin: 1.16.0
 - files_versions: 1.19.1
 - firstrunwizard: 2.15.0
 - groupfolders: 14.0.2
 - impersonate: 1.13.1
 - integration_openstreetmap: 1.0.5
 - integration_peertube: 1.0.0
 - logreader: 2.11.0
 - lookup_server_connector: 1.14.0
 - nextcloud_announcements: 1.15.0
 - notes: 4.8.0
 - notifications: 2.14.0
 - oauth2: 1.14.1
 - onlyoffice: 7.8.0
 - password_policy: 1.16.0
 - photos: 2.2.0
 - picker: 1.0.5
 - privacy: 1.10.0
 - provisioning_api: 1.16.0
 - related_resources: 1.1.0
 - richdocuments: 8.0.2
 - settings: 1.8.0
 - sharebymail: 1.16.0
 - sharerenamer: 3.2.0
 - spreed: 16.0.4
 - support: 1.9.0
 - systemtags: 1.16.0
 - text: 3.7.2
 - text_templates: 1.0.1
 - theming: 2.1.1
 - twofactor_backupcodes: 1.15.0
 - twofactor_gateway: 0.20.0
 - twofactor_nextcloud_notification: 3.7.0
 - twofactor_totp: 8.0.0
 - updatenotification: 1.16.0
 - user_ldap: 1.16.0
 - user_status: 1.6.0
 - viewer: 1.10.0
 - weather_status: 1.6.0
 - workflowengine: 2.8.0
 - workspace: 3.0.3
Disabled:
 - announcementcenter: 6.6.1
 - bruteforcesettings
 - calendar: 4.4.2
 - collectives: 2.5.0
 - contacts: 5.3.1
 - deck: 1.9.2
 - drawio: 2.1.1
 - encryption
 - files_mindmap: 0.0.28
 - forms: 3.3.0
 - guests: 2.5.0
 - integration_collaboard: 1.0.4
 - integration_deepl: 1.1.0
 - integration_giphy: 1.0.6
 - integration_libretranslate: 1.0.0
 - integration_replicate: 1.0.6
 - integration_tmdb: 1.0.2
 - integration_youtube: 0.1.4
 - mail: 3.2.1
 - recommendations: 1.5.0
 - serverinfo: 1.16.0
 - side_menu: 3.8.0
 - socialsharing_diaspora: 2.6.0
 - socialsharing_email: 2.6.0
 - socialsharing_facebook: 2.6.0
 - socialsharing_twitter: 2.6.0
 - survey_client: 1.14.0
 - suspicious_login
 - tables: 0.5.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

Can be provided if necessary

Additional info

Can be provided if necessary

ChristophWurst commented 1 year ago

I am not familiar with file locking and can't help troubleshoot

Jerome-Herbinet commented 1 year ago

@juliushaertl ?

juliusknorr commented 1 year ago

This until now only works if you use the "Edit locally" button in the browser to trigger the desktop client.

Follow up enhancement is https://github.com/nextcloud/desktop/issues/5893 with a PR in https://github.com/nextcloud/desktop/pull/5986

I'll close this here as a duplicate.