Server download problem...
-
@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...
-
@Lindon oh hang on worked it out... its failing there replying with this;
Error: Request failed
Possible causes for this error:- Given request URL is incorrect or invalid
- The server for the url isn't returning a valid response for the created request
- The server for the url has an expired or invalid ssl certificate
- No CORS headers present for the requested url and requested http method
- 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
-
@Lindon Can I test with that URL or does it require authentication?
-
@d-healey test away it should be public, you can also try this:
https://filedn.com/lbcnNB3zs5mQISH63IOtbfX/Horizen20600UpdateData02.sfc
-
@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(); });
-
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.
-
This post is deleted! -
This post is deleted! -
@d-healey hmm, the sfc just sits waiting for me....grrr, not sure whats happening because the server doesnt report anything I can see...
-
@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 youServer.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, -
@ustk thanks - yes doing all this....
-
@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?
-
@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...
-
@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...)
-
@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
-
@ustk true - just Im ultra conservative about that sort of thing - I really like just one HISE instance on my machine...
-
@Lindon said in Server download problem...:
I really like just one HISE instance on my machine...
What I do is I make a copy of my HISE binary, switch branch, build a new binary to do whatever test it is I want, when I'm done I switch back to my original branch and replace the binary with the backup I made - just so I don't have to build it again.
-
@d-healey in the projucer I give the binary a specific name for that particular branch and version control the jucer file for that name (and flags or hardened runtimes I might need)
This way the versions can live a long life together and have a lot of little snippets…