Cannot do HTTPS requests in google chrome

  1. My goal is: To achieve HTTPS
  2. My actions are: Created the ssl_cert and ssl_key files, configured those files in mos.yml and http.listen_addr = 443
  3. The result I see is: I can able to open the web page(index.html) when I enter the https://IPAddress in Microsoft edge but the same thing when I try In google chrome I am getting BEGIN CORE DUMP ERROR
  4. My expectation & question is: The HTTPS Should work in all commonly used browsers and why it is working only in edge as of now

Please look at the attached screenshot

A core dump should not occur under those circumstances. Did you add anything that can cause that ?
Are you using the latest release ?
If your answers are yes and no; you should get the core dump and pack it with your application and report that. mos tool should have caught the dump and saved it to a file in your current directory (that mos: catching core dump)

Thank you for the response

I am using the latest release of mos tool and mongoose OS, No other time the Begin Core Dump error occurs, It occurs only at the time when I hit the IP(https://device_IP_address) In google chrome. In Microsoft Edge and Internet Explorer, I can access the web page by entering the IP (https://device_IP_address).

I have had no problems with Firefox or curl. You should post the application you are using and your core dump somewhere, otherwise no one can follow what is going on.

Firefox and Chrome do not behave the same way.

Firefox waits with “Warning: Potential Security Risk Ahead”

[Jul 30 11:03:19.335] mg_ssl_if_mbedtls.c:31  0x3ffc639c ciphersuite: TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256
[Jul 30 11:03:19.339] SW ECDH curve 3
[Jul 30 11:03:20.550] mg_ssl_if_mbedtls.c:31  0x3ffc639c is a fatal alert message (msg 48)
[Jul 30 11:03:20.559] mg_ssl_if_mbedtls.c:31  0x3ffc639c mbedtls_ssl_handle_message_type() returned -30592 (-0x7780)
[Jul 30 11:03:20.566] mg_ssl_if_mbedtls.c:31  0x3ffc639c mbedtls_ssl_read_record() returned -30592 (-0x7780)
[Jul 30 11:03:20.571] mg_ssl_if_mbedtls.c:207 0x3ffc84ac mbedTLS error: -0x7780
[Jul 30 11:03:20.577] mgos_mongoose.c:66      New heap free LWM: 214596

After accepting the exception

[Jul 30 11:04:55.962] mg_ssl_if_mbedtls.c:31  0x3ffc639c ciphersuite: TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256
[Jul 30 11:04:55.966] SW ECDH curve 3
[Jul 30 11:04:56.715] mgos_mongoose.c:66      New heap free LWM: 214012
[Jul 30 11:04:56.944] mgos_http_server.c:180  0x3ffc6984 HTTP connection from 192.168.0.99:3796
[Jul 30 11:04:56.949] mgos_http_server.c:188  0x3ffc6984 GET /
[Jul 30 11:05:01.388] main.c:25               Tick uptime: 140.96, free_heap: 226708, min_free_heap: 214012

Chrome opens 3 connections before presenting the warning about the self signed certificate and somehow an invalid pointer is passed to free

[Jul 30 11:00:30.833] mg_ssl_if_mbedtls.c:31  0x3ffc639c ciphersuite: TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256
[Jul 30 11:00:30.837] SW ECDH curve 3
[Jul 30 11:00:32.043] mg_ssl_if_mbedtls.c:31  0x3ffc639c is a fatal alert message (msg 46)
[Jul 30 11:00:32.052] mg_ssl_if_mbedtls.c:31  0x3ffc639c mbedtls_ssl_handle_message_type() returned -30592 (-0x7780)
[Jul 30 11:00:32.059] mg_ssl_if_mbedtls.c:31  0x3ffc639c mbedtls_ssl_read_record() returned -30592 (-0x7780)
[Jul 30 11:00:32.065] mg_ssl_if_mbedtls.c:207 0x3ffc6998 mbedTLS error: -0x7780    <- 0x3ffc6998=struct mg_connection *nc
[Jul 30 11:00:32.074] mg_ssl_if_mbedtls.c:31  0x3ffc639c ciphersuite: TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256
[Jul 30 11:00:32.077] SW ECDH curve 3
[Jul 30 11:00:32.828] mg_ssl_if_mbedtls.c:31  0x3ffc639c is a fatal alert message (msg 46)
[Jul 30 11:00:32.836] mg_ssl_if_mbedtls.c:31  0x3ffc639c mbedtls_ssl_handle_message_type() returned -30592 (-0x7780)
[Jul 30 11:00:32.844] mg_ssl_if_mbedtls.c:31  0x3ffc639c mbedtls_ssl_read_record() returned -30592 (-0x7780)
[Jul 30 11:00:32.849] mg_ssl_if_mbedtls.c:207 0x3ffc831c mbedTLS error: -0x7780    <- 0x3ffc831c=struct mg_connection *nc
[Jul 30 11:00:32.858] mg_ssl_if_mbedtls.c:31  0x3ffc639c ciphersuite: TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256
[Jul 30 11:00:32.862] SW ECDH curve 3
[Jul 30 11:00:33.613] mg_ssl_if_mbedtls.c:31  0x3ffc639c is a fatal alert message (msg 46)
[Jul 30 11:00:33.622] mg_ssl_if_mbedtls.c:31  0x3ffc639c mbedtls_ssl_handle_message_type() returned -30592 (-0x7780)
[Jul 30 11:00:33.630] mg_ssl_if_mbedtls.c:31  0x3ffc639c mbedtls_ssl_read_record() returned -30592 (-0x7780)
[Jul 30 11:00:33.635] mg_ssl_if_mbedtls.c:207 0x3ffc9c80 mbedTLS error: -0x7780    <- 0x3ffc9c80=struct mg_connection *nc
[Jul 30 11:00:33.680] CORRUPT HEAP: multi_heap.c:477 detected at 0x3ffc6c7c
Loaded core dump from last snippet in  /core
0x40087e9f in invoke_abort ()
    at /opt/Espressif/esp-idf/components/esp32/panic.c:156
156             *((int *) 0) = 0;
#0  0x40087e9f in invoke_abort ()
    at /opt/Espressif/esp-idf/components/esp32/panic.c:156
#1  0x40088024 in abort ()
    at /opt/Espressif/esp-idf/components/esp32/panic.c:171
#2  0x40091f1a in multi_heap_assert (condition=false, line=477,
    address=1073507452,
    format=0x3ffb2e91 "CORRUPT HEAP: multi_heap.c:%d detected at 0x%08x\n")
    at /opt/Espressif/esp-idf/components/heap/multi_heap_platform.h:54
#3  0x4009233c in multi_heap_free_impl (heap=0x3ffbb320, p=0x3ffc6c80)
    at /opt/Espressif/esp-idf/components/heap/multi_heap.c:477
#4  0x40081d34 in heap_caps_free (ptr=<optimized out>)
    at /opt/Espressif/esp-idf/components/heap/heap_caps.c:272
#5  0x4008225c in _free_r (r=0x3ffc08b0, ptr=0x3ffc6c80)
    at /opt/Espressif/esp-idf/components/newlib/syscalls.c:42
#6  0x4000beca in ?? ()
#7  0x4012fc3f in mem_free (rmem=0x3ffc6c80)
    at /opt/Espressif/esp-idf/components/lwip/lwip/src/core/mem.c:176
#8  0x4012fcca in do_memp_free_pool (mem=0x3ffc6c80,
    desc=0x3f415e78 <memp_TCP_PCB>)
    at /opt/Espressif/esp-idf/components/lwip/lwip/src/core/memp.c:432
#9  0x4012fd1e in memp_free (type=MEMP_TCP_PCB, mem=0x3ffc6c80)
    at /opt/Espressif/esp-idf/components/lwip/lwip/src/core/memp.c:489
#10 0x40130968 in tcp_close_shutdown (pcb=0x3ffc6c80,
    rst_on_unacked_data=<optimized out>)
    at /opt/Espressif/esp-idf/components/lwip/lwip/src/core/tcp.c:290
#11 0x40130a1e in tcp_close (pcb=0x3ffc6c80)
    at /opt/Espressif/esp-idf/components/lwip/lwip/src/core/tcp.c:409
#12 0x4016b0bc in tcp_close_tcpip (arg=0x3ffc6c80)
    at common/platforms/lwip/mg_lwip_net_if.c:357
#13 0x4016b09f in xxx_tcpip (arg=0x3ffb5d00 <mgos_task_stack+7752>)
    at common/platforms/lwip/mg_lwip_net_if.c:70
#14 0x4012f9d1 in tcpip_thread (arg=<optimized out>)
    at /opt/Espressif/esp-idf/components/lwip/lwip/src/api/tcpip.c:101
1 Like

I fail to see who’s to blame…
I’m quite rusty on this, looks like the PCB lwIP is freeing has an incorrect chain perhaps ? (#8)

Facing similar issue. Kindly share whats the solution to it.

I’ve filed an issue on mongoose-os

Has been fixed