Avatar for fraser

fraser

Member since Sep 2016 • Last active Jan 2017
  • 1 conversations
  • 7 comments

Most recent activity

  • in Interfacing
    Avatar for fraser

    Thanks for the replies and thanks for moving this over Gordon. I have been busy so only just got back to the investigation.

    So I tried to call to the SNI spec as Ollie suggested and this didn't work giving the same timeout exception was thrown -- Code below just in case others find this format useful

    require("http").get({
                            host: 'https://preview.gamesparks.net',
    				        path: '/callback/295737vYb5Kd/lamp/kPFrmFnPWrdJuJ69M4DimgXxuhrVRefx/572a4047808eb904a08d149c'
    				    }, function(response) {
    				    	 console.log("Response: ",response);
    				        var body = '';
    					        response.on('data', function(d) {
    					            body += d;
    					        });   
    
    
    					     }
    

    Gordon you are correct in the fact I was recording a false positive by loading a text file to my secure domain and not realising the Expruino was just sending HTTP.

    I have a few Pico's but prefer the original espruino as my project uses more USART's than the Pico has available.

    Good to clarify there is no way the Original Board can do HTTPS

  • in Interfacing
    Avatar for fraser

    Ollie :) :) I think you are on to it! I was hoping for a little nugget like this from someone to send me down the correct avenue (I did send host value I think when I built custom headers but worth another look). I will set it up again this evening when I get in and let you know how it goes. Great spot thanks

  • in Interfacing
    Avatar for fraser

    The formatting has stripped the https:// -- Gone back and code encapsulated

    https://preview.gamesparks.net/callback/­295737vYb5Kd/lamp/kPFrmFnPWrdJuJ69M4Dimg­XxuhrVRefx/572a4047808eb904a08d149c
    

    The request is only available via https (not trying to call http)
    I can call other https endpoints no problem from the Espruino Original & ESP13. Just this URL fails on the ESP which is making the failure hard to debug (does not fail via node, Curl, browser etc)

    Only the ESP has an issue on this specific domain which is why I wondered if there was any response timeout settings that could be tweaked via the Espruino request API?

  • in Interfacing
    Avatar for fraser

    Sorry Ollie I did post this is the wrong place by accident but good info you have provided.
    Can't seem to move the post so it will have to stay I guess.

    TLS does not seem to be on the "original" which I am using (does not identify the module through require). My ESP13 I'm not looking to add Espruino on-board (posted without reading the section name properly); just running it off the USRT serials.

    Now that you're here... :) Are you able to request this URL via HTTP Get via your ESP?

    https://preview.gam­esparks.net/callback/295737vYb5Kd/lamp/k­PFrmFnPWrdJuJ69M4DimgXxuhrVRefx/572a4047­808eb904a08d149c
    

    Does it resolve or timeout for you?

    Don't worry if you are busy -- I'm just hoping by deduction I will find out why my ESP13 throws a timeout error for this URL.

    Cheers

  • in Interfacing
    Avatar for fraser

    Hi All,

    I am using the Espruino Board (not Pico) : Firmware 1.87 (updated to 1.89 but have not retested yet)
    I have not got to the bottom to why my ESP-13 ESP8266 is sensitive to this specific URL and putting this out to you chaps hopefully someone might flag something that I have not considered.

    If you put the address in your browser:

    https://preview.gamesparks.net/callback/295737vYb5Kd/lamp/kPFrmFnPWrdJuJ69M4DimgXxuhrVRefx/572a4047808eb904a08d149c
    

    you will see the result {"lightResponse":"572a4047808eb904a08d149c"}

    My ESP13 will work perfectly for all URLs I have tried via HTTPS/HTTP requests via the request("http").get() api. However calling the above end point will throw a timeout error which makes it seem there is something specific to the host (request time, headers required, cookies needed)

    require("http").get("https://preview.gamesparks.net/callback/295737vYb5Kd/lamp/kPFrmFnPWrdJuJ69M4DimgXxuhrVRefx/572a4047808eb904a08d149c", function(res) {
    				        console.log("Response: ",res);
    				        res.on('data', function(d) {
    				          console.log("--->"+d);
    		                 
    				        });
    				      });
    			
    
     at line 1 col 52
    throw Error("CIPSTART failed ("+(a?a:"Timeout")+")");
    

    I have only really seen Olli have this error with Key signing for TLS. TLS is only available via Pico and I can call other HTTPS endpoints so have to assume certs signing is not the issue (well I will conveniently ignore this potential as I don't have root access to the SaaS being called) :)
    http://forum.espruino.com/conversations/293351/

    I think I need to isolate a couple of things:

    1. Is the issue specific to my ESP13? (unlikely) -- It would be great if someone could call the callback request above from their ESP and see if they get a timeout via http get()
    2. Is the request timeout for request("http") configurable?
    3. Is this an issue because I am using the Espruino Board with HTTPS and not the Pico?

    I have tried writing custom headers passing user agent and cookie etc with no success.

    hmm, any ideas?

    Thanks everyone

    Fraser

  • in JavaScript
    Avatar for fraser

    Hi Gordon

    Did this issue get resolved in an update?

Actions