nextcloud / integration_dropbox

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

[integration_dropbox] Warning: Dropbox error downloading file 2020-11-14 13.44.16.png : Unable to read from stream #12

Closed joeshook954 closed 1 week ago

joeshook954 commented 3 years ago

Hello and thank you for creating this, it's just what I needed.

I am having problems downloading some of my files. I noticed this in the log:

[integration_dropbox] Warning: Dropbox error downloading file 2020-11-14 13.44.16.png : Unable to read from stream

and

[PHP] Error: Error: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor at /usr/local/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php#55 at <>

  1. <> OC\Log\ErrorHandler::onError(8, "fread(): read o ... r", "/usr/local/www/ ... p", 55, {count: 8192})
  2. /usr/local/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php line 55 fread(null, 8192)
  3. /usr/local/www/nextcloud/3rdparty/icewind/streams/src/CallbackWrapper.php line 96 Icewind\Streams\Wrapper->stream_read(8192)
  4. <> Icewind\Streams\CallbackWrapper->stream_read(8192)
  5. /usr/local/www/nextcloud/3rdparty/guzzlehttp/psr7/src/Stream.php line 228 fread(null, 120)
  6. /usr/local/www/nextcloud/3rdparty/guzzlehttp/psr7/src/Message.php line 72 GuzzleHttp\Psr7\Stream->read(120)
  7. /usr/local/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/BodySummarizer.php line 25 GuzzleHttp\Psr7\Message::bodySummary(" sensitive parameter replaced ")
  8. /usr/local/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php line 107 GuzzleHttp\BodySummarizer->summarize(" sensitive parameter replaced ")
  9. /usr/local/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 69 GuzzleHttp\Exception\RequestException::create(GuzzleHttp\Psr7\Request {}, " sensitive parameter replaced ", null, [], null)
  10. /usr/local/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php line 204 GuzzleHttp\Middleware::GuzzleHttp{closure}(" sensitive parameters replaced ")
    1. /usr/local/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php line 153 GuzzleHttp\Promise\Promise::callHandler(1, " sensitive parameter replaced ", null)
    2. /usr/local/www/nextcloud/3rdparty/guzzlehttp/promises/src/TaskQueue.php line 48 GuzzleHttp\Promise\Promise::GuzzleHttp\Promise{closure}(" sensitive parameters replaced ")
    3. /usr/local/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php line 248 GuzzleHttp\Promise\TaskQueue->run(true)
    4. /usr/local/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php line 224 GuzzleHttp\Promise\Promise->invokeWaitFn()
    5. /usr/local/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php line 269 GuzzleHttp\Promise\Promise->waitIfPending()
    6. /usr/local/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php line 226 GuzzleHttp\Promise\Promise->invokeWaitList()
    7. /usr/local/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php line 62 GuzzleHttp\Promise\Promise->waitIfPending()
    8. /usr/local/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 187 GuzzleHttp\Promise\Promise->wait()
    9. /usr/local/www/nextcloud/lib/private/Http/Client/Client.php line 307 GuzzleHttp\Client->request("post", "https://content ... d", {verify: "/usr/l ... e})
    10. /usr/local/www/nextcloud/apps/integration_dropbox/lib/Service/DropboxAPIService.php line 167 OC\Http\Client\Client->post("https://content ... d", {sink: null,time ... }})
    11. /usr/local/www/nextcloud/apps/integration_dropbox/lib/Service/DropboxStorageAPIService.php line 268 OCA\Dropbox\Service\DropboxAPIService->downloadFile("sl.A4O0cou-Nl3X ... 8", "CrfjIk31sCUAAAA ... W", "hh276c3kzellh2x", "rdsuw9qg4y4fj5p", "joeshook", null, "id:JWpyn03QaGkAAAAAAAFZFg")
    12. /usr/local/www/nextcloud/apps/integration_dropbox/lib/Service/DropboxStorageAPIService.php line 200 OCA\Dropbox\Service\DropboxStorageAPIService->getFile("sl.A4O0cou-Nl3X ... 8", "CrfjIk31sCUAAAA ... W", "hh276c3kzellh2x", "rdsuw9qg4y4fj5p", "joeshook", {0: "And 6 more ... "}, OC\Files\Node\Folder {})
    13. /usr/local/www/nextcloud/apps/integration_dropbox/lib/Service/DropboxStorageAPIService.php line 131 OCA\Dropbox\Service\DropboxStorageAPIService->importFiles("sl.A4O0cou-Nl3X ... 8", "CrfjIk31sCUAAAA ... W", "hh276c3kzellh2x", "rdsuw9qg4y4fj5p", "joeshook", "/Dropbox import", 500000000, 120)
    14. /usr/local/www/nextcloud/apps/integration_dropbox/lib/BackgroundJob/ImportDropboxJob.php line 36 OCA\Dropbox\Service\DropboxStorageAPIService->importDropboxJob("joeshook")
    15. /usr/local/www/nextcloud/lib/public/BackgroundJob/Job.php line 80 OCA\Dropbox\BackgroundJob\ImportDropboxJob->run({user_id: "joeshook"})
    16. /usr/local/www/nextcloud/lib/public/BackgroundJob/QueuedJob.php line 48 OCP\BackgroundJob\Job->execute(OC\BackgroundJob\JobList {}, OC\Log {})
    17. /usr/local/www/nextcloud/cron.php line 128 OCP\BackgroundJob\QueuedJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})
julien-nc commented 3 years ago

The way files are downloaded have recently changed and is not released yet. Could you try the latest nightly(v1.0.3-2-nightly) and check if it runs fine? it's only compatible with NC >= 22. You can download it manually from the appstore or you can also simply get it with an occ command:

occ app:update --allow-unstable integration_dropbox

When you want to get back to normal releases, just disable and remove the app from app settings and reinstall it. You won't loose any data.

joeshook954 commented 3 years ago

Thank you. I ran the occ update and upgraded. Now, it created the Dropbox import folder but does not download anything. I get this in the log:

[integration_dropbox] Error: Importing dropbox files for joeshook

marcelklehr commented 4 months ago

Can you try again with the latest version?