Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Cloudron Forum

Apps | Demo | Docs | Install

Restore Error - Cannot access 'error' before initialization

Scheduled Pinned Locked Moved Solved Support
restore
8 Posts 5 Posters 444 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 32463 Offline
    32463 Offline
    3246
    wrote on last edited by girish
    #1

    Fresh install on Ubuntu 20.04.3 LTS
    Tried various Chrome-based browsers

    angular.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
    ------
    

    Visit https://www.bebravernow.com for more

    1 Reply Last reply
    1
  • nebulonN Offline
    nebulonN Offline
    nebulon Staff
    wrote on last edited by
    #2

    Can you also take a look at /home/yellowtent/platformdata/logs/box.log to get more info on the error?

    jan.reinhardtJ 1 Reply Last reply
    0
  • jan.reinhardtJ Offline
    jan.reinhardtJ Offline
    jan.reinhardt
    replied to nebulon on last edited by
    #3

    @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

    CDC061F5-B450-4B54-A9DA-1F956020DEEB.jpeg

    1 Reply Last reply
    0
  • girishG Offline
    girishG Offline
    girish Staff
    wrote on last edited by
    #4

    @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 .

    BrutalBirdieB 1 Reply Last reply
    0
  • BrutalBirdieB BrutalBirdie referenced this topic on
  • BrutalBirdieB Offline
    BrutalBirdieB Offline
    BrutalBirdie Staff
    replied to girish on last edited by
    #5

    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
    

    Like my work? Consider donating a drink drink. Cheers!

    1 Reply Last reply
    2
  • girishG Offline
    girishG Offline
    girish Staff
    wrote on last edited by
    #6

    Easier way might be to upgrade to 7.1 and then you can restore from a backup created from 7.1 🙂

    1 Reply Last reply
    0
  • 32463 Offline
    32463 Offline
    3246
    wrote on last edited by
    #7

    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)?

    screencapture-192-168-2-200-restore-html-2022-02-22-22_25_08.png

    Visit https://www.bebravernow.com for more

    BrutalBirdieB 1 Reply Last reply
    0
  • nebulonN nebulon forked this topic on
  • BrutalBirdieB Offline
    BrutalBirdieB Offline
    BrutalBirdie Staff
    replied to 3246 on last edited by
    #8

    @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-cloudron

    did you try to completely remove the mount and the configure it new?

    Like my work? Consider donating a drink drink. Cheers!

    1 Reply Last reply
    1
  • BrutalBirdieB BrutalBirdie referenced this topic on

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Login

  • Don't have an account? Register

  • Login or register to search.