HISE Logo Forum
    • Categories
    • Register
    • Login

    Server API update?

    Scheduled Pinned Locked Moved Scripting
    30 Posts 7 Posters 1.9k 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.
    • I
      IsoWalle
      last edited by

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

      d.healeyD orangeO 2 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey @IsoWalle
        last edited by

        @IsoWalle Nothing changed recently as far as I can see.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        1 Reply Last reply Reply Quote 1
        • orangeO
          orange @IsoWalle
          last edited by orange

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

          develop Branch / XCode 13.1
          macOS Monterey / M1 Max

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

            Something else you can do is test all of your server calls with an external tool, I use https://hoppscotch.io/

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            I 2 Replies Last reply Reply Quote 0
            • I
              IsoWalle @d.healey
              last edited by

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

              Christoph HartC 1 Reply Last reply Reply Quote 0
              • Christoph HartC
                Christoph Hart @IsoWalle
                last edited by

                @IsoWalle yeah that function is super old and I wouldn‘t be surprised if it points to a dead link.

                1 Reply Last reply Reply Quote 0
                • I
                  IsoWalle @d.healey
                  last edited by

                  @d-healey Server call works perfect from hoppscotch.
                  @orange Raised the timeout to 40000ms and now the call takes that long to get an error...

                  The call takes 400ms in hoppscotch so it really seem like an issue with HISE, or my build of Hise anyway.

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

                    @IsoWalle Make a simple snippet that fails for you and post it here.

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

                    I 2 Replies Last reply Reply Quote 0
                    • I
                      IsoWalle @d.healey
                      last edited by

                      @d-healey

                      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.
                      
                      1 Reply Last reply Reply Quote 0
                      • I
                        IsoWalle @d.healey
                        last edited by

                        @d-healey That should get a 40x error, but it gives a 301 and no response.

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

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

                          Libre Wave - Freedom respecting instruments and effects
                          My Patreon - HISE tutorials
                          YouTube Channel - Public HISE tutorials

                          I 1 Reply Last reply Reply Quote 0
                          • I
                            IsoWalle @d.healey
                            last edited by

                            @d-healey The thing is that it isn't a redirect, the server has none.

                            LindonL Dan KorneffD 2 Replies Last reply Reply Quote 0
                            • LindonL
                              Lindon @IsoWalle
                              last edited by

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

                              HISE Development for hire.
                              www.channelrobot.com

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

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

                                Libre Wave - Freedom respecting instruments and effects
                                My Patreon - HISE tutorials
                                YouTube Channel - Public HISE tutorials

                                1 Reply Last reply Reply Quote 0
                                • Dan KorneffD
                                  Dan Korneff @IsoWalle
                                  last edited by

                                  @IsoWalle Some staging servers will block these calls. Could be server-side firewall or antivirus too.

                                  Dan Korneff - Producer / Mixer / Audio Nerd

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

                                    @dustbro Any idea why it would work from Hoppscotch and not HISE?

                                    Libre Wave - Freedom respecting instruments and effects
                                    My Patreon - HISE tutorials
                                    YouTube Channel - Public HISE tutorials

                                    Dan KorneffD 1 Reply Last reply Reply Quote 0
                                    • Dan KorneffD
                                      Dan Korneff @d.healey
                                      last edited by

                                      @d-healey Maybe it's detecting calls from Hopscotch as a trusted source?

                                      Dan Korneff - Producer / Mixer / Audio Nerd

                                      Christoph HartC 1 Reply Last reply Reply Quote 0
                                      • Christoph HartC
                                        Christoph Hart @Dan Korneff
                                        last edited by

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

                                        Dan KorneffD 1 Reply Last reply Reply Quote 0
                                        • Dan KorneffD
                                          Dan Korneff @Christoph Hart
                                          last edited by

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

                                          His server may be rejecting POST requests, causing a redirect.

                                          Dan Korneff - Producer / Mixer / Audio Nerd

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

                                            @dustbro It works with Hoppscotch though

                                            Libre Wave - Freedom respecting instruments and effects
                                            My Patreon - HISE tutorials
                                            YouTube Channel - Public HISE tutorials

                                            Dan KorneffD 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            23

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            103.0k

                                            Posts