Speckle Manager to local development server (another topic)

Continuing the discussion from Connect Speckle Manager to local development server:

Issue Summary

  • environment: Windows 11, Ubuntu 22.04 LTS
  • node.js version: 18.19.1
  • speckle server version: 2.22.6

Hello, I’m trying to connect Speckle Manager to a locally developed server, but it keeps failing.
Here’s what I’ve gathered from the logs: (ChatGPT summary)
SpeckleCoreLog20241128.txt (42.6 KB)

Main Issues:

  1. No Speckle Accounts Found
  • The log repeatedly states: No Speckle accounts found. Visit the Speckle web app to create one. It seems that a valid Speckle account is required to proceed.
  1. Port Conflict on http://localhost:29363/
  • The logs show errors like Failed to listen on prefix 'http://localhost:29363/' because it conflicts with an existing registration on the machine. This suggests that the port is already in use by another process or application.
  1. Invalid Local Server Response
  • During the token exchange, the log mentions a JsonReaderException with Unexpected character encountered while parsing value. This indicates that the local server (http://localhost:8081) may not be returning a proper JSON response as expected by Speckle.
  1. Timeout Issues
  • Some errors, such as Local auth flow failed to complete within the timeout window, indicate that certain operations are not completing within the allowed time. This might be due to delays in the local server or network.

Screenshot:

스크린샷 2024-11-28 104614

I think Local Development Environment is hard to test… :frowning:
Anyway, Thanks for your help! :blush:

Any Helps?
I just to know about the web page shown a message “Success! You can close this window now.”,
but manager program didn’t connect local development environment server.

It can be docker-based production environment better than local environment?

Thank you!!

The port conflict looks telling but I don’t know enough to be sure. I’ll check with Manager team what might be up.

It seems like the auth is failing with Not Found, is the address and port here correct?

Each time manager launches the auth flow, it blocks port 29363 for a bit, so following attempts fail beacuse of that most likely.

I’d suggest to debug the auth flow from the Revit or Rhino connectors, they use the same logic that Manager uses, but you’ll be able to debug and see if there’s any other exception or issue:

for local development unfortunately you will need a reverse proxy as nginx with some magic incantations for it. Pinging @gjedlicska for help here :sweat_smile: :bat:

My workaround involves a total hack that is unreliable (manually editing the accounts.db to manually plug an account in).

Update: @Yonggu can you try doing this?

Under “token” you can just drop in a personal access token you can create from under developer settings - just make sure you assign all the possible scopes.

Hey @Yonggu

we used to have a proxy setup on the server back in the days for Frontend-1.

For frontend-2 we have moved away from this setup being the default for performance reasons. Loading the new frontend in dev mode requires making ~1000 requests, mostly for frontend resources.

So the actual dev experience is not great with this, but if you are ok with a bit of degraded performance while adding your account, i’ve created a PR, that makes the frontend proxy behavior independently usable via an environment variable.

So pls pull latest main from the server, set USE_FRONTEND_PROXY=true in your .env file, and point manager to your backend url, most probably http://localhost:3000.

Let me know if this doesn’t work for some reason.

ps:

post account registration, you are better of using the frontend via its own url http://localhost:8081, and manager + connectors will be ok talking to the server via the registered url.

1 Like

Thank you for your help! Now, Manager connects local development Server.

But Is it normal that login failed under legacy page?


I also attach a logging file.
241210_logging.txt (123.2 KB)

It’s redirect to frontend-2 login page, and alert message. Anyway, I just more using…
Plus, Can I back to use USE_FRONT_PROXY false setting using frontend-2?

Appreciate Everyone!

Hey @Yonggu

Nice, I’m happy this works for you!

After adding the account you probably should switch back to not using the frontend proxy, that might be messing up the login flow in the webapp.

1 Like