nextcloud / integration_dropbox

🧊 Dropbox integration into Nextcloud
GNU Affero General Public License v3.0
24 stars 10 forks source link

Data import from Dropbox incomplete #17

Closed Medius7 closed 6 months ago

Medius7 commented 2 years ago

Hi :-)

Thanks for the App.

I connected my ~ 20 GB Dropbox.

My nextcloud is hosted in a professionell server location (hetzner = fast connected).

How long does the data import take?

After many hours now, in my nextcloud are 7 GB imported data from dropbox. Is there a log? I did not see any messages from the app (where I could see them?). Due to the given gigabit-connection, I expected an import time of some minutes ;-)

How to debug? How to get informations about the import process?

Medius7 commented 2 years ago

Any ideas? Two days later, it's still incomplete (at 7,5 GB).

Medius7 commented 2 years ago

I've given up for almost a week now. I deleted the app and did the migration manually.

Jolg42 commented 1 year ago

It looks like someone has the same issue in https://github.com/julien-nc/integration_dropbox/issues/13

I also have this issue on hetzner's https://www.hetzner.com/storage/storage-share No logs at https://instance.domain/settings/admin/logging and import is stuck after 4GB imported.

I canceled the import, disconnected, created a Dropbox app and added the app ID and secret to: https://instance.domain/settings/admin/connected-accounts and tried again, now let's see if that changes anything 🤞🏼

montchr commented 1 year ago

Same here, also on Hetzner Storage Share.

@Jolg42 did creating a custom Dropbox app help?

Jolg42 commented 1 year ago

I tried that, but it didn't help for me, so I abandoned. Try it, maybe it works for you with a newer version?

s-frei commented 1 year ago

Same problem here. I also use the Storage Share from Hetzner. I reached out to them and I got told there are some errors from the Dropbox API:

Jul 18 00:12:23 Dropbox API error : Client error: `POST https://api.dropboxapi.com/2/files/get_temporary_link` resulted in a `409 Conflict` response:\n{\"error_summary\": \"not_allowed/..\", \"error\": {\".tag\": \"not_allowed\"}}\n
Jul 18 00:12:23 Dropbox error downloading file my-vid-1.mp4 : Client error: `POST https://api.dropboxapi.com/2/files/get_temporary_link` resulted in a `409 Conflict` response:\n{\"error_summary\": \"not_allowed/..\", \"error\": {\".tag\": \"not_allowed\"}}\n
Jul 18 00:12:23 Dropbox error deleting file my-vid-1.mp4
Jul 18 09:02:57 Dropbox API error : Client error: `POST https://api.dropboxapi.com/2/files/get_temporary_link` resulted in a `409 Conflict` response:\n{\"error_summary\": \"not_allowed/.\", \"error\": {\".tag\": \"not_allowed\"}}\n
Jul 18 09:02:57 Dropbox error downloading file my-vid-2.mp4 : Client error: `POST https://api.dropboxapi.com/2/files/get_temporary_link` resulted in a `409 Conflict` response:\n{\"error_summary\": \"not_allowed/.\", \"error\": {\".tag\": \"not_allowed\"}}\n
Jul 18 09:02:57 Dropbox error deleting file my-vid-2.mp4

For research purpose and since I'm unfortunately not into PHP the logging lines of code:

The Dropbox API called is https://www.dropbox.com/developers/documentation/http/documentation#files-get_temporary_link where stated:

Example: not_allowed

{
   "error": {
       ".tag": "not_allowed"
   },
   "error_summary": "not_allowed/..."
}

described as: not_allowed Void The user is not allowed to request a temporary link to the specified file. For example, this can occur if the file is restricted or if the user's links are banned.

Props to the Hetzner Support for the fast repsonse and providing logs! Will update this comment as soon as I know more 🙂

EDIT 1:

Requesting one of the actual failed files using curl like:

curl -X POST https://api.dropboxapi.com/2/files/get_temporary_link \
          --header "Authorization: Bearer {{token}}" \
          --header "Content-Type: application/json" \
          --data "{\"path\":\"/{{path}}/my-vid-1.mp4\"}"

results in exactly the same error.

This has nothing to do with the file name pattern as I succesfully can retrieve the termporary_link from a file in the same directory with the same file name pattern.

EDIT 2:

As stated at https://www.dropbox.com/developers/documentation/http/documentation#files-get_temporary_link

grafik

my app got that permission

grafik

EDIT 3:

Created another Dropbox OAuth APP and issue still persists for that particular file(s). Opened a ticket at Dropbox Support...

s-frei commented 1 year ago

Well, it seems like my Dropbox support ticket is getting escalated further and further...

But besides I noticed that the /files/get_temporary_link was jus used because of: https://github.com/nextcloud/integration_dropbox/blob/494c7f21ab2a5d9daf56a779ed1bffa9f3eb5d94/lib/Service/DropboxAPIService.php#L160 that was on 01.09.21 but meanwhile, since 17.03.22 this feature seems to be implemented: https://github.com/nextcloud/server/blob/eaf19c482970d1aa45ee4660bccf9726f3156310/lib/private/Http/Client/Client.php#L302 so the whole /files/get_temporary_link can be stripped and /files/download could be used directly.

As already mentioned I'm not into PHP and I'm currently not planning to provide a fix for this. For sure I could help/assist someone else!