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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
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
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. $scope.configureBackup is undefined

$scope.configureBackup is undefined

Scheduled Pinned Locked Moved Solved Support
restore
17 Posts 3 Posters 2.7k Views 3 Watching
  • 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.
  • mehdiM Offline
    mehdiM Offline
    mehdi
    App Dev
    wrote on last edited by girish
    #1

    Hello!

    Trying to migrate my cloudron to a new server, I am running into an issue when trying to import the backup configuration into the new server : on the front end, it seems to load without end. Opening the dev-tools, I see that no request is made, and that there is an error in the console $scope.configureBackup is undefined.

    Additionally, it seems I can only get the web interface to work with Firefox and Safari (which gives me a slightly different error for the backup thing : Error: undefined is not an object (evaluating '$scope.configureBackup.backupFolder'), which actually may give more information).

    Chrome gives me a NET::ERR_CERT_INVALID error, and it is weirdly not bypassable: (sorry, the explanation is in french, with a machine translation following)

    Un chiffrement est normalement utilisé sur le site XX.XX.XX.XX pour protéger vos informations. Lors de la dernière tentative de 
    connexion de Chrome au site XX.XX.XX.XX, des identifiants 
    inhabituels et incorrects ont été retournés. Il est possible qu'un 
    individu malveillant tente de se faire passer pour XX.XX.XX.XX ou 
    qu'un écran de connexion Wi-Fi ait interrompu la connexion. Vos 
    informations restent sécurisées, car nous avons arrêté la 
    connexion avant l'échange des données.
    
    Vous ne pouvez pas consulter le site XX.XX.XX.XX pour le 
    moment, car il a envoyé des identifiants brouillés qui ne peuvent 
    être traités par Chrome. Les erreurs réseau et les attaques sont 
    généralement temporaires. Vous devriez donc pouvoir accéder à 
    cette page ultérieurement.
    
    Encryption is normally used on XX.XX.XX.XX to protect your 
    information. The last time Chrome tried to connect to 
    XX.XX.XX.XX, unusual and incorrect credentials were returned. It 
    is possible that a malicious individual is attempting to impersonate 
    XX.XX.XX.XX or that a Wi-Fi connection screen has interrupted 
    the connection. Your information is still secure because we 
    stopped the connection before the data was exchanged.
    
    You cannot view XX.XX.XX.XX at this time, as it has sent 
    scrambled credentials that cannot be processed by Chrome. 
    Network errors and attacks are usually temporary. So you should 
    be able to access this page later.
    

    This is on 7.0.4, with filesystem backup (and yes, my backup folder is copied onto the new server, at the same location, and owned by the yellowtent user). Any way I can trick the backup into finishing? Willing to do it with a curl command or something similar if necessary.

    girishG 2 Replies Last reply
    0
    • mehdiM mehdi

      Hello!

      Trying to migrate my cloudron to a new server, I am running into an issue when trying to import the backup configuration into the new server : on the front end, it seems to load without end. Opening the dev-tools, I see that no request is made, and that there is an error in the console $scope.configureBackup is undefined.

      Additionally, it seems I can only get the web interface to work with Firefox and Safari (which gives me a slightly different error for the backup thing : Error: undefined is not an object (evaluating '$scope.configureBackup.backupFolder'), which actually may give more information).

      Chrome gives me a NET::ERR_CERT_INVALID error, and it is weirdly not bypassable: (sorry, the explanation is in french, with a machine translation following)

      Un chiffrement est normalement utilisé sur le site XX.XX.XX.XX pour protéger vos informations. Lors de la dernière tentative de 
      connexion de Chrome au site XX.XX.XX.XX, des identifiants 
      inhabituels et incorrects ont été retournés. Il est possible qu'un 
      individu malveillant tente de se faire passer pour XX.XX.XX.XX ou 
      qu'un écran de connexion Wi-Fi ait interrompu la connexion. Vos 
      informations restent sécurisées, car nous avons arrêté la 
      connexion avant l'échange des données.
      
      Vous ne pouvez pas consulter le site XX.XX.XX.XX pour le 
      moment, car il a envoyé des identifiants brouillés qui ne peuvent 
      être traités par Chrome. Les erreurs réseau et les attaques sont 
      généralement temporaires. Vous devriez donc pouvoir accéder à 
      cette page ultérieurement.
      
      Encryption is normally used on XX.XX.XX.XX to protect your 
      information. The last time Chrome tried to connect to 
      XX.XX.XX.XX, unusual and incorrect credentials were returned. It 
      is possible that a malicious individual is attempting to impersonate 
      XX.XX.XX.XX or that a Wi-Fi connection screen has interrupted 
      the connection. Your information is still secure because we 
      stopped the connection before the data was exchanged.
      
      You cannot view XX.XX.XX.XX at this time, as it has sent 
      scrambled credentials that cannot be processed by Chrome. 
      Network errors and attacks are usually temporary. So you should 
      be able to access this page later.
      

      This is on 7.0.4, with filesystem backup (and yes, my backup folder is copied onto the new server, at the same location, and owned by the yellowtent user). Any way I can trick the backup into finishing? Willing to do it with a curl command or something similar if necessary.

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      @mehdi Are you getting this error, when you go to https://ip/restore.html ? (i.e this is not an app restore, correct?) It seems to me that some resource is not loading correctly, because of the cert issues. Does curl -k https://ip/restore.html work OK?

      mehdiM 1 Reply Last reply
      0
      • mehdiM mehdi

        Hello!

        Trying to migrate my cloudron to a new server, I am running into an issue when trying to import the backup configuration into the new server : on the front end, it seems to load without end. Opening the dev-tools, I see that no request is made, and that there is an error in the console $scope.configureBackup is undefined.

        Additionally, it seems I can only get the web interface to work with Firefox and Safari (which gives me a slightly different error for the backup thing : Error: undefined is not an object (evaluating '$scope.configureBackup.backupFolder'), which actually may give more information).

        Chrome gives me a NET::ERR_CERT_INVALID error, and it is weirdly not bypassable: (sorry, the explanation is in french, with a machine translation following)

        Un chiffrement est normalement utilisé sur le site XX.XX.XX.XX pour protéger vos informations. Lors de la dernière tentative de 
        connexion de Chrome au site XX.XX.XX.XX, des identifiants 
        inhabituels et incorrects ont été retournés. Il est possible qu'un 
        individu malveillant tente de se faire passer pour XX.XX.XX.XX ou 
        qu'un écran de connexion Wi-Fi ait interrompu la connexion. Vos 
        informations restent sécurisées, car nous avons arrêté la 
        connexion avant l'échange des données.
        
        Vous ne pouvez pas consulter le site XX.XX.XX.XX pour le 
        moment, car il a envoyé des identifiants brouillés qui ne peuvent 
        être traités par Chrome. Les erreurs réseau et les attaques sont 
        généralement temporaires. Vous devriez donc pouvoir accéder à 
        cette page ultérieurement.
        
        Encryption is normally used on XX.XX.XX.XX to protect your 
        information. The last time Chrome tried to connect to 
        XX.XX.XX.XX, unusual and incorrect credentials were returned. It 
        is possible that a malicious individual is attempting to impersonate 
        XX.XX.XX.XX or that a Wi-Fi connection screen has interrupted 
        the connection. Your information is still secure because we 
        stopped the connection before the data was exchanged.
        
        You cannot view XX.XX.XX.XX at this time, as it has sent 
        scrambled credentials that cannot be processed by Chrome. 
        Network errors and attacks are usually temporary. So you should 
        be able to access this page later.
        

        This is on 7.0.4, with filesystem backup (and yes, my backup folder is copied onto the new server, at the same location, and owned by the yellowtent user). Any way I can trick the backup into finishing? Willing to do it with a curl command or something similar if necessary.

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by girish
        #3

        @mehdi said in $scope.configureBackup is undefined:

        trying to import the backup configuration into the new server

        FWIW, you can just fill that form manually instead of importing from the json file and see if that helps. If you open up the json, you can just fill up those values in the form.

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

          I found this curious trick in https://dblazeski.medium.com/chrome-bypass-net-err-cert-invalid-for-development-daefae43eb12 . It says if you type “badidea” or “thisisunsafe” , it will let you proceed!

          mehdiM 1 Reply Last reply
          0
          • mehdiM Offline
            mehdiM Offline
            mehdi
            App Dev
            wrote on last edited by
            #5

            On Firefox, I see no error either on the console tab nor on the network tab before the "main" error when I am trying to restore. Yes, this is indeed on the https://IP/restore.html page, not for an app restore

            1 Reply Last reply
            0
            • girishG girish

              @mehdi said in $scope.configureBackup is undefined:

              trying to import the backup configuration into the new server

              FWIW, you can just fill that form manually instead of importing from the json file and see if that helps. If you open up the json, you can just fill up those values in the form.

              mehdiM Offline
              mehdiM Offline
              mehdi
              App Dev
              wrote on last edited by
              #6

              @girish Same error when filling the form manually

              1 Reply Last reply
              0
              • girishG girish

                I found this curious trick in https://dblazeski.medium.com/chrome-bypass-net-err-cert-invalid-for-development-daefae43eb12 . It says if you type “badidea” or “thisisunsafe” , it will let you proceed!

                mehdiM Offline
                mehdiM Offline
                mehdi
                App Dev
                wrote on last edited by
                #7

                @girish Nice trick. Just tried it, i managed to get the page in Chrome. However, I still get the same error : TypeError: Cannot read properties of undefined (reading 'backupFolder') is the exact wording in Chrome

                1 Reply Last reply
                0
                • girishG girish

                  @mehdi Are you getting this error, when you go to https://ip/restore.html ? (i.e this is not an app restore, correct?) It seems to me that some resource is not loading correctly, because of the cert issues. Does curl -k https://ip/restore.html work OK?

                  mehdiM Offline
                  mehdiM Offline
                  mehdi
                  App Dev
                  wrote on last edited by
                  #8

                  @girish said in $scope.configureBackup is undefined:

                  Does curl -k https://ip/restore.html work OK?

                  Yes, it does work OK.

                  girishG 1 Reply Last reply
                  0
                  • mehdiM mehdi

                    @girish said in $scope.configureBackup is undefined:

                    Does curl -k https://ip/restore.html work OK?

                    Yes, it does work OK.

                    girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by
                    #9

                    @mehdi OK, just to rule out the obvious, I tried to backup/restore 7.0.4 install myself and it seems to work. I used Vultr Object Storage.

                    Not sure what the problem is, do you think you can send the IP to support@cloudron.io ? And maybe the json as well (it doesn't have the secrets, so should be safe).

                    mehdiM 1 Reply Last reply
                    0
                    • girishG girish

                      @mehdi OK, just to rule out the obvious, I tried to backup/restore 7.0.4 install myself and it seems to work. I used Vultr Object Storage.

                      Not sure what the problem is, do you think you can send the IP to support@cloudron.io ? And maybe the json as well (it doesn't have the secrets, so should be safe).

                      mehdiM Offline
                      mehdiM Offline
                      mehdi
                      App Dev
                      wrote on last edited by
                      #10

                      @girish maybe it's specific to the filesystem backup restore process? I can send you the IP, sure, but to be safe (as I had not seen the new generate-setup-token parameter in the doc ^^) I have systemctl stop box for the time being. Can I enable generate-setup-token after the initial install, with the CLI ?

                      1 Reply Last reply
                      0
                      • mehdiM Offline
                        mehdiM Offline
                        mehdi
                        App Dev
                        wrote on last edited by
                        #11

                        I have managed to add a SETUP_TOKEN after the fact (for anyone interested, simply run openssl rand -hex 10 > /etc/cloudron/SETUP_TOKEN as root). I have sent you the IP and token by email.

                        BTW, I have also tried other backup providers on the interface (with arbitrary data in the form), and they seem to indeed send a web request. So I believe the issue is on the front-end side, and specific to the filesystem backup provider.

                        1 Reply Last reply
                        1
                        • mehdiM Offline
                          mehdiM Offline
                          mehdi
                          App Dev
                          wrote on last edited by mehdi
                          #12

                          @girish Found the error : https://git.cloudron.io/cloudron/dashboard/-/blob/master/src/js/restore.js#L292

                          backupConfig.backupFolder = $scope.configureBackup.backupFolder;
                          

                          should be

                          backupConfig.backupFolder = $scope.backupFolder;
                          
                          1 Reply Last reply
                          0
                          • mehdiM Offline
                            mehdiM Offline
                            mehdi
                            App Dev
                            wrote on last edited by
                            #13

                            Now getting an error 400 setup token required. The setup token is in the URL, and in the network tab i do see it being sent in the request...

                            1 Reply Last reply
                            0
                            • mehdiM Offline
                              mehdiM Offline
                              mehdi
                              App Dev
                              wrote on last edited by
                              #14

                              Managed to get the restore working, by fixing the /home/yellowtent/box/dashboard/dist/js/restore.js file manually on the server, with the fix explained above, and removing the SETUP_TOKEN file. I did not go to the length of looking for the root cause of the setup token thing not working, probably the variable being sent inside an object instead of at the root of the JSON request or something.

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

                                Great investigation! I have fixed up that copy and paste error in the restore.js now

                                mehdiM 1 Reply Last reply
                                1
                                • nebulonN nebulon

                                  Great investigation! I have fixed up that copy and paste error in the restore.js now

                                  mehdiM Offline
                                  mehdiM Offline
                                  mehdi
                                  App Dev
                                  wrote on last edited by
                                  #16

                                  @nebulon Thanks ! I'll let you look for the precise fix for the SETUP_TOKEN problem by yourselves though ^^

                                  girishG 1 Reply Last reply
                                  1
                                  • mehdiM mehdi

                                    @nebulon Thanks ! I'll let you look for the precise fix for the SETUP_TOKEN problem by yourselves though ^^

                                    girishG Offline
                                    girishG Offline
                                    girish
                                    Staff
                                    wrote on last edited by
                                    #17

                                    @mehdi this was indeed a bug in the restore code path. the setupToken, as you guessed, should be sent in the top level object and not as part of the backupConfig . Fixed now.

                                    1 Reply Last reply
                                    2
                                    • girishG girish referenced this topic on
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                    • Login

                                    • Don't have an account? Register

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