Photon flash OTA problem

Does the flash eventually complete? The 30 second delay is common for me (can result either from blocking application code or some usages of TCP), but the flash still happens and usually completes fine. What exact messages do you get on the console when you try to flash?

The version number / hash is published on a full handshake with the cloud (which updates the version number in Particle Products). You can force this by having a cloud function that can call Particle.publish("spark/device/session/end", "", PRIVATE); to double check, or use a variable if needed.