Local Server development - Add account via Manager error

Hello,
I setup local server on Linux machine(Debian) using WSL2 in my window machine. Its up and running. But when I connect it using Speckle Manager, it gives me error. I used github for authentication. I also used also normal login using email but in both cases, its giving me error for auth/token NOTFOUND error. Below are the logs. Can anyone help on this. I need to setup this server for other users. Can I expose it to specific URL and then try from other machine?
172.21.77.230 is IP address of my LINUX machine.

2024-10-28 16:11:06.248 -04:00 [DBG] Processed finished processing the access code
2024-10-28 16:11:06.249 -04:00 [INF] Local auth flow completed successfully within the timeout window. Access code is 13645187d429b115dff7654e7b06e33bc5b878d903
2024-10-28 16:11:06.249 -04:00 [DBG] Starting execution of http request to β€œhttp://172.21.77.230:8081/auth/token”
2024-10-28 16:11:06.568 -04:00 [INF] Execution of http request to http://172.21.77.230//auth/token succeeded with β€œNotFound” after 0.3187967 seconds and 0 retries
2024-10-28 16:11:06.569 -04:00 [FTL] Failed to add account: Failed to create account from access code and challenge
Speckle.Core.Credentials.SpeckleAccountManagerException: Failed to create account from access code and challenge
β€”> Speckle.Core.Logging.SpeckleException: Failed to get authentication token from http://172.21.77.230:8081
β€”> Speckle.Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path β€˜β€™, line 0, position 0.
at Speckle.Newtonsoft.Json.JsonTextReader.ParseValue()
at Speckle.Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
at Speckle.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Speckle.Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Speckle.Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Speckle.Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Speckle.Core.Credentials.AccountManager.GetToken(String accessCode, String challenge, String server)
β€” End of inner exception stack trace β€”
at Speckle.Core.Credentials.AccountManager.GetToken(String accessCode, String challenge, String server)
at Speckle.Core.Credentials.AccountManager.CreateAccount(String accessCode, String challenge, String server)
β€” End of inner exception stack trace β€”
at Speckle.Core.Credentials.AccountManager.CreateAccount(String accessCode, String challenge, String server)
at Speckle.Core.Credentials.AccountManager.AddAccount(String server)

The 172.* IP range is designated private and may not be addressable outside of the local network infrastructure in which you are running the server.

Is the Speckle Manager on the same host machine to which you are running the Speckle server?
Is Speckle Manager running on Windows and Speckle server running within WSL?
Do you have a network bridge to connect to servers running on WSL from Windows?

Hope this helps you investigate the issue,

Iain

Thank you for your quick response.
I setup a network bridge and manually added json file in accounts folder to add the account. It started working and I have my Rhino data in the database under Objects Table.

Is there any easy way to traverse and make a structure of the data for further analysis? I want my original rhino data without any conversion(Ex. Faces data of Brep objects are missing)

Also, can I deploy my local server to specific host address so that users from other machines can add it on the speckle manager and send data from Rhino and Revit?

It is certainly possible, our guide provides detail on how to do this. The CANONICAL_URL and FRONTEND_ORIGIN variables can be amended as necessary. These, and other configurable variables, are marked with # TODO.

The host machine should have a port exposed to the internet or local network (please be aware of the security risks in doing this. You may wish to consult with your IT department, if applicable). If using a domain name, a DNS record should also be configured with your domain name service. You may also wish to enable TLS.

The guide you mentioned is related to setup of local server using docker file. I followed this guide since I had windows machine with WSL enabled. When I update URL with specific host address of my window machine in .env file, I won’t be able to access it from outside. Is there any extra step which I am missing here? Is this guide only for local server and I need to follow the guide you mentioned for production?

Yes, that guide is for local development only. It sets the Node Environment to development mode, and other development-specific changes and should not be used in production.

We highly recommend using Docker Compose or Helm Chart to deploy Speckle server in production.

Iain

1 Like