jgraph/drawio-nextcloud

Error message on new file creation in Nextcloud: Not a diagram file

peacepenguin opened this issue · 6 comments

In Nextcloud, when creating a new .drawio file, drawio opens successfully, and asks for template to use, selecting any template then clicking "Create" results in a popup:

Error
Not a diagram file (error on line 1 at column 1: Start tag expected, '<' not found)

You can click "ok" and things work fine after that. The chosen template works fine too.

Subsequent opening of the same file works fine, no further errors after the file has already been created. Just the error message on the initial creation of a file from the nextcloud UI after choosing a template.

Draw io version: v22.1.3
Nextcloud Drawio app version: 2.1.4
Nextcloud version: 27.1.3

Do you still see this error?
It's supposed to be fixed in this version but sometimes browser caching cause similar issues

Yes just updated to latest nextcloud, drawio, and drawio app, still see this on new drawio file creation.

Can you please try the same steps in incognito/private browser window. If the problem is fixed, then you just need to clear your browser cache.

If not, please open the browser console (press F12) and then repeat the steps. Once the problem occur, return to the browser console -> Network tab -> Click "Export HAR..." and send us the har file
Also, please send us any errors in the console log
Thanks

Ok I found that the issue only occurs when "Offline Mode" is enabled in the draw io app settings inside of nextcloud.

Also, yes, here are links to the console log and har file when the issue occurs.

Steps taken: set drawio app in nextcloud settings to offline mode enabled -> login to nextcloud web files ui -> new drawio file from menu -> choose template (any) -> click "create" -> error popup -> ok -> all is fine

This test environment was built from scratch today on the latest versions of debian12, nextcloud 28, and drawio app.

https://github.com/peacepenguin/randombits/blob/main/nc.labz.local.har

https://github.com/peacepenguin/randombits/blob/main/nc.labz.local-1704305149963.log

Error message in the web UI, also shows in the console log:

Error
Not a diagram file (error on line 1 at column 1: Start tag expected, '<' not found)
OK

After clicking OK, all functions normally. The chosen template loads in, and the drawing gets saved back to nextcloud, subsequent opening of an existing file don't throw the error at all.

Will be fixed in the next draw.io release (no app update is needed)

In drawio 22.1.18