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

Documents cannot be saved since v3.5.1 #781

Closed
supremesyntax opened this issue Jan 14, 2020 · 14 comments
Closed

Documents cannot be saved since v3.5.1 #781

supremesyntax opened this issue Jan 14, 2020 · 14 comments
Labels
3. to review Ready to be reviewed bug Something isn't working

Comments

@supremesyntax
Copy link

Describe the bug

Documents can't be saved since v3.5.1

To Reproduce
Steps to reproduce the behavior:

  1. Create new document (docx or odt) via (+) icon
  2. Open docuement
  3. Write anything
  4. Try to save document -> No permission

Expected behavior
Document should be saved

Screenshots
Bildschirmfoto vom 2020-01-14 10-23-55

Client details:

  • OS: all
  • Browser: all

Server details

Operating system: Ubuntu 16.04.6

Web server: Apache 2.4.18-2ubuntu3.14

PHP version: 7.0.33-0ubuntu0.16.04.7

Nextcloud version: 15.0.14

Version of the richdocuments app v3.5.1

Version of Collabora Online 4.2.0 (Docker container)

Logs

Nextcloud log (data/nextcloud.log)

{"reqId":"*deleted*","level":3,"time":"2020-01-14T09:34:41+01:00","remoteAddr":"*deleted*","user":"*deleted*","app":"index","method":"POST","url":"/index.php/apps/richdocuments/wopi/files/*deleted*/contents?access_token=*deleted*&access_token_ttl=0","message":{"Exception":"TypeError","Message":"Return value of OCA\\Richdocuments\\Service\\UserScopeService::setFilesystemScope() must be an instance of OCA\\Richdocuments\\Service\\void, none returned","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php","line":449,"function":"setFilesystemScope","class":"OCA\\Richdocuments\\Service\\UserScopeService","type":"->","args":["*deleted*"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":166,"function":"putFile","class":"OCA\\Richdocuments\\Controller\\WopiController","type":"->","args":["*deleted*","*deleted*"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Richdocuments\\Controller\\WopiController"},"putFile"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":118,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Richdocuments\\Controller\\WopiController"},"putFile"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Richdocuments\\Controller\\WopiController","putFile",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"fileId":"*deleted*","_route":"richdocuments.wopi.putFile"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"fileId":"*deleted*","_route":"richdocuments.wopi.putFile"}]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"fileId":"*deleted*","_route":"richdocuments.wopi.putFile"}]},{"file":"/var/www/nextcloud/lib/base.php","line":987,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/richdocuments/wopi/files/400659_oc0l3917unjy/contents"]},{"file":"/var/www/nextcloud/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/apps/richdocuments/lib/Service/UserScopeService.php","Line":67,"CustomMessage":"--"},"userAgent":"LOOLWSD WOPI Agent 4.2.0","version":"15.0.14.1","id":"*deleted*"}
@supremesyntax
Copy link
Author

supremesyntax commented Jan 14, 2020

Just pulled latest collabora docker image (4.2.0.3), same error...

Here are the docker logs, maybe it is a collabora error?!

wsd-00030-00036 2020-01-14 09:51:11.885975 [ websrv_poll ] WRN client - server version mismatch, disabling browser cache. Expected: fafb01f| wsd/FileServer.cpp:279
wsd-00030-00036 2020-01-14 09:51:12.436660 [ websrv_poll ] WRN client - server version mismatch, disabling browser cache. Expected: fafb01f| wsd/FileServer.cpp:279
E: lt_string_value: assertion string != ((void *)0)' failed E: lt_string_value: assertion string != ((void *)0)' failed
E: lt_string_value: assertion string != ((void *)0)' failed E: lt_string_value: assertion string != ((void *)0)' failed
wsd-00030-00036 2020-01-14 09:51:13.862707 [ websrv_poll ] WRN client - server version mismatch, disabling browser cache. Expected: fafb01f| wsd/FileServer.cpp:279
wsd-00030-00038 2020-01-14 09:51:17.190134 [ docbroker_001 ] ERR Unexpected response to WOPI::PutFile : 500Cannot save file to WOPI storage uri [https://deleted/index.php/apps/richdocuments/wopi/files/deleted/contents?access_token=deleted&access_token_ttl=0]. Error: | wsd/Storage.cpp:1083
wsd-00030-00038 2020-01-14 09:51:17.190392 [ docbroker_001 ] ERR Failed to save docKey [/index.php/apps/richdocuments/wopi/files/deleted] to URI [https://deleted/index.php/apps/richdocuments/wopi/files/deleted?access_token=deleted&access_token_ttl=0]. Notifying client.| wsd/DocumentBroker.cpp:1080

@supremesyntax
Copy link
Author

i went back to 3.5.0 and saving files is working again!

@t0mcat1337
Copy link

t0mcat1337 commented Jan 17, 2020

I have a similar issue, not sure, if it is the same cause but have some more informations. First of all my Versions:

Collabora App: 3.5.1
Versions App: 1.9.0 (seems to have sth. to do with it, see below)
CODE docker image: 4.2.0.3
OS: Ubuntu 18.04
Nextcloud: 16.0.3.0

The error occurs in this situation:

  • The Versions app is enabled
  • The Office file is on an external storage (SMB in my case)
  • The folder holding the file is shared with another user
  • This User edits the file and wants to save it
  • => Error Message frome above

In the Nextcloud Log is this:

[index] Error: Error: Call to a member function getId() on boolean at <<closure>>
0. /srv/www/wolke.leitold.koeln/apps/files_versions/lib/Hooks.php line 61
   OCA\Files_Versions\Storage::store("/01_HOME/Privat ... s")
1. /srv/www/wolke.leitold.koeln/lib/private/legacy/hook.php line 106
   OCA\Files_Versions\Hooks::write_hook({path: "/01_HOME ... e})
2. /srv/www/wolke.leitold.koeln/lib/private/Files/View.php line 617
   OC_Hook::emit("OC_Filesystem", "write", {path: "/01_HOME ... e})
3. /srv/www/wolke.leitold.koeln/lib/private/Files/View.php line 659
   OC\Files\View->emit_file_hooks_pre(true, "/snoopy/files/0 ... s", true)
4. /srv/www/wolke.leitold.koeln/lib/private/Files/Node/File.php line 66
   OC\Files\View->file_put_contents("/snoopy/files/0 ... s", null)
5. /srv/www/wolke.leitold.koeln/apps/richdocuments/lib/Controller/WopiController.php line 453
   OC\Files\Node\File->putContent(null)
6. /srv/www/wolke.leitold.koeln/apps/richdocuments/lib/Controller/WopiController.php line 623
   OCA\Richdocuments\Controller\WopiController->OCA\Richdocuments\Controller\{closure}("*** sensitive parameters replaced ***")
7. /srv/www/wolke.leitold.koeln/apps/richdocuments/lib/Controller/WopiController.php line 454
   OCA\Richdocuments\Controller\WopiController->retryOperation(Closure {})
8. /srv/www/wolke.leitold.koeln/lib/private/AppFramework/Http/Dispatcher.php line 166
   OCA\Richdocuments\Controller\WopiController->putFile("2198057", "4LMCC65tjkxLoCsvzajQhYey5m56Boot")
9. /srv/www/wolke.leitold.koeln/lib/private/AppFramework/Http/Dispatcher.php line 99
   OC\AppFramework\Http\Dispatcher->executeController(OCA\Richdocument ... {}, "putFile")
10. /srv/www/wolke.leitold.koeln/lib/private/AppFramework/App.php line 126
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\Richdocument ... {}, "putFile")
11. /srv/www/wolke.leitold.koeln/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
   OC\AppFramework\App::main("OCA\\Richdocume ... r", "putFile", OC\AppFramework\ ... {}, {fileId: "219805 ... "})
12. <<closure>>
   OC\AppFramework\Routing\RouteActionHandler->__invoke({fileId: "219805 ... "})
13. /srv/www/wolke.leitold.koeln/lib/private/Route/Router.php line 297
   undefinedundefinedcall_user_func(OC\AppFramework\ ... {}, {fileId: "219805 ... "})
14. /srv/www/wolke.leitold.koeln/lib/base.php line 975
   OC\Route\Router->match("/apps/richdocum ... s")
15. /srv/www/wolke.leitold.koeln/index.php line 42
   OC::handleRequest()

POST /index.php/apps/richdocuments/wopi/files/2198057_oc0h5ha9hsy5/contents?access_token=4LMCC65tjkxLoCsvzajQhYey5m56Boot&access_token_ttl=0
from 192.168.41.1 by brina at 2020-01-17T21:06:14+01:00

This is in docker logs from the CODE Container:

wsd-00030-00237 2020-01-17 20:06:14.753981 [ docbroker_00d ] ERR  Unexpected response to WOPI::PutFile : 500Cannot save file to WOPI storage uri [https://cloud.domain.dom/index.php/apps/richdocuments/wopi/files/2198057_oc0h5ha9hsy5/contents?access_token=4LMCC65tjkxLoCsvzajQhYey5m56Boot&access_token_ttl=0]. Error: | wsd/Storage.cpp:1083
wsd-00030-00237 2020-01-17 20:06:14.754223 [ docbroker_00d ] ERR  Failed to save docKey [/index.php/apps/richdocuments/wopi/files/2198057_oc0h5ha9hsy5] to URI [https://cloud.domain.dom/index.php/apps/richdocuments/wopi/files/2198057_oc0h5ha9hsy5?access_token=4LMCC65tjkxLoCsvzajQhYey5m56Boot&access_token_ttl=0]. Notifying client.| wsd/DocumentBroker.cpp:1080

When disabling the Versions App everything works fine...

Found a similar ticket with the ONLYOFFICE App:
ONLYOFFICE/onlyoffice-nextcloud#118

which seems to be solved with this commit:
ONLYOFFICE/onlyoffice-nextcloud#162

After downgrading Collabora App to 3.5.0 everything works again even with enabled Version App....So perhaps this fix needs to be reviewed:
Fix issue when shared files were not creating activity/version entries

I hope these informations help to track down the issue...

@t-markmann
Copy link

t-markmann commented Jan 20, 2020

Same issue here.
Workaround: create a file locally, upload it into the cloud. Then the file can be saved.

Hope it can be fixed soon.

UPDATE:

  • Create new document and let Collabora open it.
  • Then close Collabora.
  • Open the same document again --> saving works now.

UPDATE 2:
The only difference I can find is the dataset in table oc_richdocuments_wopi:
If the file is created by the app richdocuments, the template_id is 521.
If the file is opened the second time OR a locally created file is uploaded, the template_id is 0.

grafik

Maybe this helps.

@lgnch
Copy link

lgnch commented Jan 20, 2020

Same issue as reported in #780. A return to 3.5.0 is confirmed to work until a fix is implemented.

@MetaData1
Copy link

Try to deactivate the "Versions" App under Apps. Helps for me

@t-markmann
Copy link

t-markmann commented Jan 22, 2020

If you want to keep 3.5.1 because of other bugfixes and want to keep the Versions app, you can try out this MySQL trigger:

DELIMITER |
DROP TRIGGER IF EXISTS `temp-triggerWopiTemplate`|
CREATE TRIGGER `temp-triggerWopiTemplate`
BEFORE INSERT
ON `oc_richdocuments_wopi`
FOR EACH ROW
BEGIN
	IF (NEW.`template_id`!='0')
	THEN
		SET NEW.`template_id`='0';
	END IF;
END;
|
DELIMITER ;

It replaces the template id with 0. It's hacky but it works.

EDIT: Nice side effect: this solved #496 for me. My documents are now created in german, which is the language is set in Nextcloud itself.

@juliusknorr
Copy link
Member

Everyone who encounters the getId() log error, please give #805 a try.

The other issue when saving fails after creating them from a template, please upgrade to the latest Collabora version. That should fix the issue.

@juliusknorr juliusknorr added bug Something isn't working info needed Further information is requested 3. to review Ready to be reviewed and removed info needed Further information is requested labels Jan 27, 2020
@resoli
Copy link

resoli commented Jan 28, 2020

This affects a NC 15.0.14 instance I manage (reverting to richdocuments 3.5.0 fixes), but not other NC 17.0.2 installations.

@it25fg
Copy link

it25fg commented Feb 1, 2020

The other issue when saving fails after creating them from a template, please upgrade to the latest Collabora version. That should fix the issue.

@juliushaertl Which version do you refer to? I've seen this error with richdocuments 3.5.1 and loolwsd 4.0-2 which is the latest possible in a production system (updated some minutes ago).

@juliusknorr
Copy link
Member

This should be fixed with the new 3.5.2 release.

@ashemsay
Copy link

Hello,

I'm on 3.5.2 and still experience this issue, though I never had any previous version, this is a first install. How can I install version 3.5.0 instead?

@lgnch
Copy link

lgnch commented Feb 16, 2020

If you are getting the error with no previous install then 3.5.0 will unlikely solve your issue. You will need to open a support ticket and post all your information as this is likely to be a permissions problem with your CODE install.

@pitchum
Copy link

pitchum commented Mar 3, 2020

I'm on 3.5.2 and still experience this issue

FYI:
On a nextcloud v15 with richdocuments v3.5.2 and I had to manually install v3.5.0 to solve this.
On a nextcloud v17 with richdocuments v3.5.2 everything is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Ready to be reviewed bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants