Unity on Arch/Manjaro Linux

Hi all! Would other Manjaro users comment their experience?

I’ve downloaded the agnostic installer and everything went fine. Although upon running, it seems it hangs in the splash screen (no output clues in the console).
Perhaps some dependency missing? I’ve checked pretty much everything and I dont find any of it missing…

I tried it on archlinux. It hangs on the splashscreen too. Running it with gdb and then interrupting with ctrl+c and getting a backtrace with bt shows this:

#0  0x00007ffff576d35d in recvmsg () from /usr/lib/libpthread.so.0
#1  0x00007ffff09b8244 in UnixDomainSocket::RecvMsgWithFlags(int, void*, unsigned long, int, ScopedVector<base::ScopedGeneric<int, base::internal::ScopedFDCloseTraits> >*, int*) ()
   from /home/chris/oldhome/unitylinux/unity-editor-5.1.0f3/Editor/libcef.so
#2  0x00007ffff14e4c84 in content::ReceiveFixedMessage(int, char const*, unsigned long, int*) () from /home/chris/oldhome/unitylinux/unity-editor-5.1.0f3/Editor/libcef.so
#3  0x00007ffff14e6f28 in content::ZygoteHostImpl::Init(std::string const&) () from /home/chris/oldhome/unitylinux/unity-editor-5.1.0f3/Editor/libcef.so
#4  0x00007ffff12373c7 in content::BrowserMainLoop::EarlyInitialization() () from /home/chris/oldhome/unitylinux/unity-editor-5.1.0f3/Editor/libcef.so
#5  0x00007ffff123bd9b in content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&) () from /home/chris/oldhome/unitylinux/unity-editor-5.1.0f3/Editor/libcef.so
#6  0x00007ffff08fa627 in CefMainDelegate::RunProcess(std::string const&, content::MainFunctionParams const&) () from /home/chris/oldhome/unitylinux/unity-editor-5.1.0f3/Editor/libcef.so
#7  0x00007ffff316a1e5 in content::RunNamedProcessTypeMain(std::string const&, content::MainFunctionParams const&, content::ContentMainDelegate*) () from /home/chris/oldhome/unitylinux/unity-editor-5.1.0f3/Editor/libcef.so
#8  0x00007ffff316a2fc in content::ContentMainRunnerImpl::Run() () from /home/chris/oldhome/unitylinux/unity-editor-5.1.0f3/Editor/libcef.so
#9  0x00007ffff08abe00 in CefContext::Initialize(CefMainArgs const&, CefStructBase<CefSettingsTraits> const&, CefRefPtr<CefApp>, void*, bool) () from /home/chris/oldhome/unitylinux/unity-editor-5.1.0f3/Editor/libcef.so
#10 0x00007ffff08ac204 in CefInitialize(CefMainArgs const&, CefStructBase<CefSettingsTraits> const&, CefRefPtr<CefApp>, void*, bool) () from /home/chris/oldhome/unitylinux/unity-editor-5.1.0f3/Editor/libcef.so
#11 0x00007ffff0853e7f in cef_initialize () from /home/chris/oldhome/unitylinux/unity-editor-5.1.0f3/Editor/libcef.so
#12 0x00000000026c4fac in CefInitialize(CefMainArgs const&, CefStructBase<CefSettingsTraits> const&, CefRefPtr<CefApp>, void*, bool) ()
#13 0x00000000010c5054 in CefInstance::Init ()
#14 0x0000000001337569 in WebViewWindow::Initialize ()
#15 0x000000000134945b in NativeWebViewWindow::InitializeAndExitOnFailure ()
#16 0x000000000125c650 in HomeWindow::Show ()
#17 0x00000000011effc4 in Application::InitializeProject ()
#18 0x00000000013ae067 in InitializeUnity ()
#19 0x00007ffff6ba03a3 in ?? () from /usr/lib/libglib-2.0.so.0
#20 0x00007ffff6b9f90d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#21 0x00007ffff6b9fce0 in ?? () from /usr/lib/libglib-2.0.so.0
#22 0x00007ffff6ba0002 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#23 0x00007ffff78c8467 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#24 0x00000000004b371c in main ()

It’s waiting in libcef for some message from a socket while initializing some WebViewWindow…

You can try returning the CEFInstance::Init prematurely with

(gdb) frame 13
#13 0x00000000010c5054 in CefInstance::Init ()
(gdb) return
Make CefInstance::Init() return now? (y or n) y
#0  0x0000000001337569 in WebViewWindow::Initialize ()
(gdb) c

This will bring up the unity main window (I think, because the title is Unity 5.1.0f3), but it only displays an empty background. Maybet hat’s because I didn’t let the webview initialize properly… So maybe don’t try that.

Same here!
I found out there is an Editor.log file in ~/.config/unity3d
The last line shows

execv failed: No such file or directory

although it doesn’t specify which file it failed to execute…

That last message gave me a clue. I moved the unity folder outside my downloads folder and now it goes past the splash. Seems to be its because of a localized character (çê) in the my downloads folder name

Oh right, a log file.

CreateDirectory '/home/chris/.local/share/unity3d/Unity' failed:
The setuid sandbox is not running as root. Common causes:
  * An unprivileged process using ptrace on it, like a debugger.
  * A parent process set prctl(PR_SET_NO_NEW_PRIVS, ...)
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted

Something with suid not working at the place where the chrome sandbox was.

So I moved it to /opt/Unity/ (so that the editor is in /opt/Unity/Editor/Unity) and now it starts. Hangs on “Connecting” though.

Edit: Killed it and tried again and now the login window comes up. But trying to login only produces the message “Service not available, please try again later”.

[CEF] Service not available, please try again later.  in file:///%2Fopt%2FUnity%2FEditor%2FData%2FResources%2FHome/src/pn-login/login.js at line 96
[CEF] Service not available, please try again later.  in file:///%2Fopt%2FUnity%2FEditor%2FData%2FResources%2FHome/src/pn-login/login.js at line 96
[CEF] Service not available, please try again later.  in file:///%2Fopt%2FUnity%2FEditor%2FData%2FResources%2FHome/src/pn-login/login.js at line 96

Argh - can you post the path where you had the issue?

Ok, same thing happened here and the Editor.log said:

So I went there and /home/nibodhika/.local/share/unity3d/ didn’t exist, I created it ran again and fixed. Probably they are running mkdir instead of mkdir -p

Edit: I also got stuck on the login screen, it seems the problem is somewhere in unity-editor-5.1.0f3/Editor/Data/Resources/Home/src/services/auth.js the login function is returning an error with status 0, so the url is returning an empty data… will investigate further.

Oh, also it’s worth noting that I’m on Arch, so probably all Arch based distros are experiencing this problem.

was
/home/nuno/Transferências
moved it to /home/nuno and the problem was solved. Now I’m getting the “service not available” issue.

It didn’t hang for me on arch but I can’t get past the service not available even after creating ~/.local/share/unity3d/Unity

Apparently in angular you have to use catch() instead of error() to get an error message for http.post(). But it seems that statusText is “” anyway and status is 0. And apparently that means, that the CORS stuff fails. But for some users it works, so it can’t be on the server side…

At least

curl -v -H "Content-Type: application/json" -X POST -d '{"grant_type": "password", "username": "MYEMAIL", "password": "MYPASSWORD"}' https://core.cloud.unity3d.com/api/login

Seems to work fine.

I saw javascript - How to enable CORS in AngularJs - Stack Overflow and tried

    var a = angular.module('unity.services.auth', ['unity.services.config', 'unity.services.cookie']);
        a.config(['$httpProvider', function($httpProvider) {
                $httpProvider.defaults.useXDomain = true;
                delete $httpProvider.defaults.headers.common['X-Requested-With'];
            }
        ])

in auth.js but it doesn’t seem to do anything.

Someone who knows anything about angular and javascript might want to look at that…

Edit: Maybe discuss this issue at Service not available - Unity Engine - Unity Discussions

I was just checking on that, using catch instead of error doesn’t seem to make a difference. It’s calling error with status=0 for some reason.

Yup, that works for me as well, and I tried sending all those parameters to the deferred.reject to see them in the GUI and they all seem correct… so No idea what is happening… But this seems like an arch specific thing

Ok, I managed to bypass the Singin by running

curl -v -H "Content-Type: application/json" -X POST -d '{"grant_type": "password", "username": "MYEMAIL", "password": "MYPASSWORD"}' https://core.cloud.unity3d.com/api/login

and

curl -v -H "AUTHORIZATION: Bearer <access_token you got from the previous command>" -H "Content-Type: application/json" -X GET https://core.cloud.unity3d.com/api/users/me

Opening a server and responding with those responses to the /api requests and directing the requests in auth.js to my server… But it’s useless because now I’m stuck in the updating license thing… and I guess I could do the same, but this is a pointless exercice, it’s more usefull to discover why this is happening.

I’m pretty sure chromium is blocking the CORS requests, the question is why it happens only on arch… I’m checking the system libraries that the editor is using but I didn’t get anywhere yet.

hmm, I’m not sure maybe all network requests are failing. I edited the index.html and added an iframe pointing to google.com and that doesn’t work either.

Ok, found what’s causing this: chrome-sandbox is not allowing the request to pass forward because of security reasons. I created a login screen in an angularjs app and got the same error, after running this on a chromium with --disable-web-security it managed to get an answer. It seems the unity server does not have CORS support… It’s strange that this is not happening on other distros.

Anyone knows the equivalent of --disable-web-security for chrome-sandbox?

For me it’s completely working but a friend of mine reported Service not available too.
Both on Arch.

I tried running running wireshark in a attempt see what the CORS headers are set to, but their doesn’t appear to come any thing through. Is it failing before it even tries to reaches the internet?

What are the differences in the systems? Are you or is he a web developer? do you have different versions of something installed? If we know it’s not arch related but rather a given package version (or package installed) we might get closer to find a workaround

I cannot reach him today anymore, he is quite busy. We are both up2date though.
I can ask him for a list of packages that are installed though and diff them. Also I told him to make sure he has all dependencies installed that are listed in the forum.

While that, I also created a PKGBUILD that should give you a working setup as it adds all dependencies that I have installed too (and are linked again):
https://aur.archlinux.org/packages/unity-editor/

I have not actually tested developing with unity though, neither have I done webdevelopment (nor he has), so this might be incomplete or partly wrong/too strict in terms of dependencies. Feedback welcome!

1 Like