SDK install always fails with Vbox createvm, can't set Device for Kit [SOLVED]

Ubuntu 18 bionic
vboxmanage 5.2.42_Ubuntur137960

[SOLVED the vbox INSTALL problem, i think, see below]

Output (repeated this so often, this is output from the shell where Maintain Sailfish SDK is running):

[3512280] Warning: VBoxManage: error: Could not find a registered machine named ‘Sailfish OS Build Engine’\nVBoxManage:
[3512280] Warning: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports\nVBoxManage: error: Context: “FindMachine(Bstr(VMNameOrUuid).raw(), machine.asOutParam())” at line 2871 of file VBoxManageInfo.cpp\n
[3512284] Warning: sfdk.vms: [W] Process “/usr/bin/VBoxManage” exited with unexpected exit code 1 . Arguments: (“showvminfo”, “Sailfish OS Build Engine”, “–machinereadable”)\n
[3512284] Warning: [D] SOFT ASSERT: “ok” in file …/…/…/…/sailfish-qtcreator/src/libs/sfdk/buildengine.cpp, line 468\n
[3512284] Warning: [D] SOFT ASSERT: “!reader.hasError()” in file …/…/…/…/sailfish-qtcreator/src/libs/sfdk/buildengine.cpp, line 653\n
[3512321] Warning: VBoxManage
[3512321] Warning: :
[3512321] Warning: error:
[3512321] Warning: Could not find a registered machine named ‘Sailfish OS Build Engine’
[3512321] Warning: \n
[3512321] Warning: VBoxManage: error:
[3512322] Warning: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports\nVBoxManage: error: Context: “FindMachine(Bstr(VMNameOrUuid).raw(), machine.asOutParam())” at line 2871 of file VBoxManageInfo.cpp\n
[3512334] Warning: sfdk.vms: [W] Process “/usr/bin/VBoxManage” exited with unexpected exit code 1 . Arguments: (“showvminfo”, “Sailfish OS Build Engine”)\n
[3512336] Warning: sfdk.lib: [W] VmConnection: “Failed to start virtual machine \“Sailfish OS Build Engine\””\n
[3512367] Warning: VBoxManage: error: Could not find a registered machine named ‘Sailfish OS Build Engine’\nVBoxManage
[3512367] Warning: : error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports\nVBoxManage: error: Context: “FindMachine(Bstr(VMNameOrUuid).raw(), machine.asOutParam())” at line 2871 of file VBoxManageInfo.cpp\n
[3512379] Warning: sfdk.vms: [W] Process “/usr/bin/VBoxManage” exited with unexpected exit code 1 . Arguments: (“showvminfo”, “Sailfish OS Build Engine”)\n
[3512415] Warning: VBoxManage: error: Could not find a registered machine named ‘Sailfish OS Build Engine’\n
[3512416] Warning: VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports\nVBoxManage: error: Context: “FindMachine(Bstr(pszVM).raw(), machine.asOutParam())” at line 595 of file VBoxManageMisc.cpp\n
[3512428] Warning: sfdk.vms: [W] Process “/usr/bin/VBoxManage” exited with unexpected exit code 1 . Arguments: (“startvm”, “Sailfish OS Build Engine”, “–type”, “headless”)\n
[3512428] Warning: No virtual machine with the name “Sailfish OS Build Engine” found. Check your installation.

If I do this manually (for instance vboxmanage createvm --name ‘Sailfish OS Build Engine’ --register --basefolder /home/mwa/SailfishOS/mersdk) I can add the images.

I even managed to get the emulator running.

This is so slow and time consuming since the installer download again and again.

virtualbox is fine (in that I have Plan9 and Freebsd images running without issues).

What can I do? I tried a complete re-install and it’s the same again and again.

I’ve also tried deleting all .config/Sailfish* , manually deleting all Sailfish VMs in Virtualbox first, deleting the Sailfish directories by hand. Of course, each time the same files are downloaded again, and again.

I’m going to have to plant a lot of trees.

Does anyone have a bash script for maintaining the sdk?

Heavy. So, although I tried removing everything with the maint tool it missed one file:
rm .cache/SailfishSDK/libsfdk/vminfo.xml

Then I clean swept anything like Sailfish.

And then it worked. I’ll pay for a bash script. Or maybe I’ll build one.

I’m doing all this to fix ONE app. Uhg.

Oh. Boy. I really don’t want to be ‘one of those posters’. Here I go.

In the SDK, general errors:
Error connecting to “Sailfish OS Build Engine” virtual machine: Failed to establish SSH conection with virtual machine “Sailfish OS Build Engine”: SSH connection failure.
ssh: connect to host 127.0.0.1 port 2222: Connection timed out
(Consider increasing SSH connection timeout in options.)

But obviously I’m missing something else:
16:15:34: Cannot deploy: Missing Sailfish OS device information in the kit
Error while building/deploying project componentgallery (kit: SailfishOS-3.4.0.24-armv7hl (in Sailfish OS Build Engine))
When executing step “RPM”

I’m targetting ALL devices :wink: I have a Volla phone. And and FP2.

Build targets aren’t set AT ALL. So for 3.4, set it to the OS emulator and compiles work.

The SSH connection error seems ‘unimportant’?

But the Emulator can’t be saved as a setting in Device for the Kit.

Stuck. Hmm.

The value that is not being set for the 3.4 kit is:
<value type="QString" key="PE.Profile.Device">Sailfish OS Emulator 3.4.0.24</value>
In ~/.config/SailfishSDK/qtcreator/profiles.xml

vboxmanage 5.2.42_Ubuntur137960

Quite an ancient version. If possible, I would first try installing an up to date VBox version before spending more time investigating the issues.

If I do this manually (for instance vboxmanage createvm --name ‘Sailfish OS Build Engine’ --register --basefolder /home/mwa/SailfishOS/mersdk) I can add the images.

This is definitely not going to work. Much more needs to be done to fully set-up the VMs - that’s what the SDK installer takes care about.

This is so slow and time consuming since the installer download again and again.

You may consider to use the offline installer then - download once, use many times.

I did try using the offline installer.

The SDK page stated Ubuntu 18 is supported and to use the Virtualbox from the Distro. I’m not sure what I’m supposed to do.

In any case, the offline installer went to fetch the images anyway. took just as long. I used both online and SailfishSDK-3.4.9-linux64-offline.run.

The manual vbox installs I did were a one to one replication from the installer logs. So I did EVERY step, every modifyvm, etc. And that would work, but the toolchain wasn’t completely installed.

In any case I have everything installed now, after completely removing everything (including vbox) but can’t use it since I can’t configure the 3.4 Kit to use the emulator as a Device.

Offline installers come with the latest i486 and armv7hl build targets and the latest emulator bundled. If you select some additional targets/emulators, then those needs to be downloaded. Does this explain your case?

Yes, the distro-provided VBox should work, but VBox itself is also a frequent source of issues like this, so checking with different (not necessarily newer) version is always worth to try.

Setting up the installation comprises too many steps. I would try harder cleaning the environment in hope it makes the installer work before investigating further and trying to fix it manually. Ensure you run the installer with every option set to default first.

Please share the full installer log (run with --verbose).

I explicitly wanted only the arm install, assuming that is all I need. I had tried to keep it really minimal. In any case, after removing an errant file, the install had succeeded. I have arleady done compiles (with target 3.4 arm) I just didn’t get to testing in the emulator.

As per your comments on my emulator / device config, I’m obviously expecting something other that what needs to take place.

The emulator is not an arm device, so you can’t use arm target for building packages which you plan to deploy on the emulator. You need i486 target for that.

Yup. That’s what marty said. The 3.4 emulator is broken, but that’s another thread.