GithubHelp home page GithubHelp logo

nextcloud / integration_google Goto Github PK

View Code? Open in Web Editor NEW
102.0 10.0 31.0 2.7 MB

🇬 Google integration into Nextcloud

License: GNU Affero General Public License v3.0

PHP 27.90% CSS 0.04% Makefile 1.24% JavaScript 62.14% Vue 8.68%
nextcloud google

integration_google's Introduction

Google integration in Nextcloud

🇬 Google integration allows you to automatically migrate your Google calendars, contacts, photos and files into Nextcloud.

Note that this is a one-time import and will not keep Nextcloud in sync with Google.

🚀 Installation

In your Nextcloud, simply enable the Google Integration app through the Apps management. The Google Integration app is available for Nextcloud >= 22.

🔧 Setup

The app needs some setup in the Google API Console in order to work. To do this, go to Nextcloud Settings > Administration > Connected accounts and follow the instructions in the "Google integration" section.

🛠️ State of maintenance

While there are many things that could be done to further improve this app, the app is currently maintained with limited effort. This means:

  • The main functionality works for the majority of the use cases
  • We will ensure that the app will continue to work like this for future releases and we will fix bugs that we classify as 'critical'
  • We will not invest further development resources ourselves in advancing the app with new features
  • We do review and enthusiastically welcome community PR's

We would be more than excited if you would like to collaborate with us. We will merge pull requests for new features and fixes. We also would love to welcome co-maintainers.

If there is a strong business case for any development of this app, we will consider your wishes for our roadmap. Please contact your account manager to talk about the possibilities.

integration_google's People

Contributors

akhil1508 avatar aszlig avatar carlschwan avatar commanderroot avatar dependabot[bot] avatar hjylewis avatar julien-nc avatar marcelklehr avatar marcelrobitaille avatar mikaellanger avatar morrisjobke avatar nextcloud-bot avatar nickvergessen avatar pvince81 avatar rakekniven avatar sergeymosin avatar skjnldsv avatar strugee avatar tetebueno avatar valdnet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

integration_google's Issues

Low resolution images when importing from Google Photos

Problem
Images imported from google photos have lower resolution than original. Imported videos have a size of arround 50 KB and cannot be oppened.

Example resolution:
Image in Google Photos: 4000x3000
Image imported to Nextcloud: 512 x 384

Current Setup
Nextcloud 20.0.1
Ubuntu 20.04
Google integration 0.0.22

Cannot Import Photos or Drive when using reverse proxy

Problem

I followed the instructions and have authenticated my Google account with the integration app. The app can see how many documents and photos I have but when I try to import, nothing happens. The Google API dashboard shows requests being made with 200 response codes but no data is transferred.

Current Setup

  • Nextcloud 20.0.1
  • Raspbian 10 (Buster)
  • Apache2 running behind nginx reverse proxy

Apache Configuration

<VirtualHost 127.0.0.1:8080>
    Alias "/" "/var/www/nextcloud/"

    <Directory /var/www/nextcloud/>
        Options +FollowSymlinks
        AllowOverride All

        <IfModule mod_dav.c>
            Dav off
        </IfModule>

        SetEnv HOME /var/www/nextcloud
        SetEnv HTTP_HOME /var/www/nextcloud
    </Directory>

    ErrorLog /var/log/apache2/nextcloud-error_log
    CustomLog /var/log/apache2/nextcloud-access_log common
</VirtualHost>

nginx Configuration

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name <external-site>;

    ssl_certificate /etc/letsencrypt/live/<external-site>/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/<external-site>/privkey.pem;

    client_max_body_size 0;
    underscores_in_headers on;

    location ~ {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        add_header Front-End-Https on;

        proxy_headers_hash_max_size 512;
        proxy_headers_hash_bucket_size 64;

        proxy_buffering off;
        proxy_redirect off;
        proxy_max_temp_file_size 0;
        proxy_pass http://127.0.0.1:8080;
    }
}

Nextcloud Configuration

<?php
$CONFIG = array (
    'instanceid' => <instanceid>,
    'passwordsalt' => <passwordsalt>,
    'secret' => <secret>,
    'trusted_domains' =>
    array (
        0 => <external_url>,
    ),
    'datadirectory' => '/media/data/nextcloud-data',
    'dbtype' => 'mysql',
    'version' => '20.0.1.1',
    'overwrite.cli.url' => <external_url>,
    'dbname' => 'nextcloud',
    'dbhost' => 'localhost:3306',
    'dbport' => '',
    'dbtableprefix' => 'oc_',
    'mysql.utf8mb4' => true,
    'dbuser' => 'ncuser',
    'dbpassword' => <dbpassword>,
    'installed' => true,
    'memcache.local' => '\OC\Memcache\APCu',
    'overwriteprotocol' => 'https',
);

Nextcloud Logs

[integration_google] Warning: Google API error getting album list, no "albums" key in []

GET /index.php/apps/integration_google/photo-number
from 127.0.0.1 by Mike at 2020-11-16T17:04:34+00:00

[PHP] Error: Error: count(): Parameter must be an array or an object that implements Countable at /var/www/nextcloud/apps/integration_google/lib/Service/GoogleContactsAPIService.php#56 at <<closure>>

0. <<closure>>
   OC\Log\ErrorHandler::onError(2, "count(): Parame ... e", "/var/www/nextcl ... p", 56, {accessToken: "y ... ]})
1. /var/www/nextcloud/apps/integration_google/lib/Service/GoogleContactsAPIService.php line 56
   count(null)
2. /var/www/nextcloud/apps/integration_google/lib/Controller/GoogleAPIController.php line 136
   OCA\Google\Service\GoogleContactsAPIService->getContactNumber("ya29.A0AfH6SMAm ... s", "Mike")
3. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 169
   OCA\Google\Controller\GoogleAPIController->getContactNumber()
4. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 100
   OC\AppFramework\Http\Dispatcher->executeController(OCA\Google\Contr ... "}, "getContactNumber")
5. /var/www/nextcloud/lib/private/AppFramework/App.php line 152
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\Google\Contr ... "}, "getContactNumber")
6. /var/www/nextcloud/lib/private/Route/Router.php line 308
   OC\AppFramework\App::main("OCA\\Google\\Co ... r", "getContactNumber", OC\AppFramework\ ... {}, {action: null,_r ... "})
7. /var/www/nextcloud/lib/base.php line 1009
   OC\Route\Router->match("/apps/integration_google/contact-number")
8. /var/www/nextcloud/index.php line 37
   OC::handleRequest()

GET /index.php/apps/integration_google/contact-number
from 127.0.0.1 by Mike at 2020-11-16T17:04:32+00:00

[PHP] Error: Error: Undefined index: connections at /var/www/nextcloud/apps/integration_google/lib/Service/GoogleContactsAPIService.php#56 at <<closure>>

0. /var/www/nextcloud/apps/integration_google/lib/Service/GoogleContactsAPIService.php line 56
   OC\Log\ErrorHandler::onError(8, "Undefined index: connections", "/var/www/nextcl ... p", 56, {accessToken: "y ... ]})
1. /var/www/nextcloud/apps/integration_google/lib/Controller/GoogleAPIController.php line 136
   OCA\Google\Service\GoogleContactsAPIService->getContactNumber("ya29.A0AfH6SMAm ... s", "Mike")
2. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 169
   OCA\Google\Controller\GoogleAPIController->getContactNumber()
3. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 100
   OC\AppFramework\Http\Dispatcher->executeController(OCA\Google\Contr ... "}, "getContactNumber")
4. /var/www/nextcloud/lib/private/AppFramework/App.php line 152
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\Google\Contr ... "}, "getContactNumber")
5. /var/www/nextcloud/lib/private/Route/Router.php line 308
   OC\AppFramework\App::main("OCA\\Google\\Co ... r", "getContactNumber", OC\AppFramework\ ... {}, {action: null,_r ... "})
6. /var/www/nextcloud/lib/base.php line 1009
   OC\Route\Router->match("/apps/integration_google/contact-number")
7. /var/www/nextcloud/index.php line 37
   OC::handleRequest()

GET /index.php/apps/integration_google/contact-number
from 127.0.0.1 by Mike at 2020-11-16T17:04:32+00:00

white page

I only get a white page If I go to /settings/user/migration
NC20

console:
No OC found
jQuery is deprecated
$ is deprecated

Birthday import for contacts may not work

As a nextcloud user I wanted to port my contacts from "Google Contacts".

Some contacts ended up without the birthday field in the user interface and also the calendar app did not show their birthdays. For other contacts, the port of the birthday field worked.

Preliminary research makes me assume, that this behavior might be related to the missing year of birth. For contacts with a year of birth, things seemed to work. For contacts with only day and month of birth, there seems to be a problem. Although, I only went through few contacts to back this hypothesis.

Just thought, I leave this here as a possible issue. Thanks for writing this software, anyway =).

Error 400: invalid_request

Hi everyone,

I'm trying to set up the integration but it just won't work. I've followed the steps: created a project in Google Dev, enabled the API's (calendar, drive, people and photos), I set up a redirect URI.
As a redirect URI I filled in the following: https://192.168.2.4.nip.io/index.php/apps/integration_google/oauth-redirect
So the only difference between this and the suggest URL is that I added .nip.io, since my Nextcloud is not internet facing

I tried it with the original URL as well, that didn't work. I tried some nonexistant domain name, and then modified the /etc/hosts file on the machine I am working from so to redirect nonexistantwhatever.com to 192.168.2.4 but that also didn't work.

I just keep getting the following error:
Authorization Error
Error 400: invalid_request
device_id and device_name are required for private IP: https://192.168.2.4/index.php/apps/integration_google/oauth-redirect

I logged out and in several times on both Google and Nextcloud account, and I triple checked that client-id and client-secret are filled in (those that both are prompted when the oauth was just created, and when you edit the credential it shows in the right upper corner)

I am out of ideas what to try next, I hope anyone has another suggestion!

Feature Request: configurable targetPath

In the case of "big" imports such as Photos or Drive pull-downs, it would be interesting, maybe even "good", to allow the user to specify in which target directory they wish to import the files.

This way they can specify a directory that is pre-configured to not be synchronized to a downstream client.

Use Case I: I have my NextCloud instance, with 4 PC clients. If I start an import right now, all clients would see a new folder and start synchronizing it. By telling the import process to download from Drive/Picasa to a pre-created folder that is manually set to "do not sync", this issue is solved in its entirety.

Synchronization with Google Drive does not continue after an error + size calculation

Very good app! Thanks!
I have successfully synced my calendar and address book! But there were problems with google drive; (

Google Drive show that I have 9.9GB used. Nextcloud show only 6GB.

I've tried syncing twice:
The first time syncing is over 55% because it ran out of disk space.
Which it was downloaded just 1.5GB

I added disk space, but sync did not continue.
I canceled the job, deleted the directory and restarted it, but the sync still didn't start.

I waited for several hours, but it said that the synchronization will start soon, and 0 files are synchronized now

Every 3 minutes (when cron.php started) a line "InvalidArgumentException: Section with the same ID already registered: migration, class: OCA\Google\Settings\PersonalSection" appears in the log, but nothing else happens.

I stopped the job, deleted all personal data from the database (delete from oc_preferences where userid='<my userid>' and appid='integration_google';), then started the job again and it started working.

Synchronization stopped again last night. There was an error in the log that one of the files in Google Drive was locked. I deleted this file, but syncing does not continue.

Now I see: "937 files in Google Drive (6 GiB),1849 files imported (197%), Last Google Drive import job at 13 may 2021, 18:44"

This is the text I saw last night, and almost 20 hours have passed.
Local "Google Drive" directory size only 5.5GB.

In the log file, an entry for "Section with the same ID already registered" still appears every three minutes.

Can I continue syncing without deleting database entries and downloaded files?
How?

Error: file_put_contents(…): failed to open stream: No such file or directory at /var/www/html/lib/private/Files/Storage/Local.php#277

Hello,

I ran a Google Drive import today and encountered this error after a few minutes:

[PHP] Error: Error: file_put_contents(/var/www/html/data/admin/files/Importation de Google Drive/CartoBio/Entretiens utilisateurs/2020/04/17 CR Entretien Certis): failed to open stream: No such file or directory at /var/www/html/lib/private/Files/Storage/Local.php#277 at <<closure>>

 0. <<closure>>
    OC\Log\ErrorHandler::onError(2, "file_put_conten ... y", "/var/www/html/l ... p", 277, {path: "files/Im ... l})
 1. /var/www/html/lib/private/Files/Storage/Local.php line 277
    file_put_contents("/var/www/html/d ... s", null)
 2. /var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php line 257
    OC\Files\Storage\Local->file_put_contents("files/Importati ... s", null)
 3. /var/www/html/lib/private/Files/View.php line 1159
    OC\Files\Storage\Wrapper\Wrapper->file_put_contents("files/Importati ... s", null)
 4. /var/www/html/lib/private/Files/View.php line 696
    OC\Files\View->basicOperation("file_put_contents", "/admin/files/Im ... s", ["create","write"], null)
 5. /var/www/html/lib/private/Files/Node/Folder.php line 189
    OC\Files\View->file_put_contents("/admin/files/Im ... s", null)
 6. /var/www/html/custom_apps/integration_google/lib/Service/GoogleDriveAPIService.php line 291
    OC\Files\Node\Folder->newFile("2020/04/17 CR Entretien Certis", null)
 7. /var/www/html/custom_apps/integration_google/lib/Service/GoogleDriveAPIService.php line 212
    OCA\Google\Service\GoogleDriveAPIService->getFile("ya29.A0AfH6SMBX ... U", "admin", {kind: "drive#fi ... e}, {1d0KsPmWYAZlMym ... }}, OC\Files\Node\Folder {})
 8. /var/www/html/custom_apps/integration_google/lib/Service/GoogleDriveAPIService.php line 126
    OCA\Google\Service\GoogleDriveAPIService->importFiles("ya29.A0AfH6SMBX ... U", "admin", "Importation de Google Drive", 500000000, 0)
 9. /var/www/html/custom_apps/integration_google/lib/BackgroundJob/ImportDriveJob.php line 36
    OCA\Google\Service\GoogleDriveAPIService->importDriveJob("admin")
10. /var/www/html/lib/public/BackgroundJob/Job.php line 80
    OCA\Google\BackgroundJob\ImportDriveJob->run({user_id: "admin"})
11. /var/www/html/lib/public/BackgroundJob/QueuedJob.php line 48
    OCP\BackgroundJob\Job->execute(OC\BackgroundJob\JobList {}, OC\Log {})
12. /var/www/html/cron.php line 127
    OCP\BackgroundJob\QueuedJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})

at 2020-10-30T10:16:13+00:00

The aforementioned file is a Google Doc file (text document).

The error happens next to this one:

[integration_google] Warning: Google API error : Client error: `GET https://www.googleapis.com/drive/v3/files/1atCOnjyUQzPCvv4oom9VlK6t7hwoX5mB_Z8hTm0BfAc?alt=media` resulted in a `403 Forbidden` response:
{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "fileNotDownloadable",
    "message": "Only files (truncated...)


at 2020-10-30T10:16:12+00:00

And the next error is the following:

[core] Error: OCP\Files\NotPermittedException: Could not create path at <<closure>>

0. /var/www/html/custom_apps/integration_google/lib/Service/GoogleDriveAPIService.php line 291
   OC\Files\Node\Folder->newFile("2020/04/17 CR Entretien Certis", null)
1. /var/www/html/custom_apps/integration_google/lib/Service/GoogleDriveAPIService.php line 212
   OCA\Google\Service\GoogleDriveAPIService->getFile("ya29.A0AfH6SMBX ... U", "admin", {kind: "drive#fi ... e}, {1d0KsPmWYAZlMym ... }}, OC\Files\Node\Folder {})
2. /var/www/html/custom_apps/integration_google/lib/Service/GoogleDriveAPIService.php line 126
   OCA\Google\Service\GoogleDriveAPIService->importFiles("ya29.A0AfH6SMBX ... U", "admin", "Importation de Google Drive", 500000000, 0)
3. /var/www/html/custom_apps/integration_google/lib/BackgroundJob/ImportDriveJob.php line 36
   OCA\Google\Service\GoogleDriveAPIService->importDriveJob("admin")
4. /var/www/html/lib/public/BackgroundJob/Job.php line 80
   OCA\Google\BackgroundJob\ImportDriveJob->run({user_id: "admin"})
5. /var/www/html/lib/public/BackgroundJob/QueuedJob.php line 48
   OCP\BackgroundJob\Job->execute(OC\BackgroundJob\JobList {}, OC\Log {})
6. /var/www/html/cron.php line 127
   OCP\BackgroundJob\QueuedJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})

at 2020-10-30T10:16:13+00:00

I run Nextcloud 10.0.2 in a Docker container (nextcloud:10-apache) with SQLite backend.
The folder is a Google Drive shared folder (someone else shared it with me), but I have Editor rights (read, write and delete files).

Since then, Nextcloud import reports 50 files imported (0%). The figures have not changed since a couple hours.

Also, when I connected my Google account, I accepted only the Drive permissions, as I have no intent to import contacts/calendar and photos — actually, my initial intent is to import/download only one folder and its whole content, not my entire Drive files (mix of personal, private and professional files).

Image previews from imported contacts not showing

After installing this app on my Nextcloud 20.0.4 instance and using it to import my contacts 3.4.2, I noticed than none of my contacts photos was showing on the contact list, at least not until I opened that specific contact, and also after refreshing it was gone again.

So after some research I found this github issue on contacts app where the same thing was happening, more specifically this comment.

So it seems that the version used on the PHOTO field of the vCard does not match its version. Afer looking at the expected PHOTO field and comparing it to the one generated by this app, I found that replacing

$b64Photo = base64_encode($photoFile['content']);

with

$b64Photo = stripslashes('data:image/' . strtolower($type) . ';base64\,') . base64_encode($photoFile['content']);

does the trick, and now the previews are showing again. There's probably a better way to do this, but I don't know PHP so I am not able to think of it

Unlimited quotas blocks imports

For users with unlimited quotas, -2B is reported as free space which keeps user from importing data.
Tested this issue by giving user a large enough quota, which solves the problem.

Error installing

There is the error message "Could not download app integration_google" upon attempting to download the app from the app store.

Admin Logging is as follows:

Exception: Could not download app integration_google/var/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php - line 445:OC\Installer->downloadApp("integration_google")/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 169:OCA\Settings\Controller\AppSettingsController->enableApps([ "integration_google"], [])/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 100:OC\AppFramework\Http\Dispatcher->executeController(OCA\Settings ... {}, "enableApps")/var/www/nextcloud/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch(OCA\Settings ... {}, "enableApps")/var/www/nextcloud/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main("OCA\\Settin ... r", "enableApps", OC\AppFramew ... {}, { action: nu ... "})/var/www/nextcloud/lib/base.php - line 1009:OC\Route\Router->match("/settings/apps/enable")/var/www/nextcloud/index.php - line 37:OC::handleRequest()

There is a warning prior to the error as follows:

Could not connect to appstore: cURL error 28: Connection timed out after 120001 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

Is there something I'm missing at all?

Error with Google Photo

{"reqId":"d3sVyJhXtBtjunMr9PGT","level":2,"time":"2020-10-02T15:13:16+00:00","remoteAddr":"x","user":"x","app":"integration_google","method":"GET","url":"/apps/integration_google/photo-number","message":"Google API error : Client error: GET https://photoslibrary.googleapis.com/v1/mediaItems?pageSize=100 resulted in a 403 Forbidden response:\n{\n "error": {\n "code": 403,\n "message": "Photos Library API has not been used in project 152656787343 before or i (truncated...)\n","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","version":"20.0.0.8"}

Allow importing Google Calendars as subscriptions

I'm not sure when exactly this should be offered. There are a couple scenarios I can think of:

  • You own the calendar
  • You don't own the calendar, but you have write access (presumably because it's a Google Calendar that someone else shared with you)
  • You subscribed to the calendar in the Google Calendar UI

The last one seems like a great candidate for this feature. The others I'm not so sure. Maybe both options (import wholesale or subscription) should be offered? If you still expect the calendar to be modified on the Google Calendar side then this would be useful.

(As an example, maybe the calendar in the second scenario above changes frequently, but you almost never need to modify it so it'd be helpful to have it show up in your Nextcloud even if it's read-only. Or maybe you own the calendar, but it's shared with other people who won't migrate off Google Calendar, so the authoritative copy has to stay on Google Calendar.)

Google connection succeeded but with an error...

Hi,

can someone help me ? i got always this error:
Fehler beim Abrufen der Google Drive-Informationen: "ServerException|ClientException, message:Client error: GET https:\/\/www.googleapis.com\/drive\/v3\/about?fields=%2A resulted in a 403 Forbidden response:\n{\n "error": {\n "errors": [\n {\n "domain": "usageLimits",\n "reason": "accessNotConfigured",\n "message": "Acces (truncated...)\n status code: 403"✖

i can not find my mistake..

Warning: Google API error downloading photo

Is there any way to diagnose this error more accurately? The file with the same name shows up without a problem and can be downloaded using the photos.google.com interface.

[integration_google] Warning: Google API error downloading photo IMG_0031.MOV : Unknown error: Unable to read from stream

at 2021-01-28T20:05:35+00:00

Issue with reverse proxy

Failed to import Google calendar: 502 Proxy Error Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the requestReason: Error reading from remote server Apache/2.4.25 (Raspbian) Server at mynextcloud.myserver.com Port 443

Import Location History to nextcloud maps

Nextcloud maps is able to import the location history "Standortverlauf" form google takeout.
I think it would be nice to offer the direct import, if the google api is allowing for this.
I'm happy to help with the nextcloud maps part.

Error: OCP\Lock\LockedException during import

I keep more or less randomly hitting a LockedException while importing my Google Photos albums. Here's an example from the log:

[core] Error: OCP\Lock\LockedException: "Google Photos/Siggraph 2008/siggraph_2008_060.jpg" is locked at <<closure>>

0. /var/www/html/lib/private/Files/View.php line 1156
   OC\Files\View->changeLock("/kusma/files/Go ... g", 2)
1. /var/www/html/lib/private/Files/View.php line 1001
   OC\Files\View->basicOperation("fopen", "/kusma/files/Go ... g", ["write"], "w")
2. /var/www/html/lib/private/Files/Node/File.php line 115
   OC\Files\View->fopen("/kusma/files/Go ... g", "w")
3. /var/www/html/custom_apps/integration_google/lib/Service/GooglePhotosAPIService.php line 364
   OC\Files\Node\File->fopen("w")
4. /var/www/html/custom_apps/integration_google/lib/Service/GooglePhotosAPIService.php line 277
   OCA\Google\Service\GooglePhotosAPIService->getPhoto("REDACTED", "kusma", {id: "AEWD2uhjex ... "}, OC\Files\Node\Folder {})
5. /var/www/html/custom_apps/integration_google/lib/Service/GooglePhotosAPIService.php line 155
   OCA\Google\Service\GooglePhotosAPIService->importPhotos("REDACTED", "kusma", "Google Photos", 500000000, 0)
6. /var/www/html/custom_apps/integration_google/lib/BackgroundJob/ImportPhotosJob.php line 36
   OCA\Google\Service\GooglePhotosAPIService->importPhotosJob("kusma")
7. /var/www/html/lib/public/BackgroundJob/Job.php line 80
   OCA\Google\BackgroundJob\ImportPhotosJob->run({user_id: "kusma"})
8. /var/www/html/lib/public/BackgroundJob/QueuedJob.php line 48
   OCP\BackgroundJob\Job->execute(OC\BackgroundJob\JobList {}, OC\Log {})
9. /var/www/html/cron.php line 127
   OCP\BackgroundJob\QueuedJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})

at 2020-12-31T19:45:58+00:00

This is using Nextcloud 20.0.3, running in Docker, importing into a data directory located on an EXT4 filesystem on a sofware RAID5 array.

This seems to happen regardless of how the background tasks are run, I've tried both AJAX and cron, both with actual cron-jobs and with manually running the cron-job to avoid issues of concurrent runs. Re-running the cron.php script just fails right away once it's failed. If I cancel the import from the UI and retry, I get progress from start again, and problems occur at some random point later on.

Error with google contact

{"reqId":"74Xjv01O7NcQMStxwqwg","level":2,"time":"2020-10-02T15:13:16+00:00","remoteAddr":"x","user":"x","app":"integration_google","method":"GET","url":"/apps/integration_google/contact-number","message":"Google API error : Client error: GET https://people.googleapis.com/v1/people/me/connections?personFields=names&pageSize=100 resulted in a 403 Forbidden response:\n{\n "error": {\n "code": 403,\n "message": "People API has not been used in project 152656787343 before or it is dis (truncated...)\n","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","version":"20.0.0.8"}

Calendar Timezone display issue

First - Thank you for this! I have been struggling with how to tie Google Calendar to NextCloud, and most of the previous ways were messy and fragile.

Second, I am using v0.0.9 of the app on v20.0.1 of NextCloud running from Linuxserver.io docker container, version-20.0.0. I followed the nicely detailed directions on setting up the connections, and that is all working. I went to import my first calendar, and it appears in my NextCloud Calendar 2.1.2 app fine, except that the time is displayed 5 hours early. I can select an entry, and see that it is in the correct timezone (CDT, America/Chicago). My docker image is running UTC, and the calendar is displaying the correct time.

Thoughts on what I need to adjust?

Thanks!

Authorization Error on attempt to connect to Google

I followed all the instructions, and try to connect, but am presented with this from Google (personal info redacted:

Authorization Error
Error 403: access_denied
The developer hasn’t given you access to this app. It’s currently being tested and it hasn’t been verified by Google. If you think you should have access, contact the developer (my_email_address).
Learn more
Request Details

    access_type=offline
    response_type=code
    redirect_uri=https://mynexclouddomain/index.php/apps/integration_google/oauth-redirect
    state=clqcx7nv8j
    prompt=consent
    client_id=myclientid
    scope=openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/calendar.readonly https://www.googleapis.com/auth/calendar.events.readonly https://www.googleapis.com/auth/contacts.readonly https://www.googleapis.com/auth/photoslibrary.readonly https://www.googleapis.com/auth/drive.readonly

I get multiple notifications about importing Google Drive files every time I turn my computer on

I recently used this to import all my data from Google - it worked great! But I now get notifications about Nextcloud successfully importing Google Drive files every time I turn my computer on (and then throughout the day too, I guess every time Nextcloud Desktop checks it's in sync). I'm not sure if this is an issue with this Google Integration app or with the Desktop Client, but I'd rather not get notifications telling me the exact same thing over and over again :)

Data Migration stuck

Is there some limit? Is it working on some giant video? What queries can I run to check what it's doing? I do not receive a 429 from google in data/nextcloud.log. The word google doesn't appear there so I can't determine the status of what the app is doing.

Allowed memory size of xxx bytes exhausted

I encounter this error when I run an export with v0.0.11.

[PHP] Error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 798611624 bytes) at /var/www/html/3rdparty/guzzlehttp/psr7/src/Stream.php#92

at 2020-11-01T14:24:08+00:00

Sadly I do not have more informations to provide. But the export does not proceed further.

Nextcloud system report these figures:

  • Version : 7.4.12
  • Limite de mémoire : 512 MB
  • Temps d’exécution maximal : 3600
  • Taille de téléversement maximale : 2 MB

Operation timed out after 30001 milliseconds with 0 bytes received

For some reasons, timeouts happen:

[core] Error: GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) at <<closure>>

 0. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 155
    GuzzleHttp\Handler\CurlFactory::createRejection(GuzzleHttp\Handl ... l}, {errno: 28,error ... "})
 1. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 105
    GuzzleHttp\Handler\CurlFactory::finishError(GuzzleHttp\Handler\CurlHandler {}, GuzzleHttp\Handl ... l}, GuzzleHttp\Handler\CurlFactory {})
 2. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php line 43
    GuzzleHttp\Handler\CurlFactory::finish(GuzzleHttp\Handler\CurlHandler {}, GuzzleHttp\Handl ... l}, GuzzleHttp\Handler\CurlFactory {})
 3. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php line 28
    GuzzleHttp\Handler\CurlHandler->__invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 4. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php line 51
    GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}("*** sensitive parameters replaced ***")
 5. /var/www/html/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php line 37
    GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}("*** sensitive parameters replaced ***")
 6. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 29
    GuzzleHttp\PrepareBodyMiddleware->__invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 7. /var/www/html/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php line 70
    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
 8. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 59
    GuzzleHttp\RedirectMiddleware->__invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 9. /var/www/html/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php line 71
    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
10. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php line 361
    GuzzleHttp\HandlerStack->__invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
11. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php line 163
    GuzzleHttp\Client->transfer("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
12. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php line 183
    GuzzleHttp\Client->requestAsync("get", GuzzleHttp\Psr7\Uri {}, {verify: "/var/w ... }})
13. /var/www/html/lib/private/Http/Client/Client.php line 233
    GuzzleHttp\Client->request("get", "https://www.goo ... n", {verify: "/var/w ... e})
14. /var/www/html/custom_apps/integration_google/lib/Service/GoogleAPIService.php line 290
    OC\Http\Client\Client->get("https://www.goo ... n", {save_to: "/tmp/ ... }})
15. /var/www/html/custom_apps/integration_google/lib/Service/GoogleDriveAPIService.php line 330
    OCA\Google\Service\GoogleAPIService->simpleDownload("ya29.a0AfH6SMBu ... V", "admin", "https://www.goo ... n", "/tmp/oc_tmp_ny8ir5", {mimeType: "appl ... "})
16. /var/www/html/custom_apps/integration_google/lib/Service/GoogleDriveAPIService.php line 215
    OCA\Google\Service\GoogleDriveAPIService->getFile("ya29.a0AfH6SMBu ... V", "admin", {kind: "drive#fi ... }}, {1d0KsPmWYAZlMym ... }}, OC\Files\Node\Folder {})
17. /var/www/html/custom_apps/integration_google/lib/Service/GoogleDriveAPIService.php line 129
    OCA\Google\Service\GoogleDriveAPIService->importFiles("ya29.a0AfH6SMBu ... V", "admin", "Importation de Google Drive", 500000000, 108)
18. /var/www/html/custom_apps/integration_google/lib/BackgroundJob/ImportDriveJob.php line 36
    OCA\Google\Service\GoogleDriveAPIService->importDriveJob("admin")
19. /var/www/html/lib/public/BackgroundJob/Job.php line 80
    OCA\Google\BackgroundJob\ImportDriveJob->run({user_id: "admin"})
20. /var/www/html/lib/public/BackgroundJob/QueuedJob.php line 48
    OCP\BackgroundJob\Job->execute(OC\BackgroundJob\JobList {}, OC\Log {})
21. /var/www/html/cron.php line 127
    OCP\BackgroundJob\QueuedJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})

at 2020-11-02T13:56:41+00:00

Sounds like there is a backoff plugin to deal with this with very little pain.

What do you think?

Impossible to refresh the token

I've connected the integration to my Google account, but after some days, it stops working. When I go to the data migration page, I don't see my documents/photos/contacts/... sections on the page, but get a blank page where my only option is to disconnect from Google, and some transient warnings about not being able to refresh the token:

image

I can disconnect, and reconnect, and everything looks right again:

image

But this only lasts for a couple of days, weeks? Eventually it will break again at some point, for reasons unknown.

Google Drive Sync fails to sync on files

Nextcloud v21

Docker Setup with Redis & Cron running

I'm trying to import a Google Drive and I receive plenty of errors like this one

image

Hence, not all files are imported. Anything I can do here?

Calendar sync not working Nextcloud - google

Google integration and Google oauth is installed and tested.
Together with Deck, Tasks and Apointments this is a genious feature.
This works:
Manually import / fetch activities FROM google TO Nextcloud calandar.
This works NOT:
Manually import /send activities FROM Nextcloud calandar TO google calandar.

Automatic calandar syncing doesnt work at all.

Is it an idea to create an integrated calendar app inside Nextcloud iOS og Android client - and let google calendar /outlook on river?
Ive tried DAVx and Tasks / Etar calendar but that doesnt sync properly.

Any comments?

On import, set modified date to EXIF data (date photo taken)

Since importing Google Photo into NC implies most of the time importing a library of photos, wouldn't be better to keep the modified date as the taken date so it's possible to sort photos by date? Further uploads (e.g. from NC phone app) should not be much of a problem since most of the time pictures will be uploaded at a time near taken date.

Reduced quality importing photos from google photos

I don't know if any of you are experiencing this same error or if it is a limitation that Google puts.
The error I'm having and the following on my Google Photos I signed the 100 gb plan and the photos that went there and in the original resolution, but what happens to Nextcloud to import the albums with such photos, they come with the size and quality reduced, example:
In google photos a certain photo says it is 16 mb when importing to Nextcloud it appears with 5 MB;
A certain album that I downloaded via Google Takeout has 1 Gb when importing into Nextcloud it appears as 400 mb.
The import was already finished and the photos continue like this even though I had them imported again, so I decided to do another test download via Rclone and the same error happens

The value {amount} in the text string

Does this {amount} in the text string represent a numeric value?

{{ t('integration_google', '{amount} Google contacts', { amount: nbContacts }) }}

{{ t('integration_google', '{amount} Google photos (>{formSize})', { amount: nbPhotos, formSize: humanFileSize(estimatedPhotoCollectionSize, true) }) }}

{{ t('integration_google', '{amount} photos imported', { amount: nbImportedPhotos }) }}

If so, the "contacts" and "photos" should be singular and plural.

Google Drive imports don't preserve dates

Similar to #42 - in Google Drive, I see the creation, modification and last access date of my documents. These dates are not preserved when importing into NextCloud. While I don't care about the last access date, creation and last modification dates are somewhat important. Assuming a fix is forthcoming for #42, I propose to apply that fix to the Document import as well, if possible.

Google Drive:

image

NextCloud, after import:

image

Unable to import anything

Hello everyone,

I've installed this app just fine to nextcloud. I've generated Google Client ID/Secret from the project i already had on google and imported it.
I successfully connected my google account to nextcloud however when i try to import photos or files from drive, it just gets stuck at 0% and 0 files/photos.

Contact import was successful but not Photos and Files.

I'm using NextCloud 20.0.2 on CentOS 8 with PHP7.4.

Any help would be greatly appreciated .

Google Error

Dear, I can't do much with this message. What exactly does it mean? Thank you very much. Best regards and stay healthy. Neo

Fehler beim Abrufen der Kalender-Liste: "Client error: GET https:\/\/www.googleapis.com\/calendar\/v3\/users\/me\/calendarList resulted in a 403 Forbidden response:\n{\n "error": {\n "code": 403,\n "message": "Google Calendar API has not been used in project 838129323555 before or (truncated...)\n"✖Fehler beim Abrufen der Google Drive-Informationen: "Client error: GET https:\/\/www.googleapis.com\/drive\/v3\/about?fields=%2A resulted in a 403 Forbidden response:\n{\n "error": {\n "errors": [\n {\n "domain": "usageLimits",\n "reason": "accessNotConfigured",\n "message": "Acces (truncated...)\n"✖Fehler beim Abrufen der Anzahl der Google-Kontakte: "Client error: GET https:\/\/people.googleapis.com\/v1\/people\/me\/connections?personFields=names&pageSize=100 resulted in a 403 Forbidden response:\n{\n "error": {\n "code": 403,\n "message": "People API has not been used in project 838129323555 before or it is dis (truncated...)\n"✖Fehler beim Abrufen der Anzahl der Google-Fotos: "Client error: GET https:\/\/photoslibrary.googleapis.com\/v1\/mediaItems?pageSize=100 resulted in a 403 Forbidden response:\n{\n "error": {\n "code": 403,\n "message": "Photos Library API has not been used in project 838129323555 before or i (truncated...)\n"

Export "Google documents" whenever it is possible

A "Google Document" (collaborative) cannot be downloaded, but they can be exported to various formats.

Google Documents can be "exported" via the Files: export API. I used application/vnd.openxmlformats-officedocument.wordprocessingml.document as a MIME-Type to export a Google Doc into a .docx document.

So when a kind drive#file as a mimeType of application/vnd.google-apps.spreadsheet, application/vnd.google-apps.document or application/vnd.google-apps.presentation, they should be "exported" to a default format — could be .xlsx, .docx or .pptx (depend if you make it a user option, or set a hardcoded default).

Bug: Importing certain calenders results in "requires Javascript" error

As with #11 it seems like this bug is still affecting the latest version of the app.
I'm also getting tons of errors with photos import & calendar import.
Some calendars imported fine (secondary calendars) but other calendars (main personal calendars) did not.

In the WebUI I'm still getting this bug This application requires JavaScript for correct operation. Please enable JavaScript and reload the page when trying to import calendars. In the Nextcloud logs I'm seeing all types of errors.

Nextcloud version: 20.0.1.1
google_plugin_version: 0.15
Ubuntu 20.04LTS on LXC
OS HDD size: 8GB
Nextcloud_data_hdd: 50GB

Nextcloud related log message:
Calendar error(s)

PostgresSQL error

{"reqId":"2mWfZKDbkHjjwpJWqtlJ","level":3,"time":"2020-11-07T02:15:49+00:00","remoteAddr":"1.2.3.4","user":"jesse","app":"index","method":"GET","url":"/index.php/apps/integration_google/import-calendar?calId=email%40gmail.com&calName=email%40gmail.com&color=%239fc6e7","message":{"Exception":"Doctrine\\DBAL\\Exception\\DriverException","Message":"An exception occurred while executing 'INSERT INTO \"oc_calendarobjects_props\" (\"calendarid\", \"calendartype\", \"objectid\", \"name\", \"parameter\", \"value\") VALUES(?, ?, ?, ?, ?, ?)' with params [18, 0, 2739, \"DESCRIPTION\", null, \"Hello Jesse,\\\\n\\\\n\\\\nThanks for your continue interest in CompanyX and the Application Developer role.\\\\n\\\\n\\\\nYou will be meeting with the following individuals tomorrow at 4pm.\\\\n\\\\n\\\\nLead, Application Developer \\u2013 Clark Kent\\\\nTechnical Lead \\u2013 G\"]:\n\nSQLSTATE[22001]: String data, right truncated: 7 ERROR:  value too long for type character varying(255)","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":169,"function":"convertException","class":"Doctrine\\DBAL\\Driver\\AbstractPostgreSQLDriver","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":149,"function":"wrapException","class":"Doctrine\\DBAL\\DBALException","type":"::"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1071,"function":"driverExceptionDuringQuery","class":"Doctrine\\DBAL\\DBALException","type":"::"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":214,"function":"executeUpdate","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":209,"function":"executeUpdate","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":217,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php","line":2619,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php","line":1117,"function":"updateProperties","class":"OCA\\DAV\\CalDAV\\CalDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/integration_google/lib/Service/GoogleCalendarAPIService.php","line":167,"function":"createCalendarObject","class":"OCA\\DAV\\CalDAV\\CalDavBackend","type":"->"},{"file":"/var/www/nextcloud/apps/integration_google/lib/Controller/GoogleAPIController.php","line":229,"function":"importCalendar","class":"OCA\\Google\\Service\\GoogleCalendarAPIService","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"importCalendar","class":"OCA\\Google\\Controller\\GoogleAPIController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1009,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php","Line":79,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDOException","Message":"SQLSTATE[22001]: String data, right truncated: 7 ERROR:  value too long for type character varying(255)","Code":"22001","Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1062,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDOStatement","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":214,"function":"executeUpdate","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":209,"function":"executeUpdate","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":217,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php","line":2619,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php","line":1117,"function":"updateProperties","class":"OCA\\DAV\\CalDAV\\CalDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/integration_google/lib/Service/GoogleCalendarAPIService.php","line":167,"function":"createCalendarObject","class":"OCA\\DAV\\CalDAV\\CalDavBackend","type":"->"},{"file":"/var/www/nextcloud/apps/integration_google/lib/Controller/GoogleAPIController.php","line":229,"function":"importCalendar","class":"OCA\\Google\\Service\\GoogleCalendarAPIService","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"importCalendar","class":"OCA\\Google\\Controller\\GoogleAPIController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1009,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php","Line":129,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[22001]: String data, right truncated: 7 ERROR:  value too long for type character varying(255)","Code":"22001","Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php","line":127,"function":"execute","class":"PDOStatement","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1062,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDOStatement","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":214,"function":"executeUpdate","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":209,"function":"executeUpdate","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":217,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php","line":2619,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php","line":1117,"function":"updateProperties","class":"OCA\\DAV\\CalDAV\\CalDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/integration_google/lib/Service/GoogleCalendarAPIService.php","line":167,"function":"createCalendarObject","class":"OCA\\DAV\\CalDAV\\CalDavBackend","type":"->"},{"file":"/var/www/nextcloud/apps/integration_google/lib/Controller/GoogleAPIController.php","line":229,"function":"importCalendar","class":"OCA\\Google\\Service\\GoogleCalendarAPIService","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"importCalendar","class":"OCA\\Google\\Controller\\GoogleAPIController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1009,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php","Line":127}},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"20.0.1.1","id":"5fa61b8ea4a80"}

this is from a calendar shared to my google account from gsuite account

{"reqId":"NI8PpKLaiuXLZhrqG3v6","level":3,"time":"2020-11-07T02:11:53+00:00","remoteAddr":"1.2.3.4","user":"jesse","app":"PHP","method":"GET","url":"/index.php/apps/integration_google/import-calendar?calId=email%example.com&calName=email%example.com&color=%2342d692","message":{"Exception":"Error","Message":"Undefined variable: created at /var/www/nextcloud/apps/integration_google/lib/Service/GoogleCalendarAPIService.php#107","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/integration_google/lib/Service/GoogleCalendarAPIService.php","line":107,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/apps/integration_google/lib/Controller/GoogleAPIController.php","line":229,"function":"importCalendar","class":"OCA\\Google\\Service\\GoogleCalendarAPIService","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"importCalendar","class":"OCA\\Google\\Controller\\GoogleAPIController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1009,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":91,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"20.0.1.1","id":"5fa61b8ea4b90"}

Caldev error?

{"reqId":"iBxBHknoi2plRoK7l8vB","level":4,"time":"2020-11-07T02:04:12+00:00","remoteAddr":"1.2.3.4","user":"jesse","app":"webdav","method":"PUT","url":"/remote.php/dav/addressbooks/users/jesse/contacts/goog153","message":{"Exception":"Sabre\\DAV\\Exception\\UnsupportedMediaType","Message":"Validation error in vCard: ENCODING parameter is not valid in vCard 4.","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/CardDAV/Plugin.php","line":282,"function":"validateVCard","class":"Sabre\\CardDAV\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeWriteContent","class":"Sabre\\CardDAV\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1139,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":515,"function":"updateFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":325,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":167,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/3rdparty/sabre/dav/lib/CardDAV/Plugin.php","Line":376,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"20.0.1.1","id":"5fa61b8ea4c48"}

Photos error(s):

{"reqId":"ofCshcW8p1J1WqxYuWHr","level":3,"time":"2020-11-07T02:49:47+00:00","remoteAddr":"1.2.3.4","user":"jesse","app":"PHP","method":"GET","url":"/index.php/apps/integration_google/photo-number","message":{"Exception":"Error","Message":"Undefined index: mediaItems at /var/www/nextcloud/apps/integration_google/lib/Service/GooglePhotosAPIService.php#67","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/integration_google/lib/Service/GooglePhotosAPIService.php","line":67,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/apps/integration_google/lib/Controller/GoogleAPIController.php","line":118,"function":"getPhotoNumber","class":"OCA\\Google\\Service\\GooglePhotosAPIService","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"getPhotoNumber","class":"OCA\\Google\\Controller\\GoogleAPIController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1009,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":91,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"20.0.1.1","id":"5fa61b8ea4589"}

quota error

{"reqId":"DJCADohKswT3ktIF9nLA","level":2,"time":"2020-11-07T02:16:26+00:00","remoteAddr":"1.2.3.4","user":"jesse","app":"integration_google","method":"GET","url":"/index.php/apps/integration_google/photo-number","message":"Google API error : Client error: `GET https://photoslibrary.googleapis.com/v1/mediaItems?pageSize=100&pageToken=XXXXXXXXXblahblahHERExxxxxxxxxxx` resulted in a `429 Too Many Requests` response:\n{\n  \"error\": {\n    \"code\": 429,\n    \"message\": \"Quota exceeded for quota metric 'Read requests' and limit 'Read requests (truncated...)\n","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","version":"20.0.1.1","id":"5fa61b8ea48a9"}

Other things I'm worried about is the fact my photos are 10GB+ and drive/docs data is 10GB+ but my main hdd is only 8GB. From what i read somewhere /tmp folder is used to copy data over. If the migration waits until all data is copied from google before moving over to nextcloud_data (hdd is 50GB) then it'll never work.

Photos import question.

Not sure if this is intended or not, but when I try importing from Google Photos, it only imports those photos I have placed in albums. I was just wondering if it is possible to import all photos, even those that are not in an album.

Not all files are imported from Google Drive

Ignore shared files: On.
Start of import: 957 files on Google Drive (10 GiB)
End of import: 422 files was imported from Google Drive.
Result is: Some (sub)folders created and empty, some (sub)folders are synced, pretty random pattern. Size of Google Drive import folder is 2.6 GB.

I have grep of nextcloud.log integration_google with loglevel 1, but nothing suspect... :-(

OAuth2 Error: redirect_uri_mismatch Bad Request

Hi,

I need some help with the OAuth2 authorization process, because I've been trying to set it up for days and I can't realize what I'm doing wrong. I installed the plugin at version 0.0.5 and have since updated to 0.0.7, without ever being able to log in my account (or anyone else in my organization)

The error I get is the following:

Google connection error: Error getting OAuth access token. Client error: POST https://oauth2.googleapis.com/token resulted in a 400 Bad Request response: { "error": "redirect_uri_mismatch", "error_description": "Bad Request" }

At first I though it was a simple error and that I made a mistake in Google API Console, when I set up the credentials, even though I followed the given hints exactly, and I have created Google API credentials in the past without problems.

I will try to include as many details as I can. Nextcloud is installed with a docker-compose configuration, alongside nginx, certbot and mariadb, at it's own subdomain, so there is only https access - http is redirected to https - at nextcloud.domain.tld.

In Google APIs I created the credentials and used https://nextcloud.domain.tld for Authorized JavaScript origins and https://nextcloud.domain.tld/apps/integration_google/oauth-redirect for Authorized redirect URIs.
I enabled the specified APIs.
At Oauth Consent Screen, Authorized domains contains just domain.tld. I added all the scopes the used APIs provided. This is the only thing I did that is not mentioned in the hints, but I tried without adding the scopes too and it didn't make a difference.
I have entered the correct Client ID and Client Secret in the app's settings in nextcloud.

So, when I press the "Connect to Google" button, I see a GET request at https://accounts.google.com/o/oauth2/v2/auth?client_id={{my-client-id}}&redirect_uri=https://nextcloud.domain.tld/apps/integration_google/oauth-redirect&response_type=code&access_type=offline&prompt=consent&state=fiyzu71f1j&scope=openid profile https://www.googleapis.com/auth/calendar.readonly https://www.googleapis.com/auth/calendar.events.readonly https://www.googleapis.com/auth/contacts.readonly https://www.googleapis.com/auth/photoslibrary.readonly https://www.googleapis.com/auth/drive.readonly. The redirect_uri in the GET request is EXACTLY the same as in Authorized redirect URIs in Google API Console. Despite that, I get the error I mentioned above.

I have tried adding the redirect uri with and without a trailing slash '/' and using https and http, but none worked and I think it shouldn't have anyways, since I use only https and the redirect_uri in the GET request doesn't have a trailing slash, so the correct one must be the one I currently use.

I tried waiting half a day before trying to sign in, to see if I just had to wait for Google APIs syncing the changes in the project, but that didn't help either.

Do you have any suggestions? How can I proceed to debug the error?

Thanks in advance.

Calendars imported several times / Undeletable Calendars

Hi,

I used very early versions of this add-on and have successfully imported calendars. BUT:

Back then, instead of just importing the calendar I clicked on, all calendars were imported. Trying to fix errors, I clicked on another calendar to import - and now I have calendars twice. Also, I can't delete them over the web interface.

How do I get rid of the calendars I got twice / don't want but can't delete?

TIA!

l10n: Add singular and plural

I propose to add singular and plural variation for a text string:

  • {number} contacts successfully imported in {name}
  • {number} events successfully imported in {name}
  • {number} photos successfully imported in {targetPath}

in the file: components/PersonalSettings.vue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.