Zimbra Drive 0.8.19 and Owncloud 10.0.8 Broken

All about Zimbra Drive
Post Reply
asark
Posts: 2
Joined: Thu Mar 08, 2018 9:59 am

Zimbra Drive 0.8.19 and Owncloud 10.0.8 Broken

Post by asark »

After upgrading from OC10.0.7 to OC10.0.8 the drive tab in Zimbra stopped working. The owncloud log is reporting the below error:

Code: Select all

{"reqId":"tM435mg7Qo0eGpAqrUC0","level":0,"time":"2018-06-05T10:02:21+00:00","remoteAddr":"46.18.107.154","user":"--","app":"zimbradrive","method":"POST","url":"\/index.php\/apps\/zimbradrive\/api\/1.0\/GetAllFolders","message":"97210fe6-9d48-4... call getAllFolders."}
{"reqId":"tM435mg7Qo0eGpAqrUC0","level":2,"time":"2018-06-05T10:02:21+00:00","remoteAddr":"46.18.107.154","user":"--","app":"OC\\User\\SyncService","method":"POST","url":"\/index.php\/apps\/zimbradrive\/api\/1.0\/GetAllFolders","message":"User <97210fe6-9d48-4...> already provided by another backend(OC\\User\\Database !== OCA\\ZimbraDrive\\Auth\\ZimbraUsersBackend), skipping."}
{"reqId":"tM435mg7Qo0eGpAqrUC0","level":3,"time":"2018-06-05T10:02:21+00:00","remoteAddr":"46.18.107.154","user":"--","app":"index","method":"POST","url":"\/index.php\/apps\/zimbradrive\/api\/1.0\/GetAllFolders","message":"Exception: {\"Exception\":\"InvalidArgumentException\",\"Message\":\"Returned account has different backend to the requested backend for sync\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/User\\\/Manager.php(247): OC\\\\User\\\\SyncService->createOrSyncAccount('97210fe6-9d48-4...', Object(OCA\\\\ZimbraDrive\\\\Auth\\\\ZimbraUsersBackend))\\n#1 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/User\\\/Session.php(492): OC\\\\User\\\\Manager->checkPassword(*** sensitive parameters replaced ***)\\n#2 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/public\\\/Events\\\/EventEmitterTrait.php(50): OC\\\\User\\\\Session->OC\\\\User\\\\{closure}(Array)\\n#3 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/User\\\/Session.php(516): OC\\\\User\\\\Session->emittingCall(Object(Closure), Array, 'user', 'login')\\n#4 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/User\\\/Session.php(316): OC\\\\User\\\\Session->loginWithPassword(*** sensitive parameters replaced ***)\\n#5 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/apps\\\/zimbradrive\\\/lib\\\/service\\\/loginservice.php(50): OC\\\\User\\\\Session->login(*** sensitive parameters replaced ***)\\n#6 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/apps\\\/zimbradrive\\\/lib\\\/controller\\\/zimbradriveapicontroller.php(163): OCA\\\\ZimbraDrive\\\\Service\\\\LoginService->login(*** sensitive parameters replaced ***)\\n#7 [internal function]: OCA\\\\ZimbraDrive\\\\Controller\\\\ZimbraDriveApiController->getAllFolders('97210fe6-9d48-4...', '1b57d0f78ec5481...')\\n#8 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(159): call_user_func_array(Array, Array)\\n#9 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(89): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OCA\\\\ZimbraDrive\\\\Controller\\\\ZimbraDriveApiController), 'getAllFolders')\\n#10 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(103): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OCA\\\\ZimbraDrive\\\\Controller\\\\ZimbraDriveApiController), 'getAllFolders')\\n#11 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(46): OC\\\\AppFramework\\\\App::main('ZimbraDriveApiC...', 'getAllFolders', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#12 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#13 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(342): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#14 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/base.php(912): OC\\\\Route\\\\Router->match('\\\/apps\\\/zimbradri...')\\n#15 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/index.php(55): OC::handleRequest()\\n#16 {main}\",\"File\":\"\\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/User\\\/SyncService.php\",\"Line\":348}"}
{"reqId":"5udqn5YUJaZ1Z50gELrF","level":0,"time":"2018-06-05T10:02:22+00:00","remoteAddr":"46.18.107.154","user":"--","app":"zimbradrive","method":"POST","url":"\/index.php\/apps\/zimbradrive\/api\/1.0\/SearchRequest","message":"97210fe6-9d48-4... call searchRequest."}
{"reqId":"5udqn5YUJaZ1Z50gELrF","level":2,"time":"2018-06-05T10:02:22+00:00","remoteAddr":"46.18.107.154","user":"--","app":"OC\\User\\SyncService","method":"POST","url":"\/index.php\/apps\/zimbradrive\/api\/1.0\/SearchRequest","message":"User <97210fe6-9d48-4...> already provided by another backend(OC\\User\\Database !== OCA\\ZimbraDrive\\Auth\\ZimbraUsersBackend), skipping."}
{"reqId":"5udqn5YUJaZ1Z50gELrF","level":3,"time":"2018-06-05T10:02:22+00:00","remoteAddr":"46.18.107.154","user":"--","app":"index","method":"POST","url":"\/index.php\/apps\/zimbradrive\/api\/1.0\/SearchRequest","message":"Exception: {\"Exception\":\"InvalidArgumentException\",\"Message\":\"Returned account has different backend to the requested backend for sync\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/User\\\/Manager.php(247): OC\\\\User\\\\SyncService->createOrSyncAccount('97210fe6-9d48-4...', Object(OCA\\\\ZimbraDrive\\\\Auth\\\\ZimbraUsersBackend))\\n#1 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/User\\\/Session.php(492): OC\\\\User\\\\Manager->checkPassword(*** sensitive parameters replaced ***)\\n#2 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/public\\\/Events\\\/EventEmitterTrait.php(50): OC\\\\User\\\\Session->OC\\\\User\\\\{closure}(Array)\\n#3 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/User\\\/Session.php(516): OC\\\\User\\\\Session->emittingCall(Object(Closure), Array, 'user', 'login')\\n#4 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/User\\\/Session.php(316): OC\\\\User\\\\Session->loginWithPassword(*** sensitive parameters replaced ***)\\n#5 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/apps\\\/zimbradrive\\\/lib\\\/service\\\/loginservice.php(50): OC\\\\User\\\\Session->login(*** sensitive parameters replaced ***)\\n#6 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/apps\\\/zimbradrive\\\/lib\\\/controller\\\/zimbradriveapicontroller.php(93): OCA\\\\ZimbraDrive\\\\Service\\\\LoginService->login(*** sensitive parameters replaced ***)\\n#7 [internal function]: OCA\\\\ZimbraDrive\\\\Controller\\\\ZimbraDriveApiController->searchRequest('97210fe6-9d48-4...', '1b57d0f78ec5481...', 'in:\\\"\\\/\\\"', '[\\\"file\\\"]', 'true')\\n#8 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(159): call_user_func_array(Array, Array)\\n#9 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(89): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OCA\\\\ZimbraDrive\\\\Controller\\\\ZimbraDriveApiController), 'searchRequest')\\n#10 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(103): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OCA\\\\ZimbraDrive\\\\Controller\\\\ZimbraDriveApiController), 'searchRequest')\\n#11 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(46): OC\\\\AppFramework\\\\App::main('ZimbraDriveApiC...', 'searchRequest', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#12 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#13 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(342): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#14 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/base.php(912): OC\\\\Route\\\\Router->match('\\\/apps\\\/zimbradri...')\\n#15 \\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/index.php(55): OC::handleRequest()\\n#16 {main}\",\"File\":\"\\\/usr\\\/share\\\/nginx\\\/html\\\/owncloud\\\/lib\\\/private\\\/User\\\/SyncService.php\",\"Line\":348}"}
Any help is much appreciated!
glauco
Posts: 2
Joined: Tue Jun 26, 2018 3:58 pm

Re: Zimbra Drive 0.8.19 and Owncloud 10.0.8 Broken

Post by glauco »

Hello, as a temporary workaround, in ownCloud db, set the correct backend for zimbra users, like:

Code: Select all

UPDATE `ownc_accounts` SET `backend` = 'OCA\\ZimbraDrive\\Auth\\ZimbraUsersBackend' WHERE `ownc_accounts`.`email` LIKE "%@domain.com"
It worked for us.

Kind regards,
Glauco
User avatar
Rony
Posts: 45
Joined: Fri Jan 27, 2017 3:50 pm
Location: Canada-Montreal
ZCS/ZD Version: Zimbra 9.0.0_GA_4174
Contact:

Re: Zimbra Drive 0.8.19 and Owncloud 10.0.8 Broken

Post by Rony »

HI Glauco,

Your solution is great and resolved this kind of issue, but when a new user tries to access his Drive tab, he cannot and we have to update his Backend record to solve it.
So how can we set this up once for all for all new users without having to alter the own cloud table.
Is it something that will need to be changed on the Zimbra side settings?
Thank you
daniele.antolini
Posts: 36
Joined: Fri Jul 08, 2016 7:41 am

Re: Zimbra Drive 0.8.19 and Owncloud 10.0.8 Broken

Post by daniele.antolini »

glauco wrote:Hello, as a temporary workaround, in ownCloud db, set the correct backend for zimbra users, like:

Code: Select all

UPDATE `ownc_accounts` SET `backend` = 'OCA\\ZimbraDrive\\Auth\\ZimbraUsersBackend' WHERE `ownc_accounts`.`email` LIKE "%@domain.com"
It worked for us.

Kind regards,
Glauco
It works for me, too.

I think when automatically user is created by zimbra drive plugin to owncloud, the backend MUST be set to the correct one "OCA\ZimbraDrive\Auth\ZimbraUsersBackend" and not to the default one "OC\User\Database".

Infact in owncloud.log error is:

"User <xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx> already provided by another backend(OC\\User\\Database !== OCA\\ZimbraDrive\\Auth\\ZimbraUsersBackend), skipping."

I think the issue is from zimbra drive plugin on OwnCloud side.
glauco
Posts: 2
Joined: Tue Jun 26, 2018 3:58 pm

Re: Zimbra Drive 0.8.19 and Owncloud 10.0.8 Broken

Post by glauco »

Rony wrote:HI Glauco,

Your solution is great and resolved this kind of issue, but when a new user tries to access his Drive tab, he cannot and we have to update his Backend record to solve it.
So how can we set this up once for all for all new users without having to alter the own cloud table.
Is it something that will need to be changed on the Zimbra side settings?
Thank you
Hi Rony, sorry for very late reply.
Unfortunately, even if you can retrieve account_id and mail from zimbra mysql like this:

Code: Select all

 use zimbra; select account_id,comment from mailbox;
you can't populate easily ownc_users and ownc_account by yourself.

I've managed to execute the query on the owncloud server every 10 mins for 2 weeks, after the launch of the "drive" tab to my colleagues, just to be sure that everyone interested could use the account.

Glauco
User avatar
Rony
Posts: 45
Joined: Fri Jan 27, 2017 3:50 pm
Location: Canada-Montreal
ZCS/ZD Version: Zimbra 9.0.0_GA_4174
Contact:

Re: Zimbra Drive 0.8.19 and Owncloud 10.0.8 Broken

Post by Rony »

HI Glauco,

It's been a while I did not login here.
The issue has been resolved after applying the Zimbra Drive Zimlet update, all is working fine now, thank you very much
azioazio27
Posts: 1
Joined: Fri Feb 28, 2020 6:42 pm

Re: Zimbra Drive 0.8.19 and Owncloud 10.0.8 Broken

Post by azioazio27 »

I think when automatically user is created by zimbra drive plugin to owncloud, the backend MUST be set to the correct one "OCA\ZimbraDrive\Auth\ZimbraUsersBackend" and not to the default one "OC\User\Database".


Kodi Lucky Patcher nox
Post Reply