VirtualBox executer fails with "prepare environment: Process exited with status 1"

I registered the VirtualBox CI runner using gitlab-runner register and by choosing virtualbox as an executor.

However, if I start the runner pipeline in Gitlab, it fails with the following error:

What would be causing this error and how to fix it?

Here’s a link mentioned in the error message: https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading

P.S: I’m using macOS 10.15.5 and the VirtualBox runs Ubuntu 20.04 LTS.