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

cProject TypeError in NC28 #36

Open
blwtxc opened this issue Dec 13, 2023 · 1 comment
Open

cProject TypeError in NC28 #36

blwtxc opened this issue Dec 13, 2023 · 1 comment

Comments

@blwtxc
Copy link

blwtxc commented Dec 13, 2023

  • Architecture: x64
  • Nextcloud version: 28.0.0
  • PHP version: 8.2
  • Using Storj as primary or external storage: primary

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
Copy link

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
nextcloud/server#46034
nextcloud/server#45501

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants