Disable the auto-reboot when no server connection

If you are asking a question, please follow this template:

  1. My goal is: [Keep WiFi connect without system reboot]
  2. My actions are:
    [
    Using the library “js-demo-bundle” to perform WiFi connection and WiFi AP mode handling.
    The code working “ok” if I enable MQTT and connected to server.
    But if in config_schema: [“mqtt.enable”, false]
    ]
  3. The result I see is:
    [
    ESP8266 reboot after some time
    << mgos_provision_state:54 Provisioning timeout, resetting device
    << mgos_provision_btn.c:29 Resetting to factory defaults
    ]
  4. My expectation & question is:
    [Disable the auto-reboot when device not seeing server connection]

The standard MQTT code does not reboot the device.
Googling for the file name in your log leads to this library, the library has been designed to provision a device and will do whatever it needs to do that…
Why is that library in your code ? Please post you mos.yml

<< mgos_net.c:86 WiFi STA: connecting
<< mgos_provision_state:44 Current state: 0 -> 1
<< mgos_provision_state:73 Setting provisioning timeout for 300 seconds
<< [WIFI]CONNECTING

libs:

provision.stable_state

It’s better to add only the needed libraries than using the bundles (demo-bundle or js-demo-bundle).

js-demo bundle includes demo-bundle includes provision, here
Follow nliviu’s wise advice and include only what you really need (particularly on 8266 which has a smaller flash)