Restore Error - Cannot access 'error' before initialization
-
Fresh install on Ubuntu 20.04.3 LTS
Tried various Chrome-based browsersangular.js:12011 POST https://192.168.2.200/api/v1/cloudron/restore 500 (anonymous) @ angular.js:12011 n @ angular.js:11776 (anonymous) @ angular.js:11571 (anonymous) @ angular.js:16383 $eval @ angular.js:17682 $digest @ angular.js:17495 $apply @ angular.js:17790 (anonymous) @ angular.js:25890 dispatch @ jquery.min.js:3 r.handle @ jquery.min.js:3 client.js:264 500 {status: 'Internal Server Error', message: "Cannot access 'error' before initialization"} (anonymous) @ client.js:264 (anonymous) @ angular.js:11486 (anonymous) @ angular.js:16383 $eval @ angular.js:17682 $digest @ angular.js:17495 $apply @ angular.js:17790 l @ angular.js:11831 J @ angular.js:12033 t.onload @ angular.js:11966 load (async) (anonymous) @ angular.js:11949 n @ angular.js:11776 (anonymous) @ angular.js:11571 (anonymous) @ angular.js:16383 $eval @ angular.js:17682 $digest @ angular.js:17495 $apply @ angular.js:17790 (anonymous) @ angular.js:25890 dispatch @ jquery.min.js:3 r.handle @ jquery.min.js:3 client.js:265 ------ Cloudron Internal Error If you see this, please send a mail with above log to support@cloudron.io ------
-
@nebulon Have exactly the same problem. Error comes up after uploading the Backup config file.
This is in the box.log:
2022-02-14T20:36:03.307Z box:server ==========================================
2022-02-14T20:36:03.308Z box:server Cloudron 7.0.4
2022-02-14T20:36:03.308Z box:server ==========================================
2022-02-14T20:36:03.370Z box:settings initCache: pre-load settings
2022-02-14T20:36:03.391Z box:tasks stopAllTasks: stopping all tasks
2022-02-14T20:36:03.392Z box:shell stopTask spawn: /usr/bin/sudo -S /home/yellowtent/box/src/scripts/stoptask.sh all
2022-02-14T20:36:03.413Z box:dockerproxy startDockerProxy: started proxy on port 3003
Cloudron is up and running. Logs are at /home/yellowtent/platformdata/logs/box.log
2022-02-14T20:36:03.458Z box:cloudron runStartupTasks: not activated. generating IP based redirection config2022-02-14T20:36:03.460Z box:reverseproxy writeDefaultConfig: writing configs for endpoint "setup"
2022-02-14T20:36:03.461Z box:shell reload spawn: /usr/bin/sudo -S /home/yellowtent/box/src/scripts/restartservice.sh nginx
HttpError: Cannot access 'error' before initialization
at Function.BoxError.toHttpError (/home/yellowtent/box/src/boxerror.js:107:16)
at restore (/home/yellowtent/box/src/routes/provision.js:121:37)
at processTicksAndRejections (internal/process/task_queues.js:95:5) {
status: 500,
internalError: ReferenceError: Cannot access 'error' before initialization
at Object.restore (/home/yellowtent/box/src/provision.js:210:19)
at processTicksAndRejections (internal/process/task_queues.js:95:5),
details: null
}
Box POST /api/v1/cloudron/restore 500 Internal Server Error Cannot access 'error' before initialization 19.997 ms - 99
HttpError: Cannot access 'error' before initialization
at Function.BoxError.toHttpError (/home/yellowtent/box/src/boxerror.js:107:16)
at restore (/home/yellowtent/box/src/routes/provision.js:121:37)
at processTicksAndRejections (internal/process/task_queues.js:95:5) {
status: 500,
internalError: ReferenceError: Cannot access 'error' before initialization
at Object.restore (/home/yellowtent/box/src/provision.js:210:19)
at processTicksAndRejections (internal/process/task_queues.js:95:5),
details: null
}
Box POST /api/v1/cloudron/restore 500 Internal Server Error Cannot access 'error' before initialization 3.243 ms - 99 -
@3246 I guess you are trying to restore from local filesystem mount ? like cifs/sshfs ?
@jan-reinhardt yes, this is a known issue, fix is coming.
The fix is in the next release - https://git.cloudron.io/cloudron/box/-/commit/04b7c14fd71e65072f43ed008d9e8b598dd946ab .
-
-
For anyone running into this specific issue (for me in a restore from 7.0.4) you need to apply the fixes manually:
# Go into the box source folder cd /home/yellowtent/box/ # Download the patches from gitlab wget https://git.cloudron.io/cloudron/box/-/commit/04b7c14fd71e65072f43ed008d9e8b598dd946ab.diff wget https://git.cloudron.io/cloudron/box/-/commit/8b9d821905b55c624084cb7665d8fbdb621a56e4.diff wget https://git.cloudron.io/cloudron/box/-/commit/a786fad3eed59e9ed141c7a3344466b61e280891.diff # Apply the patches git apply 04b7c14fd71e65072f43ed008d9e8b598dd946ab.diff git apply 8b9d821905b55c624084cb7665d8fbdb621a56e4.diff git apply a786fad3eed59e9ed141c7a3344466b61e280891.diff # a box restart systemctl restart box.service
-
Thanks, folks. I applied @BrutalBirdie's patch and it's working without error now.
However, I found that when I enter the values manually and try to restore from a locally mounted NFS share or copy the backup across, it just spins without throwing errors or restoring. Do I always have to use the backup config (I did manage to change the path manually to point it to the latest backup after uploading the restore file)?
-
-
@3246 said in Restore Error - Cannot access 'error' before initialization:
Do I always have to use the backup config (I did manage to change the path manually to point it to the latest backup after uploading the restore file)?
No you don't need the backup file.
https://docs.cloudron.io/backups/#restore-cloudrondid you try to completely remove the mount and the configure it new?
-