documentserver_community
documentserver_community copied to clipboard
"DocumentConversionException: namespace error" with each cronjob run
Each time the cronjob runs i get the following error in my logfiles.
Nextcloud version 18.0.0 Documentserver community version 0.1.5
[documentserver_community] Error: OCA\DocumentServer\Document\DocumentConversionException: namespace error : Namespace prefix wp14 on sizeRelH is not defined r 8" hidden="false"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom="margin" ^
namespace error : Namespace prefix wp14 on pctWidth is not defined
lse"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom="margin"><wp14:pctWidth
^
namespace error : Namespace prefix wp14 on sizeRelH is not defined
r 7" hidden="false"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom="margin"
^
namespace error : Namespace prefix wp14 on pctWidth is not defined
lse"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom="margin"><wp14:pctWidth
^
namespace error : Namespace prefix wp14 on sizeRelH is not defined
r 6" hidden="false"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom="margin"
^
namespace error : Namespace prefix wp14 on pctWidth is not defined
lse"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom="margin"><wp14:pctWidth
^
namespace error : Namespace prefix wp14 on sizeRelH is not defined
r 5" hidden="false"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom="margin"
^
namespace error : Namespace prefix wp14 on pctWidth is not defined
lse"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom="margin"><wp14:pctWidth
^
namespace error : Namespace prefix wp14 on sizeRelH is not defined
d 3" hidden="false"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom="margin"
^
namespace error : Namespace prefix wp14 on pctWidth is not defined
lse"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom="margin"><wp14:pctWidth
^
namespace error : Namespace prefix wp14 on sizeRelV is not defined
4:pctWidth>0</wp14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom="margin"
^
namespace error : Namespace prefix wp14 on pctHeight is not defined
14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom="margin"><wp14:pctHeight
^
namespace error : Namespace prefix wp14 on sizeRelH is not defined
d 2" hidden="false"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom="margin"
^
namespace error : Namespace prefix wp14 on pctWidth is not defined
lse"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom="margin"><wp14:pctWidth
^
namespace error : Namespace prefix wp14 on sizeRelV is not defined
4:pctWidth>0</wp14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom="margin"
^
namespace error : Namespace prefix wp14 on pctHeight is not defined
14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom="margin"><wp14:pctHeight
^
namespace error : Namespace prefix wp14 on sizeRelH is not defined
d 1" hidden="false"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom="margin"
^
namespace error : Namespace prefix wp14 on pctWidth is not defined
lse"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom="margin"><wp14:pctWidth
^
namespace error : Namespace prefix wp14 on sizeRelV is not defined
4:pctWidth>0</wp14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom="margin"
^
namespace error : Namespace prefix wp14 on pctHeight is not defined
14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom="margin"><wp14:pctHeight
^
namespace error : Namespace prefix wp14 on sizeRelH is not defined
/drawingml/2006/main"/></wp:cNvGraphicFramePr><wp14:sizeRelH relativeFrom="page"
^
namespace error : Namespace prefix wp14 on pctWidth is not defined
/main"/></wp:cNvGraphicFramePr><wp14:sizeRelH relativeFrom="page"><wp14:pctWidth
^
namespace error : Namespace prefix wp14 on sizeRelV is not defined
p14:pctWidth>0</wp14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom="page"
^
namespace error : Namespace prefix wp14 on pctHeight is not defined
wp14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom="page"><wp14:pctHeight
^
at <<closure>>
0. /var/www/nextcloud/nextcloud/apps/documentserver_community/lib/DocumentConverter.php line 123
OCA\DocumentServer\Document\ConverterBinary->run("/tmp/oc_tmp_IWSOCA-.xml", null)
1. /var/www/nextcloud/nextcloud/apps/documentserver_community/lib/DocumentConverter.php line 78
OCA\DocumentServer\DocumentConverter->runCommand(OCA\DocumentServ ... {})
2. /var/www/nextcloud/nextcloud/apps/documentserver_community/lib/Document/DocumentStore.php line 151
OCA\DocumentServer\DocumentConverter->saveChanges("*** sensitive parameter replaced ***", ["78;AgAAADEA//8 ... "], "/var/www/nextcl ... x", "docx")
3. /var/www/nextcloud/nextcloud/apps/documentserver_community/lib/LocalAppData.php line 100
OCA\DocumentServer\Document\DocumentStore->OCA\DocumentServer\Document\{closure}("*** sensitive parameters replaced ***")
4. /var/www/nextcloud/nextcloud/apps/documentserver_community/lib/Document/DocumentStore.php line 164
OCA\DocumentServer\LocalAppData->getReadWriteLocalPath(OC\Files\SimpleFS\SimpleFolder {}, Closure {})
5. /var/www/nextcloud/nextcloud/apps/documentserver_community/lib/Document/SaveHandler.php line 56
OCA\DocumentServer\Document\DocumentStore->saveChanges(1894629968, [OCA\DocumentSer ... }])
6. /var/www/nextcloud/nextcloud/apps/documentserver_community/lib/BackgroundJob/Cleanup.php line 69
OCA\DocumentServer\Document\SaveHandler->flushChanges(1894629968)
7. /var/www/nextcloud/nextcloud/lib/public/BackgroundJob/Job.php line 79
OCA\DocumentServer\BackgroundJob\Cleanup->run(null)
8. /var/www/nextcloud/nextcloud/cron.php line 125
OCP\BackgroundJob\Job->execute(OC\BackgroundJob\JobList {}, OC\Log {})
at 2020-02-04T12:50:05+00:00
I can confirm this Problem! For me it seems that maybe it's a problem with images in documents ... but I'm not sure.
Same problem here!
same here
Same for me. But apart from the log, I didn't notice a problem.
Same problem for my instance, I'm also unable to save an imported document in any other format than PDF. When downloading the docx file via the NC file manager I only get an old version of the document.
Error message: "Unknown error"...
Update for https://github.com/nextcloud/documentserver_community/issues/59#issuecomment-600543613: I have one document that wont start anymore. (Stuck at 86%) Maybe this is related to the error
I do receiv a lot of these issues too. Would be good to understand the impact and possible user issues to be able to prepare work arounds. Issue remains in NC 18.0.3
I have the same issue.
App | Version |
---|---|
Core | 18.0.4 |
OnlyOffice | 4.1.4 |
Document Server | 0.1.5 |
PHP | 7.2.24 |
{
"reqId":"jwSHL9KazOwNstyftIOY",
"level":3,
"time":"2020-05-12T05:10:18+00:00",
"remoteAddr":"",
"user":"--",
"app":"documentserver_community",
"method":"",
"url":"--",
"message":{
"Exception":"OCA\\DocumentServer\\Document\\DocumentConversionException",
"Message":"namespace error : Namespace prefix wp14 on sizeRelH is not defined\noup 5\" hidden=\"false\"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom=\"page\"\n ^\nnamespace error : Namespace prefix wp14 on pctWidth is not defined\nfalse\"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom=\"page\"><wp14:pctWidth\n ^\nnamespace error : Namespace prefix wp14 on sizeRelV is not defined\np14:pctWidth>0</wp14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom=\"page\"\n ^\nnamespace error : Namespace prefix wp14 on pctHeight is not defined\nwp14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom=\"page\"><wp14:pctHeight\n ^\nnamespace error : Namespace prefix wp14 on sizeRelH is not defined\noup 5\" hidden=\"false\"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom=\"page\"\n ^\nnamespace error : Namespace prefix wp14 on pctWidth is not defined\nfalse\"/><wp:cNvGraphicFramePr/><wp14:sizeRelH relativeFrom=\"page\"><wp14:pctWidth\n ^\nnamespace error : Namespace prefix wp14 on sizeRelV is not defined\np14:pctWidth>0</wp14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom=\"page\"\n ^\nnamespace error : Namespace prefix wp14 on pctHeight is not defined\nwp14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom=\"page\"><wp14:pctHeight\n ^\n",
"Code":0,
"Trace":[
{
"file":"/var/www/html/apps/documentserver_community/lib/DocumentConverter.php",
"line":123,
"function":"run",
"class":"OCA\\DocumentServer\\Document\\ConverterBinary",
"type":"->",
"args":[
"/tmp/oc_tmp_TSq6Tv-.xml",
null
]
},
{
"file":"/var/www/html/apps/documentserver_community/lib/DocumentConverter.php",
"line":78,
"function":"runCommand",
"class":"OCA\\DocumentServer\\DocumentConverter",
"type":"->",
"args":[
{
"__class__":"OCA\\DocumentServer\\Document\\ConvertCommand"
}
]
},
{
"file":"/var/www/html/apps/documentserver_community/lib/Document/DocumentStore.php",
"line":151,
"function":"saveChanges",
"class":"OCA\\DocumentServer\\DocumentConverter",
"type":"->",
"args":[
"*** sensitive parameter replaced ***",
[
"78;AgAAADEA//8BAK2wx7Zo7wIAiwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAA9v///xwAAAA1AC4ANAAuADIALgA0ADYALgBAAEAAUgBlAHYA",
"34;BgAAADYAMwA0AAEAHAABAAAAAQAAAAIAAAAAAAAAAwAAAA=="
],
"/nextcloud/appdata_ocuptj1mtmph/documentserver_community/doc_580245412/saved.docx",
"docx"
]
},
{
"file":"/var/www/html/apps/documentserver_community/lib/LocalAppData.php",
"line":100,
"function":"OCA\\DocumentServer\\Document\\{closure}",
"class":"OCA\\DocumentServer\\Document\\DocumentStore",
"type":"->",
"args":[
"*** sensitive parameters replaced ***"
]
},
{
"file":"/var/www/html/apps/documentserver_community/lib/Document/DocumentStore.php",
"line":164,
"function":"getReadWriteLocalPath",
"class":"OCA\\DocumentServer\\LocalAppData",
"type":"->",
"args":[
{
"__class__":"OC\\Files\\SimpleFS\\SimpleFolder"
},
{
"__class__":"Closure"
}
]
},
{
"file":"/var/www/html/apps/documentserver_community/lib/Document/SaveHandler.php",
"line":56,
"function":"saveChanges",
"class":"OCA\\DocumentServer\\Document\\DocumentStore",
"type":"->",
"args":[
580245412,
[
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
},
{
"__class__":"OCA\\DocumentServer\\Document\\Change"
}
]
]
},
{
"file":"/var/www/html/apps/documentserver_community/lib/BackgroundJob/Cleanup.php",
"line":69,
"function":"flushChanges",
"class":"OCA\\DocumentServer\\Document\\SaveHandler",
"type":"->",
"args":[
580245412
]
},
{
"file":"/var/www/html/lib/public/BackgroundJob/Job.php",
"line":79,
"function":"run",
"class":"OCA\\DocumentServer\\BackgroundJob\\Cleanup",
"type":"->",
"args":[
null
]
},
{
"file":"/var/www/html/cron.php",
"line":125,
"function":"execute",
"class":"OCP\\BackgroundJob\\Job",
"type":"->",
"args":[
{
"__class__":"OC\\BackgroundJob\\JobList"
},
{
"__class__":"OC\\Log"
}
]
}
],
"File":"/var/www/html/apps/documentserver_community/lib/Document/ConverterBinary.php",
"Line":64,
"CustomMessage":"Error while applying changes for document 580245412"
},
"userAgent":"--",
"version":"18.0.4.2"
}
I do receiv a lot of these issues too. Would be good to understand the impact and possible user issues to be able to prepare work arounds. Issue remains in NC 18.0.3
Impact seems to be that OnlyOffice is completely unable to both write edited documents back to nextcloud files and to export these (resulting in 'Unknown error' in OnlyOffice when trying to export a document).
I suspect this to be the root cause for https://github.com/nextcloud/documentserver_community/issues/12 and https://github.com/nextcloud/documentserver_community/issues/100 (et al) as it prevents turning the edited document into a stream - which could perfectly explain why there is nothing to save or export.
same issue at my site. OnlyOffice does not save changed documents.
Same here... specific documents created in MS Word are causing this error to me.
They are unable to save, print and so on.
Updated Community Server but Error remains!
Problem is that with both the normal cron and an explicit occ documentserver:flush
all documents in OnlyOffice are processed in a deterministic order. As of no exception handling in that outer loop in documentserver:flush the first document throwing an exception stops the whole thing cold for the rest. A deterministic error (like the internal format error one gets when importing a document created with a recent version of Microsoft Office, which changed the file format yet again to force other to upgrade) can never resolve, that turns all documents later in the queue into permanent zombies that no longer save, export, whatnot even when being perfectly fine indvidually.
One workaround against individual documents breaking the intact ones is to catch and simply discard the exception so processing continues for the rest. This still breaks saving/export of all 'incompatible' documents, but only these.
Adding the exception handling from /apps/documentserver_community/lib/BackgroundJob/Cleanup.php to /apps/documentserver_community/lib/Command/FlushChanges.php (in case you plan on using that to reduce the problem with modified documents not being written back to NextCloud within a reasonable time) does that trick.
You can additionally hack the code to test for stuff like the format errors of this topic to silently ignore them and not create an exception for these... then things seem to return to 'normal', at least for this topic. For this you want to extend /apps/documentserver_community/lib/Document/ConverterBinary.php line 63 by adding further tests to the
if ($error) {
throw new DocumentConversionException($error);
to make it ignore the problems your imported documents give you. Simply making sure that 'Namespace prefix wp14' is not in $error did the trick for me (though I would expect that other versions of Word than what my users threw at it might need additional treatment).
My solution was switching to a libreoffice-online installation and the official collabora connector, that seems to work without having this and the other issues with the OnlyOffice community document server (like the delayed writing back to the NextCloud file store even when things work). Needs a bit more resources on the server, but at least it works...
if ($error and !(preg_match('/\Namespace\b/', $error))) { throw new DocumentConversionException($error); } else { return $output; }
I modified /apps/documentserver_community/lib/Document/ConverterBinary.php like the above code. As @GregorKopka already mentioned it: It doesn't really solve the issue but it lets occ continue flushing the other files.
Helped me as well. Could we at least get the workaround into the release-version that documents with issues get skipped? I wondered why even in verbose-mode the cli-command for documentserver:flush does not show any error - no warning and not that it finished without continuing to other documents. That was just visible in nextcloud.log.
the only thing that helped me was setup document server in with docker
same to me, NC: 21.0.1, documentserver_community/ version 6.1.1
OCA\DocumentServer\Document\DocumentConversionException: namespace error : Namespace prefix wp14 on sizeRelH is not defined rawingml/2006/main"/></wp:cNvGraphicFramePr><wp14:sizeRelH relativeFrom="margin" ^ namespace error : Namespace prefix wp14 on pctWidth is not defined ain"/></wp:cNvGraphicFramePr><wp14:sizeRelH relativeFrom="margin"><wp14:pctWidth ^ namespace error : Namespace prefix wp14 on sizeRelV is not defined 4:pctWidth>0</wp14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom="margin" ^ namespace error : Namespace prefix wp14 on pctHeight is not defined 14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom="margin"><wp14:pctHeight ^ namespace error : Namespace prefix wp14 on sizeRelH is not defined rawingml/2006/main"/></wp:cNvGraphicFramePr><wp14:sizeRelH relativeFrom="margin" ^ namespace error : Namespace prefix wp14 on pctWidth is not defined ain"/></wp:cNvGraphicFramePr><wp14:sizeRelH relativeFrom="margin"><wp14:pctWidth ^ namespace error : Namespace prefix wp14 on sizeRelV is not defined 4:pctWidth>0</wp14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom="margin" ^ namespace error : Namespace prefix wp14 on pctHeight is not defined 14:pctWidth></wp14:sizeRelH><wp14:sizeRelV relativeFrom="margin"><wp14:pctHeight ^ /var/www/html/nextcloud/apps/documentserver_community/lib/DocumentConverter.php - line 125:
OCA\DocumentServer\Document\ConverterBinary->run() /var/www/html/nextcloud/apps/documentserver_community/lib/DocumentConverter.php - line 80: OCA\DocumentServer\DocumentConverter->runCommand() /var/www/html/nextcloud/apps/documentserver_community/lib/Document/DocumentStore.php - line 156: OCA\DocumentServer\DocumentConverter->saveChanges() /var/www/html/nextcloud/apps/documentserver_community/lib/LocalAppData.php - line 102: OCA\DocumentServer\Document\DocumentStore->OCA\DocumentServer\Document{closure}("*** sensiti ... *") /var/www/html/nextcloud/apps/documentserver_community/lib/Document/DocumentStore.php - line 176: OCA\DocumentServer\LocalAppData->getReadWriteLocalPath() /var/www/html/nextcloud/apps/documentserver_community/lib/Document/SaveHandler.php - line 58: OCA\DocumentServer\Document\DocumentStore->saveChanges() /var/www/html/nextcloud/apps/documentserver_community/lib/BackgroundJob/Cleanup.php - line 71: OCA\DocumentServer\Document\SaveHandler->flushChanges() /var/www/html/nextcloud/lib/public/BackgroundJob/Job.php - line 80: OCA\DocumentServer\BackgroundJob\Cleanup->run() /var/www/html/nextcloud/cron.php - line 128: OCP\BackgroundJob\Job->execute()
i can confim the same message for Nextcloud 21.0.4 and Community Document Server 0.1.11. (Ubuntu 20.04, nginx+Apache)
Anything we can do to help fixing this bug?
I can also confirm in Nextcloud 21.0.4, also using the same setup as above, anyone updated to Nextcloud 22.1.1 ? does this resolve the issue?, my nextlcoud log is getting very BIG!
I can confirm that these errors are still continuing with Nextcloud 22.1.1 to stop the errors I have to switch off CRON
I have to switch off CRON
Thats definitely a bad idea!
I have to switch off CRON
Thats definitely a bad idea!
Is there anything else I can do?
I have the same Problem
Hello,
I have the same issue with :
- Nextcloud 23.0.7.
- onlyoffice: 7.4.4
- documentserver_community: 0.1.12
Here would be a temporary solution suggestion to get the error gone.
https://github.com/nextcloud/documentserver_community/issues/149#issuecomment-744633102
Here would be a temporary solution suggestion to get the error gone.
https://github.com/nextcloud/documentserver_community/issues/59#issuecomment-648586941 solves this by trapping the exception that is caused by the document, so the outer loop over all documents will continue.
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 60 days. Thank you for your contribution!
Retaking repo management include inheritance of old, not treated, and probablty obsolete issues, this is why it was decided to mark issues as stale.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.