jgraph/drawio-nextcloud

Cant open files

Closed this issue · 10 comments

Tealk commented

Since i update to 2.1.0 i can't open drawio files

[drawio] Error: OCP\Files\NotFoundException: /appdata_ocohsr9ftdgy/drawio/previews at <<closure>>

 0. <<closure>>
    OC\Files\Node\Root->get()
 1. /var/www/nextcloud/lib/private/Files/Node/LazyFolder.php line 72
    call_user_func_array()
 2. /var/www/nextcloud/lib/private/Files/Node/LazyFolder.php line 149
    OC\Files\Node\LazyFolder->__call()
 3. /var/www/nextcloud/lib/private/Files/AppData/AppData.php line 132
    OC\Files\Node\LazyFolder->get()
 4. /var/www/nextcloud/apps/drawio/lib/Listeners/FileDeleteListener.php line 39
    OC\Files\AppData\AppData->getFolder()
 5. /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 87
    OCA\Drawio\Listeners\FileDeleteListener->handle()
 6. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke()
 7. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
 8. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 88
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
 9. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 100
    OC\EventDispatcher\EventDispatcher->dispatch()
10. /var/www/nextcloud/lib/private/Files/Node/HookConnector.php line 156
    OC\EventDispatcher\EventDispatcher->dispatchTyped()
11. /var/www/nextcloud/lib/private/legacy/OC_Hook.php line 106
    OC\Files\Node\HookConnector->postDelete()
12. /var/www/nextcloud/lib/private/Files/View.php line 1294
    OC_Hook::emit()
13. /var/www/nextcloud/lib/private/Files/View.php line 1222
    OC\Files\View->runHooks()
14. /var/www/nextcloud/lib/private/Files/View.php line 727
    OC\Files\View->basicOperation()
15. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 522
    OC\Files\View->unlink()
16. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 179
    OCA\DAV\Connector\Sabre\File->delete()
17. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 281
    Sabre\DAV\Tree->delete()
18. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpDelete()
19. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
20. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
21. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
22. /var/www/nextcloud/apps/dav/lib/Server.php line 360
    Sabre\DAV\Server->exec()
23. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
24. /var/www/nextcloud/remote.php line 171
    require_once("/var/www/nextcl ... p")

DELETE /remote.php/dav/files/Tealk/New%20draw.io%20Diagram.drawio
from 192.168.100.11 by Tealk at 2023-01-23T15:17:36+01:00

Hi,

I believe this error is not related since this log entry is triggered by file deletion only (drawio/lib/Listeners/FileDeleteListener.php).

Can you please check the logs for another draw.io entries. Also, is there any errors in the browser console?

Thanks

Tealk commented

Console

Uncaught ReferenceError: displayError is not defined
    EditFile https://rollenspiel.cloud/apps/drawio/js/editor.js?v=f098841d-61:2
    <anonymous> https://rollenspiel.cloud/apps/drawio/edit?fileId=56055645&isWB=false:239
editor.js:2:271735

but in the server logs i cant find more

This error means no fileId nor sharingToken are provided. What is the URL of the draw.io editor page (when you click on a diagram to edit).
Also, what is your Nextcloud storage setup

Thanks

Tealk commented

I use the local storage

URL is: /apps/drawio/edit?fileId=56055645&isWB=false

Maybe it is a caching problem, can you try in incognito/private window

Tealk commented

But I have the problem on different browsers

the problem persists when I delete all browser data for my domain
there was once briefly the drawio loadingtext displayed but now I can only download the file when I click on it

If files download only now, there should be another new JS error in the browser console, please share it with us

Tealk commented

so at home right now I can no longer reproduce the error, I'll get back to you tomorrow

Tealk commented

Now it seems to work again, maybe a problem at diagrams.net?

Had the same bug(s) in my installation:
Tried incognito mode and different browsers - files did not open. Only blank screen there.

Browser console showed same error as mentioned above:

editor.js?v=de443dcc-12:2 Uncaught ReferenceError: displayError is not defined
at n.DrawIO.EditFile (editor.js?v=de443dcc-12:2:271735)
at edit?fileId=18457441&isWB=false:222:44

As I'm running my own instance of drawio I can also tell:
The app did not even try to access the drawio backend - no log entries there.

Solution: restarting php-fpm on the nextcloud server helped (at least in my case)