Closed haeferer closed 7 years ago
Ok, I have a fix for this that I'll push out tonight but I need you to verify before this gets closed.
The issue was that our "missed chunk" code wasn't working as we had never really tested it since the beginning of the refactor. For some reason with the 0.6.2 firmware, there is a bad chunk that gets sent. It's the same chunk every time.
I'm not sure if it's the server code that is bad or if there is just a weird edge case with the CRC on one of the chunks. Anyways, this was a good thing to fix anyway as it will greatly improve the reliability of flashing devices. I just hope that we can eventually figure out the root cause.
In order to test this you should just have to update your server and see if the OTA update works.
cc: @AntonPuko
Great. thx. I will test the version in the next 3 hours (as soon as I arrive at the office)
for my understanding. At first run , a specific chunk is "wrong" and reconstructed during Retry, but fails because of the bug. So the 0.6.2 update has still a (this) bad Chunk, but retry works.
Sorry, it does not worked. Now i get exact 10 Warnings (independed from WifiSignal strength)
07:00:59.656Z INFO Flasher.js: Starting FastOTA update (deviceID=1d003b000447333437333039)
07:01:02.720Z INFO Flasher.js: finished waiting
07:01:02.721Z INFO Device.js: releasing flash ownership (deviceID=1d003b000447333437333039)
07:01:02.723Z INFO Device.js: flash device finished! - sending api event (deviceID=1d003b000447333437333039)
07:01:02.725Z INFO headlessmanager.js: Event (data=success, deviceID=1d003b000447333437333039, event=spark/flash/status)
evx: {
"data": "success",
"deviceID": "1d003b000447333437333039",
"name": "spark/flash/status",
"userID": "IucwnZMMuxAd69eQ",
"isInternal": false,
"isPublic": false,
"publishedAt": "2017-07-13T07:01:02.724Z",
"ttl": 60
}
07:01:02.808Z INFO rabbit.js: Queue Send (queueName=EV_spark/flash/status)
07:01:06.380Z INFO DeviceServer.js: Connected Devices (devices=1, sockets=1)
07:01:07.873Z WARN Flasher.js: flasher - chunk missed - recovering
logInfo: {
"cache_key": "_5",
"deviceID": "1d003b000447333437333039"
}
07:01:10.786Z WARN Flasher.js: flasher - chunk missed - recovering
logInfo: {
"cache_key": "_5",
"deviceID": "1d003b000447333437333039"
}
07:01:13.787Z WARN Flasher.js: flasher - chunk missed - recovering
logInfo: {
"cache_key": "_5",
"deviceID": "1d003b000447333437333039"
}
07:01:16.381Z INFO DeviceServer.js: Connected Devices (devices=1, sockets=1)
07:01:16.788Z WARN Flasher.js: flasher - chunk missed - recovering
logInfo: {
"cache_key": "_5",
"deviceID": "1d003b000447333437333039"
}
07:01:19.788Z WARN Flasher.js: flasher - chunk missed - recovering
logInfo: {
"cache_key": "_5",
"deviceID": "1d003b000447333437333039"
}
07:01:22.795Z WARN Flasher.js: flasher - chunk missed - recovering
logInfo: {
"cache_key": "_5",
"deviceID": "1d003b000447333437333039"
}
07:01:25.790Z WARN Flasher.js: flasher - chunk missed - recovering
logInfo: {
"cache_key": "_5",
"deviceID": "1d003b000447333437333039"
}
07:01:26.382Z INFO DeviceServer.js: Connected Devices (devices=1, sockets=1)
07:01:28.792Z WARN Flasher.js: flasher - chunk missed - recovering
logInfo: {
"cache_key": "_5",
"deviceID": "1d003b000447333437333039"
}
07:01:31.793Z WARN Flasher.js: flasher - chunk missed - recovering
logInfo: {
"cache_key": "_5",
"deviceID": "1d003b000447333437333039"
}
07:01:34.794Z WARN Flasher.js: flasher - chunk missed - recovering
logInfo: {
"cache_key": "_5",
"deviceID": "1d003b000447333437333039"
}
07:01:36.383Z INFO DeviceServer.js: Connected Devices (devices=1, sockets=1)
07:01:44.311Z INFO DeviceServer.js: Connection (connectionID=6, deviceID=1d003b000447333437333039, remoteIPAddress=::ffff:217.92.242.230)
07:01:44.312Z ERROR Device.js: Device disconnected (disconnectCounter=1, message="Device was already connected. Reconnecting.")
I've found the problems
Ok, the issue was with tokens. There were a couple of bugs that issues
Great, thx for solving this. I will check on Monday with different other devices and firmware
Im currently trying to OTA Update a Photon which runs an App with firmware 0.6.0. It seems to be stuck in an Loop
the AppHash 7E3EA28C3510F02BE7EA3D533873D6487F1C0FCB806D71F7E6235BE0B8D208B6 is an App compiled against 0.6.2
The Photon logs into WLAN (green etc) , then flickers purple (Loading Data, during OTA Update ) and ends up in a few seconds solid purple (if the Server says OTA Update finished). -> Starts over