GCP Reboot Loop

  1. My goal is:
    Prevent reboot loop if gcp config is set with incomplete values.

  2. My actions are:
    Set only gcp.enable to true.

  3. The result I see is:

[Jul 15 15:12:02.747] mgos_gcp.c:349          gcp.project, region, registry and key are required
[Jul 15 15:12:02.769] mgos_deps_init.c:132    gcp init failed
[Jul 15 15:12:02.769] mgos_freertos.c:204     MGOS init failed: -32
[Jul 15 15:12:03.280] mgos_vfs.c:990          Unmounting filesystems
[Jul 15 15:12:03.280] mgos_vfs.c:959          /: forced unmount with 1 refs
[Jul 15 15:12:03.288] mgos_system.c:42        Restarting
  1. My expectation & question is:

Can I catch init errors to prevent reboot loops? If the device is also connected to mDash, this error prevents a fallback connection to fix any configuration.

If mgos_gcp_init fails, the application fails to initialize.

Yeah, I knew that already - you see the result under point 3. My question is how I can prevent a reboot. I’m using mos.yml config to setup gcp. I’dont think this behavior is practical and I have to use mqtt manually.

Do not set gcp.enable true in mos.yml.
Use mos gcp-iot-setup to provision the device.

1 Like

Hi team, I can see this as becoming an issue that could only be fixed by a RMA to the factory.

Is there a soft way to fail? Then theoretically a local web app could restore some keys and fix it up.