Stuck in a loop : Error applying device configuration

My app is stuck looping on this error, over and over. It functions as expected, but this is all over my logs:

05.05.17 05:05:15 (+0200) Error applying device configuration: Error: update "deviceConfig" set "targetValues" = '{"RESIN_DEVICE_RESTART":"22721591521521378","RESIN_OVERRIDE_LOCK":"0","RESIN_SUPERVISOR_DELTA":"1"}' - SQLITE_READONLY: attempt to write a readonly database
05.05.17 05:06:15 (+0200) Error applying device configuration: Error: update "deviceConfig" set "targetValues" = '{"RESIN_DEVICE_RESTART":"22721591521521378","RESIN_OVERRIDE_LOCK":"0","RESIN_SUPERVISOR_DELTA":"1"}' - SQLITE_READONLY: attempt to write a readonly database

If I log into the VM, I can see that the root partition has been remounted read-only. I see this sort of message in dmesg output:

[ 9294.341858] BTRFS (device mmcblk0p6): parent transid verify failed on 84470878208 wanted 126357 found 125639
[ 9294.354914] BTRFS (device mmcblk0p6): parent transid verify failed on 84470878208 wanted 126357 found 125639
[ 9354.468048] BTRFS (device mmcblk0p6): parent transid verify failed on 84470878208 wanted 126357 found 125639
[ 9354.476265] BTRFS (device mmcblk0p6): parent transid verify failed on 84470878208 wanted 126357 found 125639 

I did not have delta enabled, I tried that, but not making a difference. Space on the device is not an issue - 14GB free on /.

If I hard-reboot the device, the app returns to normal for a while, until an error on BTRFS is encountered then it remounts read-only and everything naturally stops working.

Anyone have any advice on how to fix it, please?

Or if someone with access can have a look at apps/250442/devices/478934, I’d appreciate it.

Thanks.

I would recommend upgrading the OS on this device, either to 2.x or soon we will have 1.26.x. We have put a lot of work recently into reducing and solving exactly this sort of problem with FS corruption.

I’m going to provisionally mark this as resolved, but if that isn’t the case just let us know.

Mine is a tale of woe. I couldn’t upgrade to the requested version from the device actions page, I was only offered 1.24.1.

So I downloaded the 2.0.0-dev3 version from the sidebar on the left, and reflashed the device using Etcher.

When the device rebooted, it showed the version still as 1.24.1, so I deleted the device from the application, and rebooted the device expecting it to re-appear in my dashboard.

Now I have nothing. :blush:

At all stages the HDMI output on the device has said ‘Booted - check your resin.io dashboard’.

Does deleting a device stop it from being rediscovered again?

Hey @datashaman currently no way to update through the dashboard from 1.x to 2.x, we are working on it.

If you start the device up, do you have the LED flashing in a pattern of 4-blinks, pause, then repeat? If so, that means the device actually never got online. That seems like the most likely thing that happened. It might be that there are some typos in your wifi credentials?

You can either download a new image quickly from the dashboard (and double-check the wifi credentials when entered)/

Or you can put your SD card into your development machine, mount the resin-boot partition, and in the system-connections directory find the file called resin-wifi. There make sure that the lines of ssid=.... and psk=... contain the right information entered (your wifi SSID and password, respectively).


If you delete the device on the dashboard, it will not recover. It is because if you download an SD card image, that actually does not have a device associated with it, but it creates and provisions (registers to resin.io) a new device when the board first starts up. That also means that the same image you can burn as many times as you want and use it to start up different new devices. But once the image is on the card, and it’s booted for the first time, it won’t try to create a new device again, when it finds that the previous device info is deleted. Let us know if you’d like to have any more info about this! Happy to answer questions! :slight_smile:

I’m using the Ethernet connection, so no input is required, and the connection is fine, I’m using it myself.

Can you reset the status of the device so that it will be recreated again if re-encountered? Is there a way to control that blacklist somehow? I would like to be able to delete a device from the application with the option of allowing it to be re-added.

Hi,

I am not really sure what is going on… please can you download a new ResinOS2.0 image and burn it with etcher (double checking your burning the correct image etc). Put it in the device and let it boot. It should appear on the dashboard :slight_smile:

Sorry we don’t have support for recreating devices that were deleted, hence the big warning sign.

Looking again at what happened, the most likely thing is that somehow (not sure how), you have booted from the original 1.24 image, that would explain everything you’ve experienced afterwards.

As my colleague mentioned, could you write the SD card again with the 2.0.0 image (making sure which image you burn on the SD card and that Etcher finishes verification). It should really work that way. :trumpet:

Sorry for the late reply, the problem was the SD card. It wasn’t accepting writes anymore for some reason. I’ve replaced it and upgraded to the latest 2.0.0-rev3 without a hitch!

Thanks for the assistance!

1 Like

That explains it, thanks for letting us know! :rainbow:
Happy building!