HISE Logo Forum
    • Categories
    • Register
    • Login

    Server download problem...

    Scheduled Pinned Locked Moved General Questions
    22 Posts 3 Posters 923 Views
    Loading More Posts
    • 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.
    • LindonL
      Lindon
      last edited by Lindon

      So I have a server doing some downloads, or more correctly not doing them....

      I start my download and all seems fine but: the Server display tells me this:

      399c026d-cf90-4394-9605-772ec52de3d3-image.png

      ..and it just sits at "waiting" for ever, so the server doesn't seem to be responding, but I've tried a number of servers available to me and they all seem to be doing this, I've also made sure I can download the files no problem by just typing the URL into a browser - and this works

      What am I doing wrong?

      HISE Development for hire.
      www.channelrobot.com

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @Lindon
        last edited by

        @Lindon Do you get the same result with hoppscotch/postman?

        LindonL 1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @d.healey
          last edited by

          @d-healey I will have to reinstall postman on this (newer) machine hang on...

          HISE Development for hire.
          www.channelrobot.com

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @Lindon
            last edited by d.healey

            @Lindon Try hoppscotch, no install required - https://hoppscotch.io/

            I also use restfox because sometimes I get different results - https://restfox.dev/

            LindonL 1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @d.healey
              last edited by

              @d-healey well hopscotch and postman both tell me its fine - and down load the file

              restfox.dev tells me:

              https://channelrobot.com/wp-content//2024/07/Horizen260UpdateData01.zip

              isnt a valid URL as it doesnt have https:// in it - which it clearly does so I guess I don't know how to use that...

              HISE Development for hire.
              www.channelrobot.com

              LindonL d.healeyD 2 Replies Last reply Reply Quote 0
              • LindonL
                Lindon @Lindon
                last edited by

                @Lindon oh hang on worked it out... its failing there replying with this;

                Error: Request failed
                Possible causes for this error:

                1. Given request URL is incorrect or invalid
                2. The server for the url isn't returning a valid response for the created request
                3. The server for the url has an expired or invalid ssl certificate
                4. No CORS headers present for the requested url and requested http method
                5. On the browser version, only https urls and localhost can be loaded at the moment. So if you're hitting a http url, the request will fail because https doesn't like requesting http urls.
                  Points 4 & 5 can be bypassed using the Chrome or Firefox extension for Restfox

                HISE Development for hire.
                www.channelrobot.com

                1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @Lindon
                  last edited by

                  @Lindon Can I test with that URL or does it require authentication?

                  LindonL 1 Reply Last reply Reply Quote 0
                  • LindonL
                    Lindon @d.healey
                    last edited by

                    @d-healey test away it should be public, you can also try this:

                    https://filedn.com/lbcnNB3zs5mQISH63IOtbfX/Horizen20600UpdateData02.sfc

                    HISE Development for hire.
                    www.channelrobot.com

                    ustkU 1 Reply Last reply Reply Quote 0
                    • ustkU
                      ustk @Lindon
                      last edited by ustk

                      @Lindon This is working fine here:

                      Server.setBaseURL("https://channelrobot.com/");
                      
                      var f = FileSystem.getFolder(FileSystem.Downloads).getChildFile("Horizen260UpdateData01.zip");
                      
                      Server.downloadFile("wp-content//2024/07/Horizen260UpdateData01.zip", {}, f, function()
                      {
                      	if (this.data.success && this.getDownloadedTarget().isFile())
                      		this.getDownloadedTarget().show();
                      });
                      
                      d.healeyD 1 Reply Last reply Reply Quote 0
                      • d.healeyD
                        d.healey
                        last edited by d.healey

                        Your zip file just hangs with waiting here - in HISE and in the browser (I'm guessing you're logged in to your wordpress site when you're testing in the browser? Try in a private browser session).

                        It's working now in the browser for me...

                        The sfc file downloads just fine.

                        LindonL 1 Reply Last reply Reply Quote 0
                        • d.healeyD
                          d.healey @ustk
                          last edited by

                          This post is deleted!
                          ustkU 1 Reply Last reply Reply Quote 0
                          • ustkU
                            ustk @d.healey
                            last edited by

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • LindonL
                              Lindon @d.healey
                              last edited by

                              @d-healey hmm, the sfc just sits waiting for me....grrr, not sure whats happening because the server doesnt report anything I can see...

                              HISE Development for hire.
                              www.channelrobot.com

                              ustkU 1 Reply Last reply Reply Quote 0
                              • ustkU
                                ustk @Lindon
                                last edited by ustk

                                @Lindon The SFC works fine here too

                                Server.setBaseURL("https://filedn.com/");
                                
                                var f = FileSystem.getFolder(FileSystem.Downloads).getChildFile("Horizen20600UpdateData02.sfc");
                                
                                Server.downloadFile("lbcnNB3zs5mQISH63IOtbfX/Horizen20600UpdateData02.sfc", {}, f, function()
                                {
                                	if (this.data.success && this.getDownloadedTarget().isFile())
                                		this.getDownloadedTarget().show();
                                });
                                

                                Maybe a cache issue.
                                do you Server.cleanFinishedDownloads() somewhere before or after the function? (pending downloads prevent to start a new action on the same file...)
                                When something get dirty with the download I also noticed restarting Hise can help,

                                LindonL d.healeyD 2 Replies Last reply Reply Quote 0
                                • LindonL
                                  Lindon @ustk
                                  last edited by

                                  @ustk thanks - yes doing all this....

                                  HISE Development for hire.
                                  www.channelrobot.com

                                  1 Reply Last reply Reply Quote 0
                                  • d.healeyD
                                    d.healey @ustk
                                    last edited by

                                    @ustk It's strange that the zip downloads for you but not me or Lindon. I was going to blame the server but if it works on your side maybe it's something on the client. Which commit of HISE are you using? What OS?

                                    LindonL 1 Reply Last reply Reply Quote 0
                                    • LindonL
                                      Lindon @d.healey
                                      last edited by Lindon

                                      @d-healey its quite an old version of HISE - cant update at the moment - the down sides of having a lot of client work at the moment....

                                      But still, and in any case I think I have the problem isolated:

                                      Its a combination of small download file size and trying to save them all to the same temp file....a testing "efficiency" that bit me.. so the server doesn't seem to handle small downloads all trying to land in the same slot(file) as it seems (maybe) that the file write lock isnt yet released by the OS by the time the server wants to write the second file --- so it just hangs. Making everyone write to disk in their own file seems to eventually have solved this - well here's hoping...

                                      HISE Development for hire.
                                      www.channelrobot.com

                                      ustkU 2 Replies Last reply Reply Quote 1
                                      • ustkU
                                        ustk @Lindon
                                        last edited by

                                        @Lindon But then it should work the same for @d-healey and me if he's using the naive script I posted, right?

                                        on my side it's OSX Sonoma 14.3, Hise from 5 days ago (so before today's commit)

                                        @Lindon What prevents you from making a new branch for your side projects? It's always what I do so I can keep track of the default develop. Even running two instances of Hise can be very helpful (well, at least before the Snippet Browser was a thing...)

                                        LindonL 1 Reply Last reply Reply Quote 0
                                        • ustkU
                                          ustk @Lindon
                                          last edited by ustk

                                          @Lindon I had a problem with small files too about a month ago when using a CDN https://forum.hise.audio/topic/9761/problem-downloading-tiny-files

                                          1 Reply Last reply Reply Quote 0
                                          • LindonL
                                            Lindon @ustk
                                            last edited by

                                            @ustk true - just Im ultra conservative about that sort of thing - I really like just one HISE instance on my machine...

                                            HISE Development for hire.
                                            www.channelrobot.com

                                            d.healeyD 1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            54

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            101.8k

                                            Posts