nextcloud / nextcloud/documentserver_community

Document won't save - cannot set property '$k' of undefined

Open
#79 6 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
142
Forks
32
Avg merge
23h 13m
Merged PRs (30d)
15

Description

Hello,

i had a document that won't save and now i get this error every time the cron job runs:

[documentserver_community] Error: OCA\DocumentServer\Document\DocumentConversionException: change_code: !0!==this.xz?this.Ua:this.ym[a]);if(!1!==e){var h=d.fa.splice(e,1);d.IW(h);AscCommon.Rd.H4(d,e,1);0<e?e<=d.fa.length-1?(d.fa[e-1].$k=d.fa[e],d.fa[e].pk=d.fa[e-1]):d.fa[e-1].$k=null:e<=d.fa.length-1&&(d.fa[e].pk=null);0<=e&&e<=d.fa.length-1&&(d.sh&&d.sh.Nma(e,1),d.j4(e))}}};ak.prototype.vR=function(d){return this.Oa!==d.Oa||AscDFH.aya!==d.ka&&AscDFH.bya!==d.ka?!1:!0};ak.prototype.Mm=function(){return this.DR(Fr)};kl.prototype=Object.create(AscDFH.nm.prototype);kl.prototype.constructor=kl;kl.prototype.ka=
change: Uncaught TypeError: Cannot set property '$k' of undefined
DoctRenderer:<result><error index="3790" /></result>
 at <<closure>>

0. /var/www/html/nextcloud/apps/documentserver_community/lib/DocumentConverter.php line 123
   OCA\DocumentServer\Document\ConverterBinary->run("/tmp/oc_tmp_wpPIBz-.xml", null)
1. /var/www/html/nextcloud/apps/documentserver_community/lib/DocumentConverter.php line 78
   OCA\DocumentServer\DocumentConverter->runCommand(OCA\DocumentServ ... {})
2. /var/www/html/nextcloud/apps/documentserver_community/lib/Document/DocumentStore.php line 151
   OCA\DocumentServer\DocumentConverter->saveChanges("*** sensitive parameter replaced ***", ["78;AgAAADEA//8 ... "], "/srv/nextcloud- ... t", "odt")
3. /var/www/html/nextcloud/apps/documentserver_community/lib/LocalAppData.php line 100
   OCA\DocumentServer\Document\DocumentStore->OCA\DocumentServer\Document\{closure}("*** sensitive parameters replaced ***")
4. /var/www/html/nextcloud/apps/documentserver_community/lib/Document/DocumentStore.php line 164
   OCA\DocumentServer\LocalAppData->getReadWriteLocalPath(OC\Files\SimpleFS\SimpleFolder {}, Closure {})
5. /var/www/html/nextcloud/apps/documentserver_community/lib/Document/SaveHandler.php line 56
   OCA\DocumentServer\Document\DocumentStore->saveChanges(627642030, [OCA\DocumentSer ... }])
6. /var/www/html/nextcloud/apps/documentserver_community/lib/BackgroundJob/Cleanup.php line 69
   OCA\DocumentServer\Document\SaveHandler->flushChanges(627642030)
7. /var/www/html/nextcloud/lib/public/BackgroundJob/Job.php line 79
   OCA\DocumentServer\BackgroundJob\Cleanup->run(null)
8. /var/www/html/nextcloud/cron.php line 125
   OCP\BackgroundJob\Job->execute(OC\BackgroundJob\JobList {}, OC\Log {})

I can also reproduce this error with occ documentserver:flush

Any idea how i can remove the corrupted file?
I tried reinstalling documentserver_community + ONLYOFFICE without success.

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

Reproduce the failure with occ documentserver:flush, then trace the stack from BackgroundJob/Cleanup.php line 69 through Document/SaveHandler.php line 56 and Document/DocumentStore.php line 151 to DocumentConverter.php line 123. Determine how the affected document can be removed or repaired, and confirm that the cron job and manual flush complete without the conversion error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.