Sailfish IDE unable to deploy after 4.0.1 SDK update

Hi folks,

I updated my SDK to the latest version and now I am unable to deploy neither RPM nor binaries with the Sailfish IDE.

Here is the command line output of a binary only deployment:

23:23:03: The process “/home/mm/.config/SailfishSDK/libsfdk/build-target-tools/Sailfish OS Build Engine/SailfishOS-4.0.1.48-armv7hl/make” exited normally.
23:23:03: Test Device Connection: Testing connection to “Xperia XA2 (ARM)”…
23:23:04: Deploying binaries…
23:23:04: Starting: “/home/mm/.config/SailfishSDK/libsfdk/build-target-tools/Sailfish OS Build Engine/SailfishOS-4.0.1.48-armv7hl/deploy” --rsync

  • /opt/SailfishOS/libexec/qtcreator/…/…/bin/sfdk -c target=SailfishOS-4.0.1.48-armv7hl -c ‘device=Xperia XA2 (ARM)’ deploy --rsync
    [D] SOFT ASSERT: “!m_installDir.isEmpty()” in file …/…/…/…/sailfish-qtcreator/src/libs/sfdk/emulator.cpp, line 766
    [D] SOFT ASSERT: “version == 1” in file …/…/…/…/sailfish-qtcreator/src/libs/sfdk/emulator.cpp, line 763
    Fatal: Unable to open ‘/etc/mersdk/share/devices.xml’. Please launch Qt Creator for the first time to finish the installation
    23:23:05: The process “/home/mm/.config/SailfishSDK/libsfdk/build-target-tools/Sailfish OS Build Engine/SailfishOS-4.0.1.48-armv7hl/deploy” exited with code 1.
    Error while building/deploying project harbour-sms-share-plugin (kit: SailfishOS-4.0.1.48-armv7hl (in Sailfish OS Build Engine))
    When executing step “Rsync”
    23:23:05: Elapsed time: 00:06.

If I suspect well the /etc/mersdk/share/devices.xml should be on the build VM. I have ssh’d to the VM and this file is not present.

Is there any way to get/generate such a file?

The soft assertion failures are not nice. Is there a chance you re-installed the SDK into a different location previously?

If you do not have a highly customized (valued) Qt Creator configuration, I’d suggest you to try clearing it as a quick option to start with - (re)move ~/.config/SailfishSDK when Qt Creator is not running.

If you want to keep your configuration, then next option would be to re-register your device and if that does not help then share your

  • /opt/SailfishOS/InstallationLog.txt
  • /opt/SailfishOS/share/qtcreator/SailfishSDK
  • ~/.config/SailfishSDK

and let me check it.

Hello @martyone

Thank you for your help and I appologise for the late reply!
I have never moved the SDK manually, it was upgraded many times in the pas (started somewhere around 2.0).

I did not had any valuable config, so I just deleted all the Sailfish related .config folders.
I still have the following asserts:

+ /opt/SailfishOS/libexec/qtcreator/../../bin/sfdk -c target=SailfishOS-4.0.1.48-armv7hl make
[D] SOFT ASSERT: "!m_installDir.isEmpty()" in file ../../../../sailfish-qtcreator/src/libs/sfdk/emulator.cpp, line 766
[D] SOFT ASSERT: "version == 1" in file ../../../../sailfish-qtcreator/src/libs/sfdk/emulator.cpp, line 763
Building target platforms: armv7hl-meego-linux

However I managed to deploy to my device, so I consider myself happy :smiley:

If the soft assert failure persist after cleaning user configuration, then it unfortunately means the global configuration got corrupted somehow. In this particular case it might help to remove and re-add the emulator package. If it does not help, I’d recommend you to reinstall the SDK to be sure there are no hidden issues.

You mentioned you installed your SDK in 2.x times, which means you are still using the VirtualBox-based build engine, right? Maybe you could take this as an opportunity to give the Docker-based build engine a try? The build performance is much better https://sailfishos.org/wiki/Application_SDK_FAQ#Docker

Thanks for the tip, I will likely reinstall the whole thing.

I was not aware of the docker based solution but I will definitely give it a try.

I have reinstalled the SDK with the docker based one, did some test compilations, no soft asserts are present. Thanks for the docker tip, the compilation got a bit faster.

In the output it still complaining about the missing devices.xml:

22:13:38: Running steps for project sailfish-ble-rc...
22:13:38: Start Build Engine: Starting "sailfish-os-build-engine" virtual machine...
22:13:42: Starting: "/home/mm/.config/SailfishSDK/libsfdk/build-target-tools/sailfish-os-build-engine/SailfishOS-4.0.1.48-armv7hl/qmake" /home/mm/Projektek/jolla/sailfish-ble-rc/sailfish-ble-rc.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
+ /opt/SailfishOS/libexec/qtcreator/../../bin/sfdk -c target=SailfishOS-4.0.1.48-armv7hl qmake /home/mm/Projektek/jolla/sailfish-ble-rc/sailfish-ble-rc.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug

/usr/bin/mb2: line 743: $(get_shared_dir)/devices.xml: No such file or directory

But anyway it works!

Finally a report on missing devices.xml where the context is clear enough to allow reasoning about the possible cause - thanks! :slight_smile: I believe you reinstalled the SDK but kept the user configuration intact. It should be enough to remove and re-add your HW device under Qt Creator to get the missing devices.xml created. This bug will be most likely fixed in the next SDK release.

I believe you reinstalled the SDK but kept the user configuration intact.
Correct!

It should be enough to remove and re-add your HW device under Qt Creator to get the missing devices.xml created.

Yes I done that, and it works okay now.