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

Mount configuration incomplete #4

Closed
ghost opened this issue Jul 19, 2019 · 44 comments
Closed

Mount configuration incomplete #4

ghost opened this issue Jul 19, 2019 · 44 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ghost
Copy link

ghost commented Jul 19, 2019

Hi all,

thanks for your awesome Nextcloud plugin. I managed to get the Azure application up and running (I hope). As the guy from the other issue, the URL doesn't work:

https://myurl.de/index.php/settings/admin/externalstorages

as I got redirected to a nonexistent endpoint.

However, using the URL my browser shows where I add the storages, i.e.

https://myurl.de/settings/admin/externalstorages

works.

Though, authenication seemed to work (it's with green background, I still got a red box stating the error "mount configuration incomplete".

What do I do wrong in Azure?

I am using the 1.0.2 version of your plugin and the latest Nextcloud build (16.0.3). I have full root access to the server.

image

Thanks for your help!

@Maverick1983
Copy link

Me too

@hevelius
Copy link
Owner

hevelius commented Jul 19, 2019

Ok there is an issue to mount external storage via Admin (Administration section). I worked to resolve as soon as possible. No problem with normal user instead.

Could you try to enable OneDrive for all users and try to attach new externalstorage as normal user?

Thanks a lot for your help guys

Try to set also https://myurl.de/index.php/settings/user/externalstorages in Azure.

@Maverick1983
Copy link

I use normal user, but I have same error

@ghost
Copy link
Author

ghost commented Jul 19, 2019

I have to test it first, but if @Maverick1983 has the issue with non-privilleged user, too, I guess I will run into the same error.

@hevelius
Copy link
Owner

Is there anything interesting in nc logs?

@hevelius hevelius added the bug Something isn't working label Jul 19, 2019
@Maverick1983
Copy link

No log, but i write response from link
https://myhost/index.php/apps/files_external/userstorages/3?testOnly=true
{ "id":3, "mountPoint":"\/OneDriveLucaOutlook", "backend":"files_external_onedrive", "authMechanism":"oauth2::oauth2", "backendOptions":{ "configured":"true", "client_id":"365c2fc5-0038-4725-ad61-3d8bdfe50852", "client_secret":"mysecret", "token":"{\"token_type\":\"Bearer\",\"scope\":\"Files.Read Files.Read.All Files.ReadWrite Files.ReadWrite.All User.Read\",\"ext_expires_in\":3600,\"access_token\":\"EwB4A8l6BAAURSN\\\/FHlDW5xN74t6GzbtsBBeBUYAAYKXm\\\/Ub2tsO8jRWmDgNRBrVTG+myFAJycsFyIu95ljdR7G7YhaBhLCyMb1Z\\\/PI7ODzX8Izl397mV6MFW9iKTf3QBW6ZbSEmRy\\\/Yt2bn8yVZ2N+40CMDEvpy1bPIqKnJl+CwzIyIeySWTwOvlhMjxx58jB4WyE8uIch0MfThs\\\/1k2BuVrjvnR50Sq3L5lgwdcQk8FpPmW1SCCTrk44bjtucAA0NlKjEWTw0t\\\/psJXRuONEptGUDYmXZWjN6fVXIHs2kQ2wNV+ceS0f0\\\/Gh8wryrbwyvL0Oo7Sq+\\\/OdBN7n8XVaiCUgEZXI\\\/y2a9htrhyUjJZGNYBQoYMYa8mvBc5PAkDZgAACHZcK1GtrvfISAIjH54QIqew\\\/YjJUPcVLuSX6KLKvm2jjVy5Io8Fj+Mxd0D9cegN9ntZznNlG08\\\/Yin8IaFxM\\\/LNP4XIBXZF2FOLfl\\\/jymj+8hPQk5SNcYJ4eYRyDhTVnBZrNoZwg4DFaaqOnbk\\\/NqEBOiv2HCWEieh5dXWYsV81zLhQMSnynMVPYcJ0z+ICyOu8DydMOeqovYbhspLbJ2IsMcyafJN5V4fftoUCyInJAnyl\\\/IEE9nHLxX11uNfhgNGSUd\\\/BIVqDD\\\/WsPA\\\/q3SZzHV\\\/J9do0cxd1ReEL5lFCejPXsSse3IzmioI094wfOaRPqZ3qIIPOiNk2OkEbGyrPP140ox3pBZ\\\/1IPVt2pPcVsYA8zlfaEk6AZX5YiIafegqMYT+I2NX1gwASLixBLVCgwGo5\\\/Kf6ic1\\\/Z5Triu7PgRMazsd5LzSkUTpysWUo8+3H5blT6zSginaZ1xuoLE2oB5z3bGt5t16RJ3tHmscWn1Iwp0GwVM2xeVWeW5wt5XEZOYXMyoB5W8V4kDFZBCGBCHGTunI7FIBGPXJV9zOl0vM\\\/nA1rWZyTnbjlutj0xwY0S\\\/vx688v5QKM\\\/47Ly4Y3WzbQXQdnOmuvCyux5u7\\\/EUcsmrKcdEBszhTuk7KnqwinlNEGg8VAHkGTqPqcGG6Shk3zMHNFmoXNjMJg9dud\\\/l9feeBoG1f0W7+hXkso1wtX6H9zVAHtgZgiJPrlUD+E\\\/oDJ\\\/7s2zSi2iSPEiMwykHZXsCdfaKTBARL6CnRXUbcdru0seGA\\\/08SJsbJGM0XloEC\",\"refresh_token\":\"MCddB46zQcIX33xZa1Uxoc!F8PfolB8XAQIAgvzYHHDQeGi7jKts1BtJ3cKgOf6lBXBQ!V3YqudMVulqH2ve48aY4YTGEqaasIE0lap5FwwDA1GvIYhkcarQHn4VKdEO1faSrv9QFaeLUXvVvIjihPGEok4IONPmrNKmoTOWwz1yOpzfquDBmWhx54ccila3vEP*Is9j03T5afoY9lkzc2tkIdqPiE3Y0N5c5TmbfMby7EFNaBEIbxa6aCOMXQhH!yoA5PrGBpKhMovFBIz8vn6L!QQWlJyO2CbdFE0nrfXFkhCAinUAgBsBoGKlh1jxBMI4g*rcTVv6BCBR2cw3u0DGzbDLaO!BqWRJwv75y*uXjvtLMoLGbSSSqOIyEruU8XFwv9oTevNxPXX6m4Dm8RTduH7cmVVtAwbVXmqe7t0oPSowtmSbb3hVmjIe6ZjhqarYw7twnASlCS4H!t9*95fE$\",\"expires\":1563542582}" }, "priority":100, "applicableUsers":[ "Luca" ], "mountOptions":{ "encrypt":true, "previews":true, "enable_sharing":false, "filesystem_check_changes":1, "encoding_compatibility":false, "readonly":false }, "status":3, "statusMessage":"Mount configuration incomplete", "userProvided":false, "type":"personal" }

@ghost
Copy link
Author

ghost commented Jul 21, 2019

Hi,

user mode doesn't work either.

@Maverick1983 : how do I generate your URL? I tried different IDs but I couldn't generate the return.

@hevelius : any news on your fix?

Thanks!

@hevelius
Copy link
Owner

Hi,

@TheRiddler1982: it's correct. user mode doesn't work also for me. It doesn't work only for latest version of NC.

Maybe related to this issue nextcloud/server#15567
or this
nextcloud/server#15238

I have not investigated more deepest but the mainly reason is on escaping token string in files_external config item.

In the meantime to find a more elegant way to fix this issue I suggest you this hack in

apps/files_external/lib/config.php line 242

public static function getBackendStatus($class, $options, $isPersonal, $testOnly = true) {
		if (self::$skipTest) {
			return StorageNotAvailableException::STATUS_SUCCESS;
		}
		foreach ($options as $key => &$option) {
			if($key === 'password') {
				// no replacements in passwords
				continue;
			}
                        // ----Add this if statemenent----- //
                        if($key === 'token') { 
                               continue;                         
                        }
                        // --------------------------------//
			$option = self::substitutePlaceholdersInConfig($option);
			if(!self::arePlaceholdersSubstituted($option)) {
				\OC::$server->getLogger()->error(
					'A placeholder

Or try the latest NC 15 version.

I hope release a new version as soon as possibile.

@Maverick1983
Copy link

Maverick1983 commented Jul 22, 2019

Hi,

user mode doesn't work either.

@Maverick1983 : how do I generate your URL? I tried different IDs but I couldn't generate the return.

@hevelius : any news on your fix?

Thanks!

@TheRiddler1982: In Azure with this option files_external_onedrive/issues#3

@ghost
Copy link
Author

ghost commented Jul 22, 2019

@hevelius

I just used your code fix.

I now do get a green checkbox.

However, the integration does not work. The Onedrive folder is now visible in Nextcloud but with no content (but there is :-)). When I try to add a folder (e.g. test) there is a error:

image

Is there more to change in the code or settings?

@hevelius
Copy link
Owner

@TheRiddler1982 congratulation Mr. Green :) ...
Is there something interesting in the Logging section?

Have you set all required Authorization API in Azure?

@ghost
Copy link
Author

ghost commented Jul 22, 2019

@hevelius : sorry for the stupid questions (I am using Nextcloud as Docker container). Where is the logging section? I just looked in the config/config.php but there is no logging configured. Or do you mean something else?

@hevelius
Copy link
Owner

@TheRiddler1982 you can see logging section entering in NC as Admin then go to Settings and on the bottom of left bar there is 'Logging' (this via web interface). Or you can set in config.php

By default, a log file named nextcloud.log will be created in the directory which has been configured by the datadirectory parameter in config/config.php.

"log_type" => "file",
"logfile" => "nextcloud.log",
"loglevel" => "3",
"logdateformat" => "F d, Y H:i:s",

May attention using Nextcloud as docker container it could be unstable.

@hevelius hevelius added the good first issue Good for newcomers label Jul 22, 2019
@ghost
Copy link
Author

ghost commented Jul 22, 2019

[webdav] Fatal: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'INSERT INTO oc_filecache (mimepart, mimetype, mtime, size, etag, storage_mtime, permissions, checksum, path_hash, path, parent, name, storage) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["1", "2", {"path":"Test/Test","dirname":"","basename":"Test","filename":"Test","timestamp":1563782855,"size":0,"bytes":0,"type":"dir","mimetype":null,"link":"https://1drv.ms/f/s!AOnEb5KjfgxdgYEm"}, -1, "5d356f1bacc67", {"path":"Test/Test","dirname":"","basename":"Test","filename":"Test","timestamp":1563782855,"size":0,"bytes":0,"type":"dir","mimetype":null,"link":"https://1drv.ms/f/s!AOnEb5KjfgxdgYEm"}, 31, "", "0cbc6611f5540bd0809a388dc95a615b", "Test", 1128, "Test", 6]:

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'Array' for column nextcloud.oc_filecache.mtime at row 1 at <>

  1. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 184
    Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exception oc ... 1", Doctrine\DBAL\Dr ... ]})
  2. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 158
    Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... 1")
  3. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1088
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "INSERT INTO `oc ... )", {1: "1",2: "2",3 ... 6})
  4. /var/www/html/lib/private/DB/Connection.php line 216
    Doctrine\DBAL\Connection->executeUpdate("INSERT INTO `oc ... )", ["1","2",{path: ... 6], [2,2,2,2,2,2,2,2,2,2,2,2,2])
  5. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 222
    OC\DB\Connection->executeUpdate("INSERT INTO `oc ... )", {dcValue1: "1",d ... 6}, {dcValue1: 2,dcV ... 2})
  6. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 214
    Doctrine\DBAL\Query\QueryBuilder->execute()
  7. /var/www/html/lib/private/Files/Cache/Cache.php line 291
    OC\DB\QueryBuilder\QueryBuilder->execute()
  8. /var/www/html/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 128
    OC\Files\Cache\Cache->insert("Test", {mimetype: "http ... "})
  9. /var/www/html/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 114
    OC\Files\Cache\Wrapper\CacheWrapper->insert("Test", {mimetype: "http ... "})
  10. /var/www/html/lib/private/Files/Cache/Scanner.php line 292
    OC\Files\Cache\Wrapper\CacheWrapper->put("Test", {mimetype: "http ... "})
  11. /var/www/html/lib/private/Files/Cache/Scanner.php line 221
    OC\Files\Cache\Scanner->addToCache("Test", {mimetype: "http ... "}, -1)
  12. /var/www/html/lib/private/Files/Cache/Scanner.php line 336
    OC\Files\Cache\Scanner->scanFile("Test", 3, 1128, false, true)
  13. /var/www/html/lib/private/Files/View.php line 1338
    OC\Files\Cache\Scanner->scan("Test", false)
  14. /var/www/html/lib/private/Files/View.php line 1382
    OC\Files\View->getCacheEntry(OCA\FilesAccessC ... l}, "Test", "/OneDrive/Test")
  15. /var/www/html/apps/dav/lib/Connector/Sabre/Directory.php line 223
    OC\Files\View->getFileInfo("/sven/files/OneDrive/Test")
  16. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1178
    OCA\DAV\Connector\Sabre\Directory->getChild("Test")
  17. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 590
    Sabre\DAV\Server->createCollection("files/sven/OneDrive/Test", Sabre\DAV\MkCol {})
  18. <>
    Sabre\DAV\CorePlugin->httpMkcol(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  19. /var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpMkcol"], [Sabre\HTTP\Requ ... }])
  20. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit("method:MKCOL", [Sabre\HTTP\Requ ... }])
  21. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  22. /var/www/html/apps/dav/lib/Server.php line 316
    Sabre\DAV\Server->exec()
  23. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
  24. /var/www/html/remote.php line 163
    undefinedundefinedrequire_once("/var/www/html/a ... p")

MKCOL /remote.php/dav/files/sven/OneDrive/Test
from 10.255.0.2 by sven at 2019-07-22T08:08:59+00:00

@ghost
Copy link
Author

ghost commented Jul 22, 2019

There you go :-) Thanks for the hint. I am new to Nextcloud.

@ghost
Copy link
Author

ghost commented Jul 22, 2019

{"reqId":"GrnHh7JK6vKHgY8MtxTb","level":3,"time":"2019-07-22T09:12:09+00:00","remoteAddr":"10.255.0.2","user":"sven","app":"PHP","method":"GET","url":"/apps/logreader/poll?lastReqId=snX5JNky2XWwMMOvScZK","message":"Use of undefined constant APP_NAME - assumed 'APP_NAME' (this will throw an Error in a future version of PHP) at /var/www/html/custom_apps/files_external_onedrive/lib/Storage/OneDrive.php#172","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36","version":"16.0.3.0","id":"5d357de96028e"}

@ghost
Copy link
Author

ghost commented Jul 22, 2019

This is thrown 2-3times a second now in the logs

@hevelius
Copy link
Owner

{"reqId":"GrnHh7JK6vKHgY8MtxTb","level":3,"time":"2019-07-22T09:12:09+00:00","remoteAddr":"10.255.0.2","user":"sven","app":"PHP","method":"GET","url":"/apps/logreader/poll?lastReqId=snX5JNky2XWwMMOvScZK","message":"Use of undefined constant APP_NAME - assumed 'APP_NAME' (this will throw an Error in a future version of PHP) at /var/www/html/custom_apps/files_external_onedrive/lib/Storage/OneDrive.php#172","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36","version":"16.0.3.0","id":"5d357de96028e"}

yep but is not related with your last issue. I got your same error #4 (comment) using NC in docker container. There must probably be some problems with NC and Docker.

@TheRiddler1982 if possible merges the answers to improve readability. It's not a real time chat ;)

@Maverick1983
Copy link

@TheRiddler1982 if possible merges the answers to improve readability. It's not a real time chat ;)

@hevelius Maybe we create a Slack chat?

@Maverick1983
Copy link

Maverick1983 commented Jul 22, 2019

Hi,

@TheRiddler1982: it's correct. user mode doesn't work also for me. It doesn't work only for latest version of NC.

Maybe related to this issue nextcloud/server#15567
or this
nextcloud/server#15238

I have not investigated more deepest but the mainly reason is on escaping token string in files_external config item.

In the meantime to find a more elegant way to fix this issue I suggest you this hack in

apps/files_external/lib/config.php line 242

public static function getBackendStatus($class, $options, $isPersonal, $testOnly = true) {
		if (self::$skipTest) {
			return StorageNotAvailableException::STATUS_SUCCESS;
		}
		foreach ($options as $key => &$option) {
			if($key === 'password') {
				// no replacements in passwords
				continue;
			}
                        // ----Add this if statemenent----- //
                        if($key === 'token') { 
                               continue;                         
                        }
                        // --------------------------------//
			$option = self::substitutePlaceholdersInConfig($option);
			if(!self::arePlaceholdersSubstituted($option)) {
				\OC::$server->getLogger()->error(
					'A placeholder

Or try the latest NC 15 version.

I hope release a new version as soon as possibile.

@hevelius:
I have 16.0.1 version and without your changes I have same error
With your changes, it's work!!

@ghost
Copy link
Author

ghost commented Jul 22, 2019

btw: I just got rid of the PHP warning by adding "self::" before the constant. It was writing about 1300 warnings. Now I can read the log again :-).

@Maverick1983 : do you have the error, too when adding a new item? Do you see your data?

@hevelius: I deleted the version 1.0.2 (which I originally installed from the internal app store and installed it manualy with the composer (using the master branch). The above error still remains.

@netcasepl
Copy link

The same issue here (even with config.php workaround). Version 16.0.3. Any chance to take a look? :)

@hevelius
Copy link
Owner

I'm ready to release a new version that includes several fixes found thanks to you. :)

@TheRiddler1982 resolved constant error adding self::. Using NC inside a docker container I get same error so I suppose it's an issue releated using NC in container. Maybe releated on docker volume and filesystem properties.

@netcasepl next release includes the fix you're looking for ;)

@hevelius
Copy link
Owner

A new version of files_external_onedrive has been released. Several issues has been resolved mainly the placeholder substitution causing red check on external storage configuration.

I consider the topic solved and close this issue. Thanks a lot for the collaboration.

@ghost
Copy link
Author

ghost commented Jul 25, 2019

Hi @hevelius ,

thanks for the new version. I restored the original config.php from the external storage app and I got the green check box (that's why I am Mr. Green :-)).

However, I am still stuck with an error. This time, the OneDrive folder is not shown in the root directory. When going directly to the external storages and click on OneDrive the following message is displayed

image

[lib] Error: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'INSERT INTO oc_filecache (mimepart, mimetype, mtime, size, etag, storage_mtime, permissions, checksum, path_hash, path, parent, name, storage) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["1", "2", {"path":"hildren/","timestamp":false,"size":null,"bytes":null,"type":"dir","mimetype":null,"link":null}, -1, "5d3993939dbd3", {"path":"hildren/","timestamp":false,"size":null,"bytes":null,"type":"dir","mimetype":null,"link":null}, 23, "", "d41d8cd98f00b204e9800998ecf8427e", "", -1, "", 9]:

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'Array' for column nextcloud.oc_filecache.mtime at row 1 at <>

  1. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 184
    Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exception oc ... 1", Doctrine\DBAL\Dr ... ]})
  2. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 158
    Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... 1")
  3. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1088
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "INSERT INTO `oc ... )", {1: "1",2: "2",3 ... 9})
  4. /var/www/html/lib/private/DB/Connection.php line 216
    Doctrine\DBAL\Connection->executeUpdate("INSERT INTO `oc ... )", ["1","2",{path: ... 9], [2,2,2,2,2,2,2,2,2,2,2,2,2])
  5. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 222
    OC\DB\Connection->executeUpdate("INSERT INTO `oc ... )", {dcValue1: "1",d ... 9}, {dcValue1: 2,dcV ... 2})
  6. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 214
    Doctrine\DBAL\Query\QueryBuilder->execute()
  7. /var/www/html/lib/private/Files/Cache/Cache.php line 291
    OC\DB\QueryBuilder\QueryBuilder->execute()
  8. /var/www/html/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 128
    OC\Files\Cache\Cache->insert("", {mimetype: "http ... "})
  9. /var/www/html/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 128
    OC\Files\Cache\Wrapper\CacheWrapper->insert("", {mimetype: "http ... "})
  10. /var/www/html/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 114
    OC\Files\Cache\Wrapper\CacheWrapper->insert("", {mimetype: "http ... "})
  11. /var/www/html/lib/private/Files/Cache/Scanner.php line 292
    OC\Files\Cache\Wrapper\CacheWrapper->put("", {mimetype: "http ... "})
  12. /var/www/html/lib/private/Files/Cache/Scanner.php line 221
    OC\Files\Cache\Scanner->addToCache("", {mimetype: "http ... "}, -1)
  13. /var/www/html/lib/private/Files/View.php line 1482
    OC\Files\Cache\Scanner->scanFile("")
  14. /var/www/html/apps/dav/lib/Connector/Sabre/Directory.php line 265
    OC\Files\View->getDirectoryContent("/")
  15. /var/www/html/apps/dav/lib/Connector/Sabre/TagsPlugin.php line 224
    OCA\DAV\Connector\Sabre\Directory->getChildren()
  16. <>
    OCA\DAV\Connector\Sabre\TagsPlugin->handleGetProperties(Sabre\DAV\PropFind {}, OCA\DAV\Files\FilesHome {})
  17. /var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([OCA\DAV\Connect ... "], [Sabre\DAV\PropF ... }])
  18. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1059
    Sabre\Event\EventEmitter->emit("propFind", [Sabre\DAV\PropF ... }])
  19. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 981
    Sabre\DAV\Server->getPropertiesByNode(Sabre\DAV\PropFind {}, OCA\DAV\Files\FilesHome {})
  20. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1666
    Sabre\DAV\Server->getPropertiesIteratorForPath("files/sven", ["{DAV:}getlastm ... "], 1)
  21. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 355
    Sabre\DAV\Server->generateMultiStatus(Generator {}, false)
  22. <>
    Sabre\DAV\CorePlugin->httpPropFind(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  23. /var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpPropFind"], [Sabre\HTTP\Requ ... }])
  24. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit("method:PROPFIND", [Sabre\HTTP\Requ ... }])
  25. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  26. /var/www/html/apps/dav/lib/Server.php line 316
    Sabre\DAV\Server->exec()
  27. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
  28. /var/www/html/remote.php line 163
    undefinedundefinedrequire_once("/var/www/html/a ... p")

PROPFIND /remote.php/dav/files/sven/
from 10.255.0.2 by svenflock at 2019-07-25T11:33:39+00:00

Could you have another look at it? If you like, I can give you access to my server.

@hevelius
Copy link
Owner

@TheRiddler1982 there's a problem with MariadDB/MySQL ... which version are you using? I have installed NC via docker container and I have your same issue with MariaDB 10.x (latest) .... No problem with MariaDB 5.x.

There are many similar issues as you can see on NC issues page https://github.com/nextcloud/server/issues

Could you try a MariaDB/MySQL 5.x version?

@ghost
Copy link
Author

ghost commented Jul 25, 2019

Hi,

I am using 10.4.6 (see below). I don't get it. I am using the offical docker-compose file from Dockerhub. I thought, at least, they tried it. Well, the code just states mariadb with no tag given. Switching DB means also to set everything up again, doesn't it?

Before going back to version 5, I will test postgreSQL. I had troubles with MariaDB in the past, maybe that's the switch to go away :-). I will test it and give you an update. Thanks for looking into this!

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 1498
Server version: 10.4.6-MariaDB-1:10.4.6+maria~bionic mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

@ghost
Copy link
Author

ghost commented Jul 26, 2019

With postgres in place (which was terrible to get it running in docker with Nextcloud) I get the following error with the same behavior (OneDrive folder not visible in root):

[lib] Error: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'INSERT INTO "oc_filecache" ("mimepart", "mimetype", "mtime", "size", "etag", "storage_mtime", "permissions", "checksum", "path_hash", "path", "parent", "name", "storage") VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [1, 2, {"path":"hildren/","timestamp":false,"size":null,"bytes":null,"type":"dir","mimetype":null,"link":null}, -1, "5d3aab0f18a43", {"path":"hildren/","timestamp":false,"size":null,"bytes":null,"type":"dir","mimetype":null,"link":null}, 23, "", "d41d8cd98f00b204e9800998ecf8427e", "", -1, "", 4]:

SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "Array" at <>

  1. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 184
    Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException("An exception oc ... "", Doctrine\DBAL\Dr ... ]})
  2. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 158
    Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOPgSql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... "")
  3. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1088
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOPgSql\Driver {}, Doctrine\DBAL\Dr ... ]}, "INSERT INTO "o ... )", {1: 1,2: 2,3: {p ... 4})
  4. /var/www/html/lib/private/DB/Connection.php line 216
    Doctrine\DBAL\Connection->executeUpdate("INSERT INTO "o ... )", [1,2,{path: "hil ... 4], [2,2,2,2,2,2,2,2,2,2,2,2,2])
  5. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 222
    OC\DB\Connection->executeUpdate("INSERT INTO "o ... )", {dcValue1: 1,dcV ... 4}, {dcValue1: 2,dcV ... 2})
  6. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 214
    Doctrine\DBAL\Query\QueryBuilder->execute()
  7. /var/www/html/lib/private/Files/Cache/Cache.php line 291
    OC\DB\QueryBuilder\QueryBuilder->execute()
  8. /var/www/html/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 128
    OC\Files\Cache\Cache->insert("", {mimetype: "http ... "})
  9. /var/www/html/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 114
    OC\Files\Cache\Wrapper\CacheWrapper->insert("", {mimetype: "http ... "})
  10. /var/www/html/lib/private/Files/Cache/Scanner.php line 292
    OC\Files\Cache\Wrapper\CacheWrapper->put("", {mimetype: "http ... "})
  11. /var/www/html/lib/private/Files/Cache/Scanner.php line 221
    OC\Files\Cache\Scanner->addToCache("", {mimetype: "http ... "}, -1)
  12. /var/www/html/lib/private/Files/View.php line 1482
    OC\Files\Cache\Scanner->scanFile("")
  13. /var/www/html/apps/dav/lib/Connector/Sabre/Directory.php line 265
    OC\Files\View->getDirectoryContent("/")
  14. /var/www/html/apps/dav/lib/Connector/Sabre/TagsPlugin.php line 224
    OCA\DAV\Connector\Sabre\Directory->getChildren()
  15. <>
    OCA\DAV\Connector\Sabre\TagsPlugin->handleGetProperties(Sabre\DAV\PropFind {}, OCA\DAV\Files\FilesHome {})
  16. /var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([OCA\DAV\Connect ... "], [Sabre\DAV\PropF ... }])
  17. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1059
    Sabre\Event\EventEmitter->emit("propFind", [Sabre\DAV\PropF ... }])
  18. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 981
    Sabre\DAV\Server->getPropertiesByNode(Sabre\DAV\PropFind {}, OCA\DAV\Files\FilesHome {})
  19. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 1666
    Sabre\DAV\Server->getPropertiesIteratorForPath("files/svenflock", ["{DAV:}getlastm ... "], 1)
  20. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 355
    Sabre\DAV\Server->generateMultiStatus(Generator {}, false)
  21. <>
    Sabre\DAV\CorePlugin->httpPropFind(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  22. /var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpPropFind"], [Sabre\HTTP\Requ ... }])
  23. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit("method:PROPFIND", [Sabre\HTTP\Requ ... }])
  24. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  25. /var/www/html/apps/dav/lib/Server.php line 316
    Sabre\DAV\Server->exec()
  26. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
  27. /var/www/html/remote.php line 163
    undefinedundefinedrequire_once("/var/www/html/a ... p")

PROPFIND /remote.php/dav/files/svenflock/
from 10.255.0.2 by svenflock at 2019-07-26T07:26:07+00:00

Is this a postgres issue?

Thanks again!

@netcasepl
Copy link

netcasepl commented Jul 26, 2019

Just FYI, we are using:
# mysql --version mysql Ver 14.14 Distrib 5.5.60, for debian-linux-gnu (x86_64) using readline 6.3

Everything is working fine.
@hevelius thank you for the great work!

@ghost
Copy link
Author

ghost commented Jul 26, 2019

Is there any other database version which works? I don't like the idea to use a 7 year old architecture of a database. It's out of support since December 2018. What about MySQL 5.7? Where is the exact point in version where it breaks?

@Maverick1983
Copy link

Is there any other database version which works? I don't like the idea to use a 7 year old architecture of a database. It's out of support since December 2018. What about MySQL 5.7? Where is the exact point in version where it breaks?

I have this
mysql Ver 15.1 Distrib 10.1.40-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

@ghost
Copy link
Author

ghost commented Jul 29, 2019

Is there any other database version which works? I don't like the idea to use a 7 year old architecture of a database. It's out of support since December 2018. What about MySQL 5.7? Where is the exact point in version where it breaks?

I have this
mysql Ver 15.1 Distrib 10.1.40-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Yeeesssss!!! That version works! OneDrive is now integrated and working properly at first sight. Thanks for all your help.

I'm just curious: what incompatibility between 10.1 and 10.4 is causing the iussue?

@ghost
Copy link
Author

ghost commented Jul 29, 2019

Ok, the problems are not gone, sorry! At first, everything was fine. But after some time (an hour) the plugin reports that it is not configured. I can only fix the issue to delete the storage and add it again. And after that, it will reoccur again.

image

[files_external] Error: Exception: OneDrive storage not yet configured at <>

  1. /var/www/html/custom_apps/files_external_onedrive/lib/Storage/OneDrive.php line 92
    OCA\Files_external_onedrive\Storage\OneDrive->refreshToken(stdClass {token_ ... "})
  2. /var/www/html/apps/files_external/lib/config.php line 266
    OCA\Files_external_onedrive\Storage\OneDrive->__construct("*** sensitive parameter replaced ***")
  3. /var/www/html/apps/files_external/lib/Controller/StoragesController.php line 253
    OC_Mount_Config::getBackendStatus("*** sensitive parameters replaced ***")
  4. /var/www/html/apps/files_external/lib/Controller/StoragesController.php line 305
    OCA\Files_External\Controller\StoragesController->updateStorageStatus("*** sensitive parameters replaced ***")
  5. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 166
    OCA\Files_External\Controller\StoragesController->show(3, "*** sensitive parameter replaced ***")
  6. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Files_Extern ... {}, "show")
  7. /var/www/html/lib/private/AppFramework/App.php line 126
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Files_Extern ... {}, "show")
  8. /var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\Files_Exte ... r", "show", OC\AppFramework\ ... {}, {id: "3",_route: ... "})
  9. <>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({id: "3",_route: ... "})
  10. /var/www/html/lib/private/Route/Router.php line 297
    undefinedundefinedcall_user_func(OC\AppFramework\ ... {}, {id: "3",_route: ... "})
  11. /var/www/html/lib/base.php line 975
    OC\Route\Router->match("/apps/files_external/globalstorages/3")
  12. /var/www/html/index.php line 42
    OC::handleRequest()

GET /apps/files_external/globalstorages/3?testOnly=true
from 10.255.0.2 by ZIIN at 2019-07-29T19:38:28+00:00

Could you help me please?

Thanks!

@Maverick1983
Copy link

@TheRiddler1982 The same error occurs with another OneDrive account

@ghost
Copy link
Author

ghost commented Jul 30, 2019

@TheRiddler1982 The same error occurs with another OneDrive account

Did you find the root cause for that? Is is a Microsoft issue? How did you fix it?

@hevelius
Copy link
Owner

@TheRiddler1982 are you using the latest version of files_external_onedrive?

@Maverick1983
Copy link

@TheRiddler1982 The same error occurs with another OneDrive account

Did you find the root cause for that? Is is a Microsoft issue? How did you fix it?

No. I have not investigated further

@ghost
Copy link
Author

ghost commented Jul 30, 2019

@TheRiddler1982 are you using the latest version of files_external_onedrive?

I am using tag 1.0.3 (the one resulted from this original post). Is your master branch fresher?

@ghost
Copy link
Author

ghost commented Jul 30, 2019

@TheRiddler1982 The same error occurs with another OneDrive account

Did you find the root cause for that? Is is a Microsoft issue? How did you fix it?

No. I have not investigated further

I hope this get resolved :-). I have tried Dropbox, GoogleDrive and another OwnCloud storage. I had problems on all external storages. I'm such as close to giving up on any external storages. I have the most space available on OneDrive and it would be a pitty not to use it more flexible.

@ghost
Copy link
Author

ghost commented Jul 30, 2019

@hevelius : Would it help to give you access to my server that you can investigate directly in my setup?

@ghost
Copy link
Author

ghost commented Aug 4, 2019

Hi, could someone please help me with that issue?

@Maverick1983
Copy link

Hi, could someone please help me with that issue?

On my server, I can use Google and this OneDrive, without error.
I don't use Docker

You can use Google Compute Engine Free Tier 1. I use this too. No pay.

@b1nary-b0b
Copy link

b1nary-b0b commented Aug 12, 2019

Hey Guys,

any news on this?
I am seeing the same behaviour (no Onedrive folder in NC visible. :(

[lib] Error: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'INSERT INTO oc_filecache (mimepart, mimetype, mtime, size, etag, storage_mtime, permissions, checksum, path_hash, path, parent, name, storage) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["1", "2", {"path":"hildren/","timestamp":false,"size":null,"bytes":null,"type":"dir","mimetype":null,"link":null}, -1, "5d50cdbb4f003", {"path":"hildren/","timestamp":false,"size":null,"bytes":null,"type":"dir","mimetype":null,"link":null}, 23, "", "d41d8cd98f00b204e9800998ecf8427e", "", -1, "", 6]:

SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'Array' for column 'mtime' at row 1 at <>

  1. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 184
    Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exception oc ... 1", Doctrine\DBAL\Dr ... ]})
  2. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 158
    Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... 1")
  3. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1088
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "INSERT INTO `oc ... )", {1: "1",2: "2",3 ... 6})
  4. /var/www/nextcloud/lib/private/DB/Connection.php line 216
    Doctrine\DBAL\Connection->executeUpdate("INSERT INTO `oc ... )", ["1","2",{path: ... 6], [2,2,2,2,2,2,2,2,2,2,2,2,2])
  5. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 222
    OC\DB\Connection->executeUpdate("INSERT INTO `oc ... )", {dcValue1: "1",d ... 6}, {dcValue1: 2,dcV ... 2})
  6. /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 214
    Doctrine\DBAL\Query\QueryBuilder->execute()
  7. /var/www/nextcloud/lib/private/Files/Cache/Cache.php line 291
    OC\DB\QueryBuilder\QueryBuilder->execute()
  8. /var/www/nextcloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 128
    OC\Files\Cache\Cache->insert("", {mimetype: "http ... "})
  9. /var/www/nextcloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 114
    OC\Files\Cache\Wrapper\CacheWrapper->insert("", {mimetype: "http ... "})
  10. /var/www/nextcloud/lib/private/Files/Cache/Scanner.php line 292
    OC\Files\Cache\Wrapper\CacheWrapper->put("", {mimetype: "http ... "})
  11. /var/www/nextcloud/lib/private/Files/Cache/Scanner.php line 221
    OC\Files\Cache\Scanner->addToCache("", {mimetype: "http ... "}, -1)
  12. /var/www/nextcloud/lib/private/Files/View.php line 1482
    OC\Files\Cache\Scanner->scanFile("")
  13. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 265
    OC\Files\View->getDirectoryContent("/")
  14. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 195
    OCA\DAV\Connector\Sabre\Directory->getChildren()
  15. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 899
    Sabre\DAV\Tree->getChildren("")
  16. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 978
    Sabre\DAV\Server->generatePathNodes(Sabre\DAV\PropFind {}, [Sabre\DAV\PropF ... }])
  17. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1666
    Sabre\DAV\Server->getPropertiesIteratorForPath("", ["{DAV:}resourcetype"], 1)
  18. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 355
    Sabre\DAV\Server->generateMultiStatus(Generator {}, false)
  19. <>
    Sabre\DAV\CorePlugin->httpPropFind(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  20. /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpPropFind"], [Sabre\HTTP\Requ ... }])
  21. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit("method:PROPFIND", [Sabre\HTTP\Requ ... }])
  22. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  23. /var/www/nextcloud/apps/dav/appinfo/v1/webdav.php line 80
    Sabre\DAV\Server->exec()
  24. /var/www/nextcloud/remote.php line 163
    undefinedundefinedrequire_once("/var/www/nextcl ... p")

PROPFIND /nextcloud/remote.php/webdav
from 82.119.24.29 by admin at 2019-08-12T02:23:55+00:00

@robertsass
Copy link

I had the same issue with the latest version of Nextcloud (17) and External Storage: OneDrive (1.0.7).
I regenerated the App secret under https://apps.dev.microsoft.com/#/appList and with that new one it's working fine: I'm able to setup on user basis but also as admin for the whole server. It's appearing and also the contents are accessible. In my case the first App secret contained a $, |, { and } while the working one does not contain these characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants