Collabora error on Nextcloud 15.0.5

I think that it is probably Collabora, but after updating to NC 15.0.5 an error has occurred every time I open Collabora documents.

Error log:

[index] Error: TypeError: Argument 2 passed to GuzzleHttp\Psr7\MultipartStream::addElement() must be of the type array, string given, called in /MY-NEXTCLOUD/3rdparty/guzzlehttp/psr7/src/MultipartStream.php on line 70 at <<closure>>

 0. /MY-NEXTCLOUD/3rdparty/guzzlehttp/psr7/src/MultipartStream.php line 70
    addElement(GuzzleHttp\Psr7\AppendStream {}, "draw.odg")
 1. /MY-NEXTCLOUD/3rdparty/guzzlehttp/psr7/src/MultipartStream.php line 31
    createStream({name: "draw.odg",contents: null})
 2. /MY-NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/Client.php line 318
    __construct({name: "draw.odg",contents: null})
 3. /MY-NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/Client.php line 273
    applyOptions(GuzzleHttp\Psr7\Request {}, {verify: "/var/w ... }})
 4. /MY-NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/Client.php line 125
    transfer(GuzzleHttp\Psr7\Request {}, {verify: "/var/w ... }})
 5. /MY-NEXTCLOUD/3rdparty/guzzlehttp/guzzle/src/Client.php line 131
    requestAsync("post", GuzzleHttp\Psr7\Uri {}, {verify: "/var/w ... }})
 6. /MY-NEXTCLOUD/lib/private/Http/Client/Client.php line 231
    request("post", "https://office. ... g", {verify: "/var/w ... e})
 7. /MY-NEXTCLOUD/apps/richdocuments/lib/Preview/Office.php line 65
    post("https://office. ... g", {timeout: 10,mul ... }})
 8. /MY-NEXTCLOUD/lib/private/Preview/GeneratorHelper.php line 59
    getThumbnail("draw.odg", 4096, 4096, false, OC\Files\View {})
 9. /MY-NEXTCLOUD/lib/private/Preview/Generator.php line 194
    getThumbnail(OCA\Richdocuments\Preview\OpenDocument {}, OC\Files\Node\File {}, 4096, 4096)
10. /MY-NEXTCLOUD/lib/private/Preview/Generator.php line 118
    getMaxPreview(OC\Files\SimpleFS\SimpleFolder {}, OC\Files\Node\File {}, "application/vnd ... s")
11. /MY-NEXTCLOUD/lib/private/PreviewManager.php line 205
    getPreview(OC\Files\Node\File {}, 250, 250, true, "fill", "application/vnd ... s")
12. /MY-NEXTCLOUD/core/Controller/PreviewController.php line 175
    getPreview(OC\Files\Node\File {}, 250, 250, true, "fill")
13. /MY-NEXTCLOUD/core/Controller/PreviewController.php line 147
    fetchPreview(OC\Files\Node\File {}, 250, 250, false, false, "fill")
14. /MY-NEXTCLOUD/lib/private/AppFramework/Http/Dispatcher.php line 166
    getPreviewByFileId(65475, 250, 250, false, false, "fill")
15. /MY-NEXTCLOUD/lib/private/AppFramework/Http/Dispatcher.php line 99
    executeController(OC\Core\Controller\PreviewController {}, "getPreviewByFileId")
16. /MY-NEXTCLOUD/lib/private/AppFramework/App.php line 118
    dispatch(OC\Core\Controller\PreviewController {}, "getPreviewByFileId")
17. /MY-NEXTCLOUD/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    main("OC\\Core\\Controller\\PreviewController", "getPreviewByFileId", OC\AppFramework\ ... {}, {_route: "core.P ... "})
18. <<closure>>
    __invoke({_route: "core.P ... "})
19. /MY-NEXTCLOUD/lib/private/Route/Router.php line 297
    call_user_func(OC\AppFramework\ ... {}, {_route: "core.P ... "})
20. /MY-NEXTCLOUD/lib/base.php line 987
    match("/core/preview")
21. /MY-NEXTCLOUD/index.php line 42
    handleRequest()

Nextcloud 15.0.5 , Collabora Online App 3.2.2, PHP 7.3.1, Nginx 1.14.1, CentOS 7.6

Hey guys,

same error here. I can confirm working preview with CODE an 15.0.4. If the thumbnail for a file exits, it is still shown, untill the document is changed. But there was also a richsdocuments update to 3.2.2 in the last days, so i cannot be sure.

My setup:
FreeBSD 11.2 (iocage)
NC 15.0.5.3
PHP 7.3.2
redis 4.0.1.1
MariaDB 10.2.22
nginx 1.14.2_3

Collabora CODE 4.0.1.1
richdocuments 3.2.2

Log sample:

[index] Error: TypeError: Argument 2 passed to GuzzleHttp\Psr7\MultipartStream::addElement() must be of the type array, string given, called in /usr/local/www/nextcloud/3rdparty/guzzlehttp/psr7/src/MultipartStream.php on line 70 at <<closure>>
  
0. /usr/local/www/nextcloud/3rdparty/guzzlehttp/psr7/src/MultipartStream.php line 70
addElement(GuzzleHttp\Psr7\AppendStream {}, "sampe_doc.odt")
 1. /usr/local/www/nextcloud/3rdparty/guzzlehttp/psr7/src/MultipartStream.php line 31
createStream({name: "sampe_doc.odt",contents: null})
 2. /usr/local/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 318
__construct({name: "sampe_doc.odt",contents: null})
 3. /usr/local/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 273
applyOptions(GuzzleHttp\Psr7\Request {}, {verify: "/mnt/f ... }})
 4. /usr/local/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 125
transfer(GuzzleHttp\Psr7\Request {}, {verify: "/mnt/f ... }})
 5. /usr/local/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 131
requestAsync("post", GuzzleHttp\Psr7\Uri {}, {verify: "/mnt/f ... }})
 6. /usr/local/www/nextcloud/lib/private/Http/Client/Client.php line 231
request("post", "https://office... g", {verify: "/mnt/f ... e})
 7. /usr/local/www/nextcloud/apps/richdocuments/lib/Preview/Office.php line 65
post("https://office ... g", {timeout: 10,mul ... }})
 8. /usr/local/www/nextcloud/lib/private/Preview/GeneratorHelper.php line 59
getThumbnail("sampe_doc.odt", 0, 0, false, OC\Files\View {})
 9. /usr/local/www/nextcloud/lib/private/Preview/Generator.php line 194
getThumbnail(OCA\Richdocuments\Preview\OpenDocument {}, OC\Files\Node\File {}, 0, 0)
10. /usr/local/www/nextcloud/lib/private/Preview/Generator.php line 118
getMaxPreview(OC\Files\SimpleFS\SimpleFolder {}, OC\Files\Node\File {}, "application/vnd.oasis.opendocument.text")
11. /usr/local/www/nextcloud/lib/private/PreviewManager.php line 205
getPreview(OC\Files\Node\File {}, 250, 250, true, "fill", "application/vnd.oasis.opendocument.text")
12. /usr/local/www/nextcloud/core/Controller/PreviewController.php line 175
getPreview(OC\Files\Node\File {}, 250, 250, true, "fill")
13. /usr/local/www/nextcloud/core/Controller/PreviewController.php line 147
fetchPreview(OC\Files\Node\File {}, 250, 250, false, false, "fill")
14. /usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 166
getPreviewByFileId(186088, 250, 250, false, false, "fill")
15. /usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
executeController(OC\Core\Controller\PreviewController {}, "getPreviewByFileId")
16. /usr/local/www/nextcloud/lib/private/AppFramework/App.php line 118
dispatch(OC\Core\Controller\PreviewController {}, "getPreviewByFileId")
17. /usr/local/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
main("OC\\Core\\Controller\\PreviewController", "getPreviewByFileId", OC\AppFramework\ ... {}, {_route: "core.P ... "})
18. <<closure>>
__invoke({_route: "core.P ... "})
19. /usr/local/www/nextcloud/lib/private/Route/Router.php line 297
call_user_func(OC\AppFramework\ ... {}, {_route: "core.P ... "})
20. /usr/local/www/nextcloud/lib/base.php line 987
match("/core/preview")
21. /usr/local/www/nextcloud/index.php line 42
handleRequest()

Any ideas?

Same:
TypeError: Argument 2 passed to GuzzleHttp\Psr7\MultipartStream::addElement() must be of the type array, string given, called in /var/www/html/3rdparty/guzzlehttp/psr7/src/MultipartStream.php on line 70

Ticket: https://github.com/nextcloud/richdocuments/issues/427

1 Like

The same situtation here

TypeError: Argument 2 passed to GuzzleHttp\Psr7\MultipartStream::addElement() must be of the type array, string given, called in /var/www/nextcloud/3rdparty/guzzlehttp/psr7/src/MultipartStream.php on line 70

NC v15.0.5
App: Collabora Online v3.2.2
package: loolwsd 4.0.1-1
Apache 2.4.25
OS Debian 9

Important addinional info: I use loolwsd (collabora) on localhost without container

How I solved my case ?

Collabora worked as http and my nextcloud uses https, but they should use the same protocol. So I reconfigured loopwsd to work https. Now nextcloud uses (https) and collabora (loolwsd) uses https.

Other way to solve this is to configure ssl reverse proxy on my apache, but that is one more layer.

Please check your protocols

Cheers.

@yulimoto thanks for the tip.

im pretty sure, that i am running it all at https. my setup is basically like this:

https://icewind.nl/entry/collabora-online/

from what i understand, this means loolwsd is running on localhost:9980 with a self signed cert (this is the default setting) and nginx is reverse proxing with a lets encrypt cert (in my case).

i have no idea, where it could be the problem you had, especially since document editing is working perfectly fine - just previews dont. :frowning_face:

This causes broken icon in activity app aswell: https://github.com/nextcloud/richdocuments/issues/421

It seems that an error has occurred just because the user (who owns the Office file) logs in to the account.

My issue 421 might be caused by something else, as I’m not seeing the exception posted in this thread.

Same here. It seems that the preview generation starts (and fails) when a user opens a folder with the file (or something else, where the files is shown with a preview (e.g. activitiy). That means a richdocuments file in the home dir, would cause the error immediatly after login (if files is the default app).

Good news: thanks to @juliushaertl richdocuments 3.2.3 fixed the TypeError:

You might want to update it.

Unfortuneatly the review generation is still not working for me…

Thank you! I updated and the error stopped.