client icon indicating copy to clipboard operation
client copied to clipboard

owncloudcmd fails with `not existant or bad metadata "owncloudsync_vfs_off"` error

Open saw-jan opened this issue 3 years ago • 3 comments

Pre-submission Checks

  • [X] I checked for similar issues, but could not find any. I also checked the closed issues. I could not contribute additional information to any existing issue.
  • [X] I will take the time to fill in all the required fields. I know that the bug report may be dismissed otherwise due to lack of information.

Describe the QA issue

While running owncloudcmd to sync files, the command fails with following error:

[ critical plugins ]:	Could not load plugin: not existant or bad metadata "owncloudsync_vfs_off"

Steps to reproduce the issue

  1. Install owncloud-client from https://download.owncloud.com/desktop/ownCloud/daily/3.0/linux/Ubuntu_20.04/
  2. Run the command:
/usr/bin/owncloudcmd --trust /home/demo/owncloud/ http://admin:admin@localhost/core

Maybe some libraries are missing out in https://download.owncloud.com/desktop/ownCloud/daily/3.0/linux/Ubuntu_20.04/

Information

OS: Ubuntu 20.04 Client: 3.0

NOTE: same for Ubuntu_22.04

Expected behavior

To complete sync

Actual behavior

Fails with error

saw-jan avatar Oct 13 '22 12:10 saw-jan

The file has been included within the latest daily builds, I checked the packages. My assumption is they just can't be loaded correctly.

I couldn't reproduce the issue with ownCloud's demo instances. I just found the client crashes during synchronization on Ubuntu 22.04, but this is not related to vfs_off missing, it looks like it's related to the database. The regular client works fine, even suffix VFS is working as expected.

fmoc avatar Oct 13 '22 19:10 fmoc

I also tried on my Ubuntu22.04 machine where desktop-client wasn't installed previously. Got the Could not load plugin error Which package is responsible for vfs?

saw-jan avatar Oct 14 '22 03:10 saw-jan

The owncloud-client package contains all the VFS plugins.

> dpkg -x owncloud-client_3.0.0\~daily20221013+oc-8771_amd64.deb out
> tree out/
out
[...]
├── opt
│   └── ownCloud
│       └── ownCloud
│           ├── bin
│           │   ├── owncloud
│           │   └── owncloudcmd
│           └── lib
│               └── x86_64-linux-gnu
│                   ├── libowncloud_csync.so.0 -> libowncloud_csync.so.3.0.0
│                   ├── libowncloud_csync.so.3.0.0
│                   ├── libowncloudResources.so.0 -> libowncloudResources.so.3.0.0
│                   ├── libowncloudResources.so.3.0.0
│                   ├── libowncloudsync.so.0 -> libowncloudsync.so.3.0.0
│                   ├── libowncloudsync.so.3.0.0
│                   └── plugins
│                       ├── owncloudsync_vfs_off.so
│                       └── owncloudsync_vfs_suffix.so
[...]

fmoc avatar Oct 14 '22 09:10 fmoc

oh, everything is there then. What might be the cause of this error? I get this error every time I run owncloudcmd on a docker container (owncloud/smashbox).

saw-jan avatar Oct 17 '22 05:10 saw-jan

Command: /usr/bin/owncloudcmd --trust /home/demo/owncloud/ http://admin:admin@localhost/core

Here are the logs: Log:

root@sawjan-OptiPlex-3070:/home/demo/owncloud# /usr/bin/owncloudcmd --trust /home/demo/owncloud/ http://admin:admin@localhost/core
10-17 07:15:21:924 [ info sync.checkserverjob ]:	status.php returns:  QJsonDocument({"edition":"Community","installed":true,"maintenance":false,"needsDbUpgrade":false,"product":"ownCloud","productname":"ownCloud","version":"10.11.0.6","versionstring":"10.11.0"})   QNetworkReply::NoError  Reply:  QNetworkReplyHttpImpl(0x555db3a81970)
10-17 07:15:21:924 [ info sync.networkjob ]:	Created OCC::JsonApiJob(OCC::Account("admin@localhost"), "http://localhost/core/ocs/v1.php/cloud/capabilities?format=json", "GET", Original-Request-ID: "eb4b5791-2d07-4ede-9960-ef9c91de93ba", X-Request-ID: "eb4b5791-2d07-4ede-9960-ef9c91de93ba") for QObject(0x0)
10-17 07:15:22:017 [ info sync.networkjob.jsonapi ]:	JsonJob of QUrl("http://localhost/core/ocs/v1.php/cloud/capabilities?format=json") FINISHED WITH STATUS "OK"
10-17 07:15:22:017 [ debug default ]	[ main(int, char**)::<lambda()>::<lambda ]:	Server capabilities QJsonObject({"checksums":{"preferredUploadType":"SHA1","supportedTypes":["SHA1"]},"core":{"pollinterval":30000,"status":{"edition":"Community","hostname":"sawjan-OptiPlex-3070","installed":true,"maintenance":false,"needsDbUpgrade":false,"product":"ownCloud","productname":"ownCloud","version":"10.11.0.6","versionstring":"10.11.0"},"support-url-signing":true,"webdav-root":"remote.php/webdav"},"dav":{"chunking":"1.0","propfind":{"depth_infinity":false},"reports":["search-files"],"trashbin":"1.0"},"files":{"bigfilechunking":true,"blacklisted_files":[".htaccess"],"blacklisted_files_regex":"\\.(part|filepart)$","favorites":true,"file_locking_enable_file_action":false,"file_locking_support":true,"privateLinks":true,"privateLinksDetailsParam":true,"undelete":true,"versioning":true},"files_sharing":{"api_enabled":true,"auto_accept_share":true,"can_share":true,"default_permissions":31,"federation":{"incoming":true,"outgoing":true},"group":{"expire_date":{"enabled":false}},"group_sharing":true,"providers_capabilities":{"ocFederatedSharing":{"remote":["shareExpiration"]},"ocinternal":{"group":["shareExpiration"],"link":["shareExpiration","passwordProtected"],"user":["shareExpiration"]}},"public":{"can_create_public_link":true,"defaultPublicLinkShareName":"Public link","enabled":true,"expire_date":{"enabled":false},"multiple":true,"password":{"enforced":false,"enforced_for":{"read_only":false,"read_write":false,"read_write_delete":false,"upload_only":false}},"roles_api":true,"send_mail":false,"social_share":true,"supports_upload_only":true,"upload":true},"remote":{"expire_date":{"enabled":false}},"resharing":true,"search_min_length":2,"share_with_group_members_only":false,"share_with_membership_groups_only":false,"user":{"expire_date":{"enabled":false},"profile_picture":true,"send_mail":false},"user_enumeration":{"enabled":true,"group_members_only":false}},"notifications":{"ocs-endpoints":["list","get","delete"]}})
10-17 07:15:22:017 [ info sync.networkjob ]:	Created OCC::JsonApiJob(OCC::Account("admin@localhost"), "http://localhost/core/ocs/v1.php/cloud/user?format=json", "GET", Original-Request-ID: "775cbe93-8844-4507-bb15-2205bd57c5cb", X-Request-ID: "775cbe93-8844-4507-bb15-2205bd57c5cb") for QObject(0x0)
10-17 07:15:22:101 [ info sync.networkjob.jsonapi ]:	JsonJob of QUrl("http://localhost/core/ocs/v1.php/cloud/user?format=json") FINISHED WITH STATUS "OK"
10-17 07:15:22:102 [ critical plugins ]:	Could not load plugin: not existant or bad metadata "owncloudsync_vfs_off"
10-17 07:15:22:104 [ info sync.engine ]:	There are "128 GB" available at "/home/demo/owncloud/"
10-17 07:15:22:104 [ info sync.engine ]:	New sync (no sync journal exists)
10-17 07:15:22:104 [ info sync.engine ]:	Using Qt  5.15.2  SSL library  "OpenSSL 1.1.1f  31 Mar 2020"  on  "Ubuntu 20.04.5 LTS"
10-17 07:15:22:107 [ info sync.database ]:	sqlite3 version "3.31.1"
10-17 07:15:22:107 [ info sync.database ]:	sqlite3 locking_mode= "exclusive"
10-17 07:15:22:107 [ info sync.database ]:	sqlite3 journal_mode= "wal"
10-17 07:15:22:108 [ info sync.database ]:	sqlite3 synchronous= "NORMAL"
10-17 07:15:22:111 [ info sync.database ]:	Forcing remote re-discovery by deleting folder Etags

Coredump:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/owncloudcmd --trust /home/demo/owncloud/ http://admin:admin@localhost/'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fa02a9b6e38 in OCC::SyncEngine::startSync() () from /opt/ownCloud/ownCloud/lib/x86_64-linux-gnu/libowncloudsync.so.0
[Current thread is 1 (Thread 0x7fa026319840 (LWP 1305))]
#0  0x00007fa02a9b6e38 in OCC::SyncEngine::startSync() () from /opt/ownCloud/ownCloud/lib/x86_64-linux-gnu/libowncloudsync.so.0
#1  0x0000555db395bcb7 in ?? ()
#2  0x00007fa02a3e5a4e in ?? () from /opt/ownCloud/qt-5.15.2/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007fa02a918ad1 in OCC::AbstractNetworkJob::finishedSignal(OCC::AbstractNetworkJob::QPrivateSignal) () from /opt/ownCloud/ownCloud/lib/x86_64-linux-gnu/libowncloudsync.so.0
#4  0x00007fa02a969a87 in OCC::AbstractNetworkJob::slotFinished() () from /opt/ownCloud/ownCloud/lib/x86_64-linux-gnu/libowncloudsync.so.0
#5  0x00007fa02a3e5a4e in ?? () from /opt/ownCloud/qt-5.15.2/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fa02a761cc6 in ?? () from /opt/ownCloud/qt-5.15.2/lib/x86_64-linux-gnu/libQt5Network.so.5
#7  0x00007fa02a80996e in ?? () from /opt/ownCloud/qt-5.15.2/lib/x86_64-linux-gnu/libQt5Network.so.5
#8  0x00007fa02a3dc5c9 in QObject::event(QEvent*) () from /opt/ownCloud/qt-5.15.2/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007fa02a3ae9ff in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /opt/ownCloud/qt-5.15.2/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007fa02a3b1331 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /opt/ownCloud/qt-5.15.2/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007fa02a409cd7 in ?? () from /opt/ownCloud/qt-5.15.2/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007fa02857117d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007fa028571400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007fa0285714a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007fa02a409332 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/ownCloud/qt-5.15.2/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007fa02a3ad53b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/ownCloud/qt-5.15.2/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007fa02a3b56e4 in QCoreApplication::exec() () from /opt/ownCloud/qt-5.15.2/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x0000555db3956ba9 in ?? ()
#19 0x00007fa029d36083 in __libc_start_main (main=0x555db3955d60, argc=4, argv=0x7ffc22fa83f8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc22fa83e8) at ../csu/libc-start.c:308
#20 0x0000555db395753e in ?? ()

saw-jan avatar Oct 17 '22 07:10 saw-jan

The issue is here:

https://github.com/owncloud/client/blob/029b1cc071439bc0e05064cfd1330f243fb29e50/src/gui/application.cpp#L235-L243

@fmoc can you move all the code to the new platform class and use the platform class in the cmd client if possible?

TheOneRing avatar Oct 18 '22 12:10 TheOneRing

@TheOneRing some of that code is shared between CLI and GUI. Should we integrate the platform class in the CLI, too?

fmoc avatar Oct 18 '22 15:10 fmoc

yes

TheOneRing avatar Oct 18 '22 15:10 TheOneRing

For OC_PLUGIN_DIR you need the qapplication so maybe add a function platform->setApplication()?

TheOneRing avatar Oct 18 '22 15:10 TheOneRing

Closed by #10203.

fmoc avatar Nov 15 '22 14:11 fmoc