Debug firmware on Photon

I am continuously updating and rerunning my code for photon, but recently an error message saying “Device is running debug firmware which does not support OTA. Reflash Device OS using Workbench or CLI (particle update)” has been popping up. I have used Particle Workbench to reflash my device and continue to run my code, but the error message continues to appear after running it a couple times.

Is there a way I can prevent this debug firmware from running on my device?

You can try putting your device in DFU Mode and run these commands

particle flash --usb tinker -v
particle update -v

After that put the device in Listening Mode and run

particle serial inspect

and post the output here.

Platform: 6 - Photon
Modules
  Bootloader module #0 - version 502, main location, 16384 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 1512, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 207
  System module #2 - version 1512, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 1512
      Bootloader module #0 - version 400
  User module #1 - version 3, main location, 131072 bytes max size
    UUID: B3A6DCD529BE70FBE24EE959C7305D58E3BC9A04ACDCE8F093C7A1F759097D09
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 6

Any thoughts as to why my device keeps using the debug firmware about every 3rd or 4th time I flash code?

That shouldn’t happen and I haven’t seen this on any of my devices.

Maybe you can file a support ticket about this behaviour (support.particle.io).