nextcloud / nextcloud/richdocuments

WOPI::CheckFileInfo failed for URI - Broken PIPE

Open
#2,906 13 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs info
Dominant language
JavaScript
Stars
453
Forks
147
Avg merge
14h 54m
Merged PRs (30d)
83

Description

Describe the bug
A clear and concise description of what the bug is.

When opening a office document, the page goes black (probably due to dark mode) and no document gets loaded - I checked my CODE server and it seems to be running fine - it's being passed through HAProxy as I've got multiple applications running on the same server, including CODE and Nextcloud - HaProxy isn't used for SSL (it's set up inside CODE itself), it's only used for proxying names to the correct services.

The thing is, the CODE server seems fully functional, as the Admin page and other pages are working as expected - but when I try to open a document inside Nextcloud I get a blank (black) screen and the following errors in the CoolWSD log file:

CoolWSD Log
wsd-2289619-2289626 2023-04-08 17:17:03.390003 +0200 [ prisoner_poll ] TRC  Adding a new child 2289629 to NewChildren, have 0 outstanding requests| wsd/COOLWSD.cpp:548
wsd-2289619-2289626 2023-04-08 17:17:03.390006 +0200 [ prisoner_poll ] INF  Have 1 spare child after adding [2289629]. Notifying.| wsd/COOLWSD.cpp:554
wsd-2289619-2289626 2023-04-08 17:17:03.390029 +0200 [ prisoner_poll ] TRC  #19: Revents: 0x0| net/Socket.hpp:1316
wsd-2289619-2289626 2023-04-08 17:17:03.390033 +0200 [ prisoner_poll ] TRC  #20: Removing socket (at 2 of 3) from prisoner_poll| net/Socket.cpp:470
wsd-2289619-2289626 2023-04-08 17:17:03.390036 +0200 [ prisoner_poll ] TRC  #18: setupPollFds getPollEvents: 0x1| net/Socket.hpp:876
wsd-2289619-2289626 2023-04-08 17:17:03.390039 +0200 [ prisoner_poll ] TRC  #19: setupPollFds getPollEvents: 0x1| net/Socket.hpp:876
wsd-2289619-2289626 2023-04-08 17:17:03.390042 +0200 [ prisoner_poll ] TRC  ppoll start, timeoutMicroS: 5000000 size 2| net/Socket.cpp:339
wsd-2289619-2289619 2023-04-08 17:17:03.390074 +0200 [ coolwsd ] TRC  Have 1 new children.| wsd/COOLWSD.cpp:5603
wsd-2289619-2289619 2023-04-08 17:17:03.390119 +0200 [ coolwsd ] INF  WSD initialization complete: setting log-level to [notice] as configured.| wsd/COOLWSD.cpp:5619
wsd-2289619-2289666 2023-04-08 17:17:24.093909 +0200 [ docbroker_001 ] ERR  #33: Read failed, have 0 buffered bytes (EPIPE: Broken pipe)| net/Socket.hpp:1150
wsd-2289619-2289666 2023-04-08 17:17:24.093961 +0200 [ docbroker_001 ] ERR  #33: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1451
wsd-2289619-2289666 2023-04-08 17:17:24.093969 +0200 [ docbroker_001 ] ERR  #33: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1451
wsd-2289619-2289666 2023-04-08 17:17:24.093996 +0200 [ docbroker_001 ] ERR  WOPI::CheckFileInfo failed for URI [https://vos-cloud-1.vossystems.nl/index.php/apps/richdocuments/wopi/files/5674846_oct2hdz4pird?access_token=ENmcmH2EqS6wx0jawAzq3uZb3oYbsrkj&access_token_ttl=1681003042000]: 0 . Headers:  Body: []| wsd/Storage.cpp:695
wsd-2289619-2289666 2023-04-08 17:17:24.094043 +0200 [ docbroker_001 ] ERR  loading document exception: WOPI::CheckFileInfo failed: | wsd/DocumentBroker.cpp:2456
wsd-2289619-2289666 2023-04-08 17:17:24.094055 +0200 [ docbroker_001 ] ERR  Failed to add session to [https://vos-cloud-1.vossystems.nl:443/index.php/apps/richdocuments/wopi/files/5674846_oct2hdz4pird] with URI [https://vos-cloud-1.vossystems.nl/index.php/apps/richdocuments/wopi/files/5674846_oct2hdz4pird?access_token=ENmcmH2EqS6wx0jawAzq3uZb3oYbsrkj&access_token_ttl=1681003042000]: WOPI::CheckFileInfo failed: | wsd/DocumentBroker.cpp:2418
wsd-2289619-2289666 2023-04-08 17:17:24.094066 +0200 [ docbroker_001 ] ERR  Storage error while starting session on https://vos-cloud-1.vossystems.nl:443/index.php/apps/richdocuments/wopi/files/5674846_oct2hdz4pird for socket #28. Terminating connection. Error: WOPI::CheckFileInfo failed: | wsd/COOLWSD.cpp:4943
wsd-2289619-2289666 2023-04-08 17:17:24.098788 +0200 [ docbroker_001 ] ERR  #20: Read failed, have 0 buffered bytes (ECONNRESET: Connection reset by peer)| net/Socket.hpp:1150
wsd-2289619-2289666 2023-04-08 17:17:24.098805 +0200 [ docbroker_001 ] WRN  #20: Unassociated Kit (2289629) disconnected unexpectedly| wsd/COOLWSD.cpp:3426
wsd-2289619-2289679 2023-04-08 17:17:24.528398 +0200 [ docbroker_002 ] ERR  #33: Read failed, have 0 buffered bytes (EPIPE: Broken pipe)| net/Socket.hpp:1150
wsd-2289619-2289679 2023-04-08 17:17:24.528441 +0200 [ docbroker_002 ] ERR  #33: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1451
wsd-2289619-2289679 2023-04-08 17:17:24.528448 +0200 [ docbroker_002 ] ERR  #33: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1451
wsd-2289619-2289679 2023-04-08 17:17:24.528477 +0200 [ docbroker_002 ] ERR  WOPI::CheckFileInfo failed for URI [https://vos-cloud-1.vossystems.nl/index.php/apps/richdocuments/wopi/files/5674846_oct2hdz4pird?access_token=ENmcmH2EqS6wx0jawAzq3uZb3oYbsrkj&access_token_ttl=1681003042000&permission=edit]

To Reproduce
Steps to reproduce the behavior:

  1. Install Nextcloud 26
  2. Install CODE server
  3. Configure everything to use HaProxy as domain redirection
  4. Setup NextCloud Office to use CODE server (everything goes green)
  5. Try to open a file

Expected behavior
A clear and concise description of what you expected to happen.

NextCloud Office get's loaded and file can be edited

Screenshots
If applicable, add screenshots to help explain your problem.
afbeelding

Client details:

  • OS: [e.g. iOS] Windows 10
  • Browser [e.g. chrome, safari] Firefox
  • Version [e.g. 22] latest
  • Device: [e.g. iPhone6, desktop] Desktop

Server details

Operating system: Ubuntu 22.04 LTS

Web server: Apache behind HaProxy

Database: MySQL

PHP version: 8.1.16

Nextcloud version: 26

Version of the richdocuments app 8.0.0

Version of Collabora Online 22.05.12.4

Logs
Nextcloud log (data/nextcloud.log)
{"reqId":"QHMF645b1C9BcHFogGA6","level":3,"time":"2023-04-08T15:40:20+00:00","remoteAddr":"86.89.231.132","user":"JJDun","app":"webdav","method":"DELETE","url":"/remote.php/dav/uploads/JJDun/1220386112","message":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263","userAgent":"Mozilla/5.0 (Windows) mirall/3.8.0stable-Win64 (build 20230331) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"26.0.0.11","exception":{"Exception":"TypeError","Message":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263","Code":0,"Trace":[{"file":"/var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php","line":263,"function":"getUploadStorage","class":"OCA\\DAV\\Upload\\ChunkingV2Plugin","type":"->"},{"file":"/var/www/html/vos-cloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeDelete","class":"OCA\\DAV\\Upload\\ChunkingV2Plugin","type":"->"},{"file":"/var/www/html/vos-cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/vos-cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/vos-cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/vos-cloud/apps/dav/lib/Server.php","line":366,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/vos-cloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/html/vos-cloud/remote.php","line":171,"args":["/var/www/html/vos-cloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php","Line":294,"message":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263","exception":{},"CustomMessage":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263"}}
{"reqId":"35hIX95YCj9qeM4XiOKH","level":3,"time":"2023-04-08T15:40:20+00:00","remoteAddr":"86.89.231.132","user":"JJDun","app":"webdav","method":"DELETE","url":"/remote.php/dav/uploads/JJDun/3651011768","message":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263","userAgent":"Mozilla/5.0 (Windows) mirall/3.8.0stable-Win64 (build 20230331) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"26.0.0.11","exception":{"Exception":"TypeError","Message":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263","Code":0,"Trace":[{"file":"/var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php","line":263,"function":"getUploadStorage","class":"OCA\\DAV\\Upload\\ChunkingV2Plugin","type":"->"},{"file":"/var/www/html/vos-cloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeDelete","class":"OCA\\DAV\\Upload\\ChunkingV2Plugin","type":"->"},{"file":"/var/www/html/vos-cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/vos-cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/vos-cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/vos-cloud/apps/dav/lib/Server.php","line":366,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/vos-cloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/html/vos-cloud/remote.php","line":171,"args":["/var/www/html/vos-cloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php","Line":294,"message":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263","exception":{},"CustomMessage":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263"}}
{"reqId":"QtwsVpPsda4rDb6IWRDt","level":3,"time":"2023-04-08T15:40:20+00:00","remoteAddr":"86.89.231.132","user":"JJDun","app":"webdav","method":"DELETE","url":"/remote.php/dav/uploads/JJDun/1913853989","message":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263","userAgent":"Mozilla/5.0 (Windows) mirall/3.8.0stable-Win64 (build 20230331) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"26.0.0.11","exception":{"Exception":"TypeError","Message":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263","Code":0,"Trace":[{"file":"/var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php","line":263,"function":"getUploadStorage","class":"OCA\\DAV\\Upload\\ChunkingV2Plugin","type":"->"},{"file":"/var/www/html/vos-cloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeDelete","class":"OCA\\DAV\\Upload\\ChunkingV2Plugin","type":"->"},{"file":"/var/www/html/vos-cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/vos-cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/vos-cloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/vos-cloud/apps/dav/lib/Server.php","line":366,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/vos-cloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/html/vos-cloud/remote.php","line":171,"args":["/var/www/html/vos-cloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php","Line":294,"message":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263","exception":{},"CustomMessage":"OCA\\DAV\\Upload\\ChunkingV2Plugin::getUploadStorage(): Argument #1 ($targetPath) must be of type string, null given, called in /var/www/html/vos-cloud/apps/dav/lib/Upload/ChunkingV2Plugin.php on line 263"}}
Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by correlating the CoolWSD WOPI errors with the Nextcloud stack trace in apps/dav/lib/Upload/ChunkingV2Plugin.php, especially lines 263 and 294, and review the HAProxy and Apache setup described in the issue. Reproduce the Nextcloud 26 and CODE configuration, then determine why CheckFileInfo fails and verify that opening a document loads successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
apache, mysql, php
Domain
api, backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.