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

0 files imported (0%) #162

Closed
enekux opened this issue Dec 1, 2023 · 10 comments
Closed

0 files imported (0%) #162

enekux opened this issue Dec 1, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@enekux
Copy link

enekux commented Dec 1, 2023

Which version of integration_google are you using?

2.1.0

Which version of Nextcloud are you using?

v27.1.4

Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.

No response

Describe the Bug

Google Drive is not syncing and it shows "0 files imported (0%)"

Expected Behavior

To sync all files

To Reproduce

Connect with a Google Account which has access to all the required APIs and sync

@enekux enekux added the bug Something isn't working label Dec 1, 2023
Copy link

github-actions bot commented Dec 1, 2023

Hello 👋

Thank you for taking the time to open this issue with integration_google. I know it's frustrating when software
causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at
and if possible solved.
We try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until we get to it.
Until then, please be patient.
Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation
to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can
collaborate to make this software better. For everyone.
Thus, if you can, you could also look at other issues to see whether you can help other people with your knowledge
and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and
try to fix the odd bug yourself. Everyone will be thankful for extra helping hands!
One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum,
to twitter or somewhere else. But this is a technical issue tracker, so please make sure to
focus on the tech and keep your opinions to yourself. (Also see our Code of Conduct. Really.)

I look forward to working with you on this issue
Cheers 💙

@enekux
Copy link
Author

enekux commented Dec 4, 2023

the only error message I get in the nextcloud.log is the next:

{"reqId":"GmzweUJzBGHofXLUyEvO","level":2,"time":"2023-12-04T11:47:02+00:00","remoteAddr":"10.10.253.1","user":"f55fd350-3356-11ec-946c-a2e9d659703a","app":"integration_google","method":"GET","url":"/apps/integration_google/photo-number","message":"Google API error getting media items list to get photo number, no \"mediaItems\" key in []","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36","version":"27.1.4.1","data":{"app":"integration_google"}}

@cylon56
Copy link

cylon56 commented Jan 2, 2024

I'm experiencing the same bug. I can import Google contacts but Drive and Photo imports are still at 0%. I would love to get some answers on how to resolve it.

@brendanknights
Copy link

same here, same behaviour.
Google Contacts import fine, Calendar import fine
Photos and Drive stays at 0%

@luispinho
Copy link

I was having the same issue but managed to get it working, turns out my configuration for running Cron jobs was off. Now that I set system Cron and made the it run every 5 minutes (according to the docs) the Google Photos import started. Here's some info from the official Nextcloud documentation on background jobs. Also, if you're running inside Docker, you'll need to set the Cron job on the host machine.

@brendanknights
Copy link

I was having the same issue but managed to get it working, turns out my configuration for running Cron jobs was off. Now that I set system Cron and made the it run every 5 minutes (according to the docs) the Google Photos import started. Here's some info from the official Nextcloud documentation on background jobs. Also, if you're running inside Docker, you'll need to set the Cron job on the host machine.

Thanks Luis - you caused me to have another go at making sure my cron configs were correct. Took a little while to get working, but this is working on ubuntu server 22.04
*/5 * * * * /usr/bin/php8.1 -f /var/www/nextcloud/cron.php --define apc.enable_cli=1

I believe that I also needed to add the [acpu] declaration to the php.ini.
/etc/php/8.1/cli/php.ini
append to file:
[APCu]
apc.enable_cli=1

My Drive sync is now working very slowly, though photo import is not. Maybe there are API limits...

@luispinho
Copy link

Can confirm import is also taking some time for me, it's been around 5-6h and it imported about 7400 files (totalling 23GB). Very likely API restrictions indeed

@VeerNagda
Copy link

I also had the same issue. The way to start importing is to call background task explicitly using terminal. I noticed a single background job downloads around 200 photos.

Steps to run job

  1. alias occ="sudo -u www-data php /var/www/nextcloud/occ"
  2. occ background:list
  3. Find id for OCA\Google\BackgroundJob\ImportPhotosJob
  4. occ background:execute

Screenshot 2024-04-16 113927
image

@VeerNagda
Copy link

VeerNagda commented Apr 17, 2024

When a task is manually initiated, a new task is scheduled immediately after completion. However, if the task is run automatically via cron, a new task is not generated for the next iteration upon completion.
image
image

@marcelklehr
Copy link
Member

If the job is not rescheduled you should check the nextcloud log for errors, it will only be rescheduled if it was successful

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

No branches or pull requests

6 participants