Closed ghost closed 5 years ago
Me too
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.
I use normal user, but I have same error
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.
Is there anything interesting in nc logs?
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+8hPQk5SNcYJ4eYRyDhTVnBZrNoZwg4DFaa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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" }
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!
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 https://github.com/nextcloud/server/issues/15567 or this https://github.com/nextcloud/server/issues/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.
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
@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:
Is there more to change in the code or settings?
@TheRiddler1982 congratulation Mr. Green :) ... Is there something interesting in the Logging section?
Have you set all required Authorization API in Azure?
@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?
@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.
[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 <
MKCOL /remote.php/dav/files/sven/OneDrive/Test from 10.255.0.2 by sven at 2019-07-22T08:08:59+00:00
There you go :-) Thanks for the hint. I am new to Nextcloud.
{"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"}
This is thrown 2-3times a second now in the logs
{"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 https://github.com/hevelius/files_external_onedrive/issues/4#issuecomment-513703779 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 ;)
@TheRiddler1982 if possible merges the answers to improve readability. It's not a real time chat ;)
@hevelius Maybe we create a Slack chat?
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!!
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.
The same issue here (even with config.php workaround). Version 16.0.3. Any chance to take a look? :)
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 ;)
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.
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
[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 <
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.
@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?
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.
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 <
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!
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!
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?
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
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?
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.
[files_external] Error: Exception: OneDrive storage not yet configured at <
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!
@TheRiddler1982 The same error occurs with another OneDrive account
@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?
@TheRiddler1982 are you using the latest version of files_external_onedrive?
@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
@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?
@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.
@hevelius : Would it help to give you access to my server that you can investigate directly in my setup?
Hi, could someone please help me with that issue?
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.
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 <
PROPFIND /nextcloud/remote.php/webdav from 82.119.24.29 by admin at 2019-08-12T02:23:55+00:00
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.
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.
Thanks for your help!