storj-thirdparty / nextcloud-app

GNU Affero General Public License v3.0
21 stars 3 forks source link

cProject TypeError in NC28 #36

Open blwtxc opened 9 months ago

blwtxc commented 9 months ago

Just updated to NC28.0.0 and had to dive deeper into my logs for another issue, but also found errors reported by Storj. I greped the log to see if it happened earlier as well, but it didn't, so I guess this is related to recent changes in NC28.

Error:

Error core
2023-12-13T17:25:02+00:00
TypeError: Storj\Uplink\Project::__construct(): Argument #2 ($cProject) must be of type FFI\CData, int given, called in /var/www/apps/storj/vendor/storj/uplink/src/Access.php on line 66 at apps/storj/vendor/storj/uplink/src/Project.php line 35

Something else that caught my eye was, that, when trying to scan the files with occ files:scan, I now get the error output Error during scan: Array to string conversion on the commandline. Unfortunately, nothing relevant gets postet to the log, but as it is file related, it might be related to the previous error.

An issue that I encounter for several versions of NC now, but never related to Storj, is, that NC/Onlyoffice tells me its unable to create a document from a template. It seems to fail to create one but actually does do it. After a refresh of the page I see the document and can open it.

The error message I see in the log:

Error objectstore
2023-12-13T17:53:41+00:00
Storj\Uplink\Exception\TooManyRequests: uplink: too many requests
    storj.io/uplink.convertKnownErrors:57
    storj.io/uplink.(*Upload).Write:125
    main.uplink_upload_write:93
    _cgoexp_4e62e415365d_uplink_upload_write:1270
    runtime.cgocallbackg1:314
    runtime.cgocallbackg:233
    untime.cgocallback:971 at .../storj/uplink/src/Exception/UplinkException.php line 36

Cheers

Zetanova commented 2 months ago

Storj limit the putObject request one a single object to 1 per second.

Some components like richdocuments create the file this produces a touch putObject request and after writes content with a second putObject request that generates the "too many requests" error

related issues https://github.com/nextcloud/server/issues/46034 https://github.com/nextcloud/server/issues/45501

Workaround: adding a 1sec sleep after file touch operation in /lib/private/Files/View.php