Mirror backup broken since XO 6.3.0 release, "Error: Cannot read properties of undefined (reading 'id')"
-
Hi,
Thanks for the report. I'm checking with the XOA team to see if this is a known issue.
Regards, Dan
-
@Danp just upgraded XOA from 6.1.2 to 6.3.1
same error{ "data": { "id": "bc54f9a7-ca66-4c7c-9c35-c37a715af458", "type": "remote" }, "id": "1775058349205", "message": "export", "start": 1775058349205, "status": "failure", "end": 1775058349205, "result": { "message": "Cannot read properties of undefined (reading 'id')", "name": "TypeError", "stack": "TypeError: Cannot read properties of undefined (reading 'id')\n at IncrementalRemoteWriter._prepare (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:93:39)\n at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:87:32\n at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/Task.mjs:108:24\n at Zone.run (/usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/node-zone/index.js:80:23)\n at Task.run (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/Task.mjs:106:23)\n at IncrementalRemoteWriter.prepare (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:87:17)\n at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/IncrementalRemote.mjs:92:48\n at callWriter (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/_Abstract.mjs:33:15)\n at IncrementalRemoteVmBackupRunner._callWriters (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/_Abstract.mjs:52:14)\n at IncrementalRemoteVmBackupRunner._run (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/IncrementalRemote.mjs:92:18)" } } ], "end": 1775058349208, "result": { "message": "Cannot read properties of undefined (reading 'id')", "name": "TypeError", "stack": "TypeError: Cannot read properties of undefined (reading 'id')\n at IncrementalRemoteWriter._prepare (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:93:39)\n at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:87:32\n at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/Task.mjs:108:24\n at Zone.run (/usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/node-zone/index.js:80:23)\n at Task.run (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/Task.mjs:106:23)\n at IncrementalRemoteWriter.prepare (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:87:17)\n at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/IncrementalRemote.mjs:92:48\n at callWriter (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/_Abstract.mjs:33:15)\n at IncrementalRemoteVmBackupRunner._callWriters (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/_Abstract.mjs:52:14)\n at IncrementalRemoteVmBackupRunner._run (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/IncrementalRemote.mjs:92:18)" } }, -
(file:///usr/local/lib/node_modules/@x
fix is here https://github.com/vatesfr/xen-orchestra/pull/9667
-
@florent made the modification and restarted the xo-server
but still have the problem
[22:13 01] xoa:_vmRunners$ cat _AbstractRemote.mjs|grep -B5 -A 5 schedule constructor({ config, job, healthCheckSr, remoteAdapters, schedule, settings, sourceRemoteAdapter, throttleGenerator, throttleStream, vmUuid, -- super() this.config = config this.job = job this.remoteAdapters = remoteAdapters this._settings = settings this.scheduleId = schedule.id this.timestamp = undefined this._healthCheckSr = healthCheckSr this._sourceRemoteAdapter = sourceRemoteAdapter this._throttleGenerator = throttleGenerator -- adapters: remoteAdapters, BackupWriter, config, healthCheckSr, job, schedule, vmUuid, settings, }) ) } else { -- new BackupWriter({ adapter, config, healthCheckSr, job, schedule, vmUuid, remoteId, settings: targetSettings, }) ) [22:13 01] xoa:_vmRunners$need to modify anything else ? I noticed only 2 line modifications in #9667
-
tried either by manual run, or relaunched the schedule to see if context of schedule was needed to get id of the schedule, but to no avail

schedule or schedule.id seems to be undefined
-
-
@Pilow Hi,
As you already tried a patch on your server, can you try to also update the line 110 of @xen-orchestra/backups/_runners/_writers/_AbstractAggregatedRemoteWriter.mjs- const scheduleId = this.#props.scheduleId + const scheduleId = this.#props.schedule?.id ?? this.#props.scheduleIdThank you
-
- const scheduleId = this.#props.schedule?.id ?? this.#props.scheduleId
done,
but still same error"result": { "message": "Cannot read properties of undefined (reading 'id')", "name": "TypeError", "stack": "TypeError: Cannot read properties of undefined (reading 'id')\n at IncrementalRemoteWriter._prepare (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:93:39)\n at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:87:32\n at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/Task.mjs:108:24\n at Zone.run (/usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/node-zone/index.js:80:23)\n at Task.run (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/Task.mjs:106:23)\n at IncrementalRemoteWriter.prepare (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:87:17)\n at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/IncrementalRemote.mjs:92:48\n at callWriter (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/_Abstract.mjs:33:15)\n at IncrementalRemoteVmBackupRunner._callWriters (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/_Abstract.mjs:52:14)\n at IncrementalRemoteVmBackupRunner._run (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/IncrementalRemote.mjs:92:18)" } } ], "end": 1775118782797, "result": { "message": "Cannot read properties of undefined (reading 'id')", "name": "TypeError", "stack": "TypeError: Cannot read properties of undefined (reading 'id')\n at IncrementalRemoteWriter._prepare (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:93:39)\n at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:87:32\n at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/Task.mjs:108:24\n at Zone.run (/usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/node-zone/index.js:80:23)\n at Task.run (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/Task.mjs:106:23)\n at IncrementalRemoteWriter.prepare (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:87:17)\n at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/IncrementalRemote.mjs:92:48\n at callWriter (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/_Abstract.mjs:33:15)\n at IncrementalRemoteVmBackupRunner._callWriters (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/_Abstract.mjs:52:14)\n at IncrementalRemoteVmBackupRunner._run (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/IncrementalRemote.mjs:92:18)" } }, -
@Pilow ooh sorry, I did not see that you have a proxy. You need to fix it in the proxy too.
Edit: in fact, you just have to put the changes of IncrementalRemoteWriter.mjs in proxy node_modules, the rest is optional
-
@pierrebrunet with your modification on XO PROXies, it seems to be working now !

I should have thought about the proxy doing the actual job...
-
I only modified @florent code, not the second one you gave me
-
@Pilow perfect!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login