Server API update?
-
Any changes made in the Server api?
Had a working project with a post call and now it has a response time at 20000ms and gives a 301 code (which the server doesn't have). -
@IsoWalle Nothing changed recently as far as I can see.
-
@IsoWalle The default timeout of Hise Server API is 20000 ms. Maybe your server's response time is a little more than that. Have you used an Extra Definition that is something more than this value like
HISE_SCRIPT_SERVER_TIMEOUT=25000
?If not, use this, compile your project and try again. It should work.
NOTE: You can stretch the timeout value as much as you can. But high server response time is not recommended, even 20000 ms is high for some users. So rather than using a higher timeout value, it's better to improve the response time with good server performance.
-
Something else you can do is test all of your server calls with an external tool, I use https://hoppscotch.io/
-
@d-healey It seems that HISE can't connect to internet...
I tried "look for newer versions" in the help tab and it only say "Offline, Could not connect to the server". So my computer is online but HISE doesn't recognize it? -
@IsoWalle yeah that function is super old and I wouldn‘t be surprised if it points to a dead link.
-
-
@IsoWalle Make a simple snippet that fails for you and post it here.
-
HiseSnippet 883.3ocsVstaSyCF1oaA80xAARbAXkekJU5Z4v.wzm93qcanJXaUjwg+g7bbWslicjsSgBZ2EbMv0G2AvqSRaSYkwnR79ip7dx948n6PshxLFkF4U+3ooLj2M7ilJsi6OlvknA6h7tk+ADikowEh5MMkXLrXjm2FO2Ivq9lnb5a+WOhfHorEhPn2n3T1K4Ib6BoCe1K3Bw9jX1w7jJV+vmMfpj8UBUFfmM76fRIzyHmxNj3LqlOx6Z6EysJcjkXYFvldp3oQiUePVX+a3F9IBlioKJBNnBwn9i4h3gyhUCB4s4vEQ9FEQ9c8OfGymKeQF314JvK7nZNvq1kAot+APxqBj1r.R2wOhp4o1EZb3459CjPAYDAR0UgRgsnZesleeEXgz1NgbFaeMvL2ivs6zoEF9o4NMZDwzSX51FlsGwvd8qdYXvXqM07zs1hjxaeFa5ml1lq1Zx82R.0QogYBb9wkBtjgGkIoVtRhUxhSJhIicWsVIBopjTkD.QK7DhHi0rQ850wkzmqx3nIDMNE+u3Oi+YMynfO5n.7SwAuqfB9Uld9NqRiS1bgkQNkHDukaGO7nniCC.bxiCZgSaMOzBMPcMyzBqYFHbLKGF4gxrytpPHIXTBV6TMWZCsZWhe9Iz7Bv67kEcdiY0uSY19yxigAKRxAMcEsxTceHHNAlTBWQYn4NUJRGprrijgMa.o+Fm2.+ypFMZk5JOJASuR0tgX8k4XnLK4DlddePogPW9xiNW6pM5PKxMULTIGH41iRYk76qDwtQB22WbPCUlbcibkHDL0lOvcqxAtdYVqRh3w4KDmmTQ4QP08anWOXWhkL6rfiEtpTl1xcQj2trIvbSwvbc+cYlyrpzbaKKpPR3pcyeD4468E3Bm59nY9dzKru.1TohyDD6xqub6oKU.Elk1Y31KHMb6zp6w+C1o04R2ocUg3c7GxszwqFi0VAFg78eCLV9RvM82azHF0t.fa5u+6V209+lq+UpLKWd5ADql6JxGlkDAO.RYvsKkLgwUuq4ZaK3633cY.WaQNy2ApTYWGuWoxtyThRHTs58zhlc2aM+StD.Sx7mVqCuwC73tyZv886ztCJAd168TpK7uGLIsZet+Z3yCVCed3Z3yiVCe1dM74wqgOO4R8w8ON9+LqJoXb.DLbu7EMdd6IIPmUdWH5G.gzjlJ.
-
@d-healey That should get a 40x error, but it gives a 301 and no response.
-
@IsoWalle 301 is a redirect. I suspect that JUCE doesn't follow the redirect and just returns it. Try it with a different URL that doesn't go through a redirect.
Edit: Looks like my suspicion is correct - https://forum.juce.com/t/how-to-get-url-to-follow-redirects/13563 - although it looks like the problem should have been fixed.
-
@d-healey The thing is that it isn't a redirect, the server has none.
-
@IsoWalle said in Server API update?:
@d-healey The thing is that it isn't a redirect, the server has none.
might depend on your hosting config.
-
I agree with Lindon. There's something on the server side that's not working correctly or is incompatible with requests from HISE.
Even if I put a non-existent URL I get the 301 within HISE
Server.setBaseURL("https://api.keyzy.io/v2/licenses/testingtesting");
And interestingly Hoppscotch doesn't return a 404, instead it gives:
"message": "The POST method is not supported for this route. Supported methods: GET, HEAD, PUT, PATCH, DELETE."
And if I change POST to GET your server returns a 200 status for that non-existent URL...
-
@IsoWalle Some staging servers will block these calls. Could be server-side firewall or antivirus too.
-
@dustbro Any idea why it would work from Hoppscotch and not HISE?
-
@d-healey Maybe it's detecting calls from Hopscotch as a trusted source?
-
@dustbro why would it be a trusted source? You can enter anything there, that‘s maybe the untrustworthiest source ever :)
I think it has something to do with how JUCE handles redirecting calls, I had a similar problem once and it was because of a missing trailing slash.
-
@Christoph-Hart said in Server API update?:
@dustbro why would it be a trusted source?
who knows what various antivirus and firewalls think or do
:grinning_face_with_smiling_eyes: One of my installers gets flagged as a virus in windows 10, but all other windows OS are fine. hahahahHis server may be rejecting POST requests, causing a redirect.
-
@dustbro It works with Hoppscotch though