Arduino Create: Problem accessing Arduino_Create_Bridge

Hi,

I want to use the online Arduino Editor. I am using debian - which I think is not supported.

Problem seems to me Arduino_Create_Bridge is taking HTTP, but Arduino Cloud is retrieving information via HTTPS (e.g. https://localhost:8991/info)

Starting Create Bridge Works but serves HTTP:

~/ArduinoCreateAgent-1.1$ ./Arduino_Create_Bridge_cli
INFO[0000] Version:1.1.76                               
INFO[0000] Hostname: fernice                            
INFO[0000] Garbage collection is on using Standard mode, meaning we just let Golang determine when to garbage collect. 
INFO[0000] You specified a serial port regular expression filter: usb|acm|com
 
INFO[0000] Your serial ports:                           
INFO[0000] 	{/dev/ttyACM0    0x8036 0x2341 HIDFG false}
 
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET   /                         --> main.homeHandler (2 handlers)
[GIN-debug] GET   /certificate.crt          --> main.certHandler (2 handlers)
[GIN-debug] DELETE /certificate.crt          --> main.deleteCertHandler (2 handlers)
[GIN-debug] POST  /upload                   --> main.uploadHandler (2 handlers)
[GIN-debug] GET   /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] POST  /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] WS    /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] WSS   /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] GET   /info                     --> main.infoHandler (2 handlers)
[GIN-debug] POST  /killbrowser              --> main.killBrowserHandler (2 handlers)
[GIN-debug] POST  /pause                    --> main.pauseHandler (2 handlers)
[GIN-debug] POST  /update                   --> main.updateHandler (2 handlers)
[GIN-debug] Listening and serving HTTP on 127.0.0.1:8991

Accessing http://127.0.0.1:8991 via firefox yields:

{"Version" : "1.1.76"}
{"Commands" : ["list", "open [portName] [baud] [bufferAlgorithm (optional)]", "send [portName] [cmd]", "sendnobuf [portName] [cmd]", "close [portName]", "bufferalgorithms", "baudrates", "restart", "exit", "program [portName] [board:name] [$path/to/filename/without/extension]", "programfromurl [portName] [board:name] [urlToHexFile]"]}
{"Hostname" : mysecrethostname"}
{"OS" : "linux"}

When I start the Arduino Web Editor via Arduino Cloud and trace the GET Requests I can see that HTTPS is used to communicate with the Arduino_Create_Bridge which does not work since it is serving via HTTP.

What can I do?

Thanks, Raphael

Hi,

I started the Arduino Create Bridge. The webserver is only serving HTTP not HTTPS.

Console Output:

>~/ArduinoCreateAgent-1.1$ ./Arduino_Create_Bridge_cli
INFO[0000] Version:1.1.76                               
INFO[0000] Hostname: mySecretHostname                           
INFO[0000] Garbage collection is on using Standard mode, meaning we just let Golang determine when to garbage collect. 
INFO[0000] You specified a serial port regular expression filter: usb|acm|com
 
INFO[0000] Your serial ports:                           
INFO[0000] 	{/dev/ttyACM0    0x8036 0x2341 HIDFG false}
 
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET   /                         --> main.homeHandler (2 handlers)
[GIN-debug] GET   /certificate.crt          --> main.certHandler (2 handlers)
[GIN-debug] DELETE /certificate.crt          --> main.deleteCertHandler (2 handlers)
[GIN-debug] POST  /upload                   --> main.uploadHandler (2 handlers)
[GIN-debug] GET   /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] POST  /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] WS    /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] WSS   /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] GET   /info                     --> main.infoHandler (2 handlers)
[GIN-debug] POST  /killbrowser              --> main.killBrowserHandler (2 handlers)
[GIN-debug] POST  /pause                    --> main.pauseHandler (2 handlers)
[GIN-debug] POST  /update                   --> main.updateHandler (2 handlers)
[GIN-debug] Listening and serving HTTP on 127.0.0.1:8991

Response for Request "http://127.0.0.1:8991/info":

{"http":"http://127.0.0.1:8991","https":"https://localhost","origins":"http://local.arduino.cc:8080","update_url":"http://downloads.arduino.cc/","version":"1.1.76","ws":"ws://127.0.0.1:8991","wss":"wss://localhost"}

What can I do next?

Best regards,
Raphael

Hi Raphael,
plese do not cross-post. Are you using the last version of Firefox?

Hi smellai,

please excuse me for cross-posting. Was not intended by me, I thought my first post wasn't stored.

The About-Dialog states I am using Firefox ESR 52.9.0 (64-bit).

OS is:
cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux buster/sid"
lsb_release -a
Description: Debian GNU/Linux testing (buster)
hostnamectl
Operating System: Debian GNU/Linux buster/sid
Kernel: Linux 4.17.0-1-amd64
Architecture: x86-64
uname -r
4.17.0-1-amd64

Thanks,
Raphael

Hi Raphael,
you should update Firefox to last version or use Chrome. Old Firefox versions don't allow communication with localhost in http.

Hi,

thanks a lot, installing a different browser, as suggested solved my problem.
Installed Chromium:
Version 68.0.3440.75 (Developer Build) built on Debian buster/sid, running on Debian buster/sid (64-bit)

Thanks,
Raphael