Improbable Icon

Permissions denied on spatial diagnose


#1

Hi Everyone,

So i’ve been following the 13.0 setup instructions on Mac with Unity 2017.3.0f3 and I’m stuck on the last step. When I do ‘spatial diagnose’ from the main directory in the pirates sample I get…

Encountered an error during command execution.
    fork/exec /Users/marcfielding/.improbable/bin/plugins/sdk/13.0.0/sdk: permission denied
    permission denied

The directories seem to have the right ownership and groups, sometimes the command takes a long time which leads me to believe something else is happening rather than a permissions issue.

I’ve had a read through and can’t see any other forum posts relating to this, any ideas please?

Thanks

Marc Fielding


#2

Hi Marc, - thanks for reporting this, I’ll try and help get it resolved.

Just to check - could you verify that the executable bit on this file is set?

You can try and ensure it is by running:

chmod +x /Users/marcfielding/.improbable/bin/plugins/sdk/13.0.0/sdk

and then doing your spatial diagnose again.

Cheers!


#3

Hi!

So yep I did try that, sorry for not mentioning it, I now get

Encountered an error during command execution.
    fork/exec /Users/marcfielding/.improbable/bin/plugins/sdk/13.0.0/sdk: exec format error
    exec format error

#4

Interesting. Could you try file /Users/marcfielding/.improbable/bin/plugins/sdk/13.0.0/sdk? I get this output on macOS:

Mach-O 64-bit executable x86_64

If yours differs then you may have the wrong architecture for your machine.


#5

Hey Joel I just nipped out will be back in a couple of hours thanks for your help will update when I get in!


#6

So when I run that command I get:

Marcs-MacBook-Pro:PiratesTutorial-master marcfielding$ file /Users/marcfielding/.improbable/bin/plugins/sdk/13.0.0/sdk
/Users/marcfielding/.improbable/bin/plugins/sdk/13.0.0/sdk: empty
Marcs-MacBook-Pro:PiratesTutorial-master marcfielding$

I get this regardless of if I use brew or the installer.


#7

Hi Joel,

So i’ve been tinkering with this, I totally deleted spatial and also the improbably directory in my home dir.

Now, I think I found the problem, I must have missed it with terminal scroll previously. The first time I run spatial diagnose from the pirates home dir I get…

Visiting url: https://auth.improbable.io/auth/v1/authorize?client_id=improbable_cli_client_go&redirect_uri=http%3A%2F%2Flocalhost%3A12000%2Fauthcode&response_type=code&scope=[*]%3A*
Retrieved information for package type ‘sdk-toolbelt’ with name ‘mac’ and version ‘13.0.0’
Attempting to download plugin for SpatialOS version 13.0.0

Encountered an error during command execution.
    Could not find plugin for SpatialOS version 13.0.0.
    Please check the SDK version is correct in your project's spatialos.json configuration file.; could not retrieve binary for plugin from server; server response code was 404
    could not retrieve binary for plugin from server; server response code was 404
    server response code was 404

I’ve made sure I’m signed in to the console just to double check the auth is working.

This would explain why the sdk is empty, unfortunately when this happens spatial doesn’t notice and then you get stuck with the first error I was getting, you have to manually delete the .improbably dir to try again.

The spatialos.json is the default one that comes with the pirates repo(note I tried changing the project name to see if that made any difference, nope.)

{
    "name": "your_project_name_here",
    "project_version": "1.0.0",
    "sdk_version": "13.0.0",
    "dependencies": [
    	{"name": "standard_library", "version": "13.0.0"}
    ]
}

Thanks

Marc


#8

Thanks for this information, it’s super useful for our debugging. Three more things to try! Thanks for your patience. :slight_smile:

  1. Could you first delete your ~/.improbable directory and then run: spatial diagnose --log_level=debug and send us the log?

  2. Try doing spatial auth logout and then spatial auth login, just to make sure something hasn’t gone wrong with your token.

  3. Could you tell us what you get from spatial version?


#9

Hey Joel,

So the results of the debug are:

Plugins cannot be enabled for incompatible SDK version '13.0.0'.
using local event logger
starting wrapper services endpoint
health-check message from wrapper service received
wrapper service started successfully in 2.556142ms after 1 attempt(s)
going to upload events
uploader is done
Attempting to retrieve SDK toolbelt plugin from Package Service.
Retrieving information for package type 'sdk-toolbelt' with name 'mac' and version '13.0.0'...
Starting auth code listener for auth url "https://auth.improbable.io/auth/v1/authorize?client_id=improbable_cli_client_go&redirect_uri=http%3A%2F%2Flocalhost%3A12000%2Fauthcode&response_type=code&scope=%5B%2A%5D%3A%2A"
Visiting url: https://auth.improbable.io/auth/v1/authorize?client_id=improbable_cli_client_go&redirect_uri=http%3A%2F%2Flocalhost%3A12000%2Fauthcode&response_type=code&scope=%5B%2A%5D%3A%2A
Auth code server got GET /authcode?code=eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00iLCJraWQiOiIwMDA0IiwiemlwIjoiREVGIn0.pFwsr9HU9IRYD_DPInhWOO7hsBY95pN5hHZtk0qR8yWOlAy6USHo-JdCNy20YXVXin7BckVvzdcCJUIt2r_u8S9WM_zsWKYe-x6q9eu48v_6Islns0JDKXImxDwzxKvVvG_JxKiJVqqPh3VIsYKpgYorONDdu7DOQzIusvvtSmw.nANj0n4IwGdCvzEV.kTVPhJP13rXrQ5ZBwk1b38-_V7SHdwvL0N_kw5SqxbTIgQXokjR8nS8sQAHhGyoBWH9tfnMwakTO0zqSDHtjrLOiJUQRqkHf6XHEaKa0GsP_1Drdc68poqIISG_h-i0f3e-UDNFwO63FgxvFb0s0eXlsqQK8ZlC5Usec4nNaS2Vpi7onTYG4rLB8YkaSqwEcfjwyH8R8NiA7qHkR4tJiBsDbgTV_uDeXbNcaZ6G7DBwh4_FGI2tMMgqdo1DSSlQQZOYSJCptEjwyPZreDvfShh-exK5-81-4crmiYwwTcs3oyrb-jduU8PaqZ5vsadcFsrwCl0COMQxZ8OlHzB-lk_Hlv9EibAy4oWGNOrcJVEEnoU9PoO5DMzDXRR9jY9M6Tp1TjEsC63gSO2oTWYGLLyD9kdmYRf1uW0aALKq6D-wLEcfPUu2LN4MbpaVOyK3WwMiQQbGFrOd8colr--iXObKMs2dQJwOYZjU.BYTuaytGb8qcwg6UTmrSqg&state=
Retrieved information for package type 'sdk-toolbelt' with name 'mac' and version '13.0.0'
Downloading package type 'sdk-toolbelt' with name 'mac' and version '13.0.0' to '/Users/marcfielding/.improbable/bin/plugins/sdk/13.0.0/sdk'...
Received download URL: https://storage.googleapis.com/improbable-packages-private/sdk-toolbelt/mac/13.0.0/1f2e081a57f5d4602588d2ddceb45bc3?Expires=1527675361&GoogleAccessId=56260027111-427eh55vcs7gne2i6d6qaa60egsj9k6t%40developer.gserviceaccount.com&Signature=LIDtaiGc1k1bddlAZhCR7gXh7w4HvP13DbtyHiC1NzummzO3nvVyinNuO%2Bfk37cqDLLgy8np2X3hIh4Vi8L2ERmCti7Xc2Y1BkX%2F1luoVns6kdk6nqo27gEiS2Wp3o8t3pYfHaWTRaJ92itTIT3t%2FxYH3LbHtDGuFqLz9b8RirQ%3D
Attempting to retrieve SDK toolbelt plugin from Spiderman.
Attempting to download plugin for SpatialOS version 13.0.0
Encountered an error during command execution.
    Could not find plugin for SpatialOS version 13.0.0.
    Please check the SDK version is correct in your project's spatialos.json configuration file.; could not retrieve binary for plugin from server; server response code was 404
    could not retrieve binary for plugin from server; server response code was 404
    server response code was 404

Clearing the auth gives the same output afterward.

Spatial version is

SpatialOS SDK version for project 'marcfielding_project': 13.0.0.
'spatial' command-line tool version: 20180517.134058.605129e572.
SpatialOS SDK versions installed locally: 13.0.0.

#10

Hello @marcfielding,

We have been able to find the root cause of your issue with the help of your DMs: as you were attempting to run spatial while on a limited public WiFi network the command-line tool was unable to reach the Google Storage APIs in order to fetch the necessary packages to work with the 13.0.0 release.

Unfortunately, because of the nature of the issue, there’s not much we can do about it on our end, if you run into the issue again, try spatial troubleshoot networking and see if all the tests pass.

Note: You can still develop locally with Spatial offline if you’re able to set up while having proper online access by following these steps.


#11

So here’s the crazy bit, if I launch offline it eventually fails but it does install the sdk, now spatial diagnose actually works - I’m not convinced this is my bad lol

This is the local launch log…

Marcs-MacBook-Pro:PiratesTutorial-master marcfielding$ cat /Users/marcfielding/Downloads/PiratesTutorial-master/logs/spatial.log

==========> Opened at 2018-05-31 19:16:38.76709781 +0100 BST m=+0.004106104
==========> Opened at 2018-05-31 19:16:38.768246812 +0100 BST m=+0.005255158
debug In '', /var/folders/v0/rsdsvzsj677_lw7ndl7t160c0000gn/T/improbable_extracted_packages/ecdfdcb5e0a632d210db346b38042f54/schema_compiler [--schema_path=/Users/marcfielding/Downloads/PiratesTutorial-master/schema --schema_path=/Users/marcfielding/Downloads/PiratesTutorial-master/build/dependencies/schema/standard_library --load_all_schema_on_schema_path]
error /Users/marcfielding/Downloads/PiratesTutorial-master/build/dependencies/schema/standard_library: schema path does not exist.
error ************************************
Error: exit status 1
************************************

info See the full log of what happened here:
    /Users/marcfielding/Downloads/PiratesTutorial-master/logs/spatial.log

info Or re-run to see more information in the console:
    spatial prepare-for-run --log_level=debug

info 'spatial prepare-for-run' failed formatting_hints=category:FAILURE duration:<seconds:3 nanos:886729137 > 
==========> Opened at 2018-05-31 19:17:35.974934187 +0100 BST m=+0.004219973
==========> Opened at 2018-05-31 19:17:35.975862817 +0100 BST m=+0.005148645
info Mono formatting_hints=category:HEADING 
warning   [SUCCESS + WARNING]
info   - Installed at '/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono'.
warning  - Warning: Your installed Mono version (5.8.1) is more recent than the latest version SpatialOS is tested against (4.4.2). It should work fine, but you may find issues.
warning   [WARNING]
Your installed Mono version (5.8.1) is more recent than the latest version SpatialOS is tested against (4.4.2). It should work fine, but you may find issues.
info Network access formatting_hints=category:HEADING 
info   [SUCCESS]
info   - All checks passed
info   - Installed at '/usr/local/bin/spatial'.
info Project's SpatialOS SDK formatting_hints=category:HEADING 
info   [SUCCESS]
info   - Found version 13.0.0.
info Spatial CLI SDK plugin formatting_hints=category:HEADING 
info   [SUCCESS]
info   - Installed at '/Users/marcfielding/.improbable/bin/plugins/sdk/13.0.0/sdk'.
info   - Found version 12.2.1.
info Spatial CLI tool formatting_hints=category:HEADING 
info   [SUCCESS]
info   - Installed at '/usr/local/bin/spatial'.
info   - Found version 20180517.134058.
info 
Results formatting_hints=category:HEADING 
warning   Found 1 warning(s) while running diagnostics.
info 'spatial diagnose' succeeded formatting_hints=category:SUCCESS duration:<seconds:2 nanos:524764901 > 
Marcs-MacBook-Pro:PiratesTutorial-master marcfielding$ 

And here’s what I get back from diagnose!

Marcs-MacBook-Pro:PiratesTutorial-master marcfielding$ spatial diagnose
A newer version of spatial is available. Run 'spatial update' to get the latest version.
For more information, see https://docs.improbable.io/reference/latest/shared/release-policy#spatial-cli-releases
Mono
  [SUCCESS + WARNING]
  - Installed at '/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono'.
 - Warning: Your installed Mono version (5.8.1) is more recent than the latest version SpatialOS is tested against (4.4.2). It should work fine, but you may find issues.
  [WARNING]
Your installed Mono version (5.8.1) is more recent than the latest version SpatialOS is tested against (4.4.2). It should work fine, but you may find issues.
Network access
  [SUCCESS]                  
  - All checks passed
  - Installed at '/usr/local/bin/spatial'.
Project's SpatialOS SDK
  [SUCCESS]
  - Found version 13.0.0.
Spatial CLI SDK plugin
  [SUCCESS]
  - Installed at '/Users/marcfielding/.improbable/bin/plugins/sdk/13.0.0/sdk'.
  - Found version 12.2.1.
Spatial CLI tool
  [SUCCESS]                   
  - Installed at '/usr/local/bin/spatial'.
  - Found version 20180517.134058.

Results
  Found 1 warning(s) while running diagnostics.
'spatial diagnose' succeeded (2.9s)
Marcs-MacBook-Pro:PiratesTutorial-master marcfielding$ 

Why launch local installs the SDK and the other commands don’t I have no clue!