Unable to start manager of custom-project

After following the steps referenced here
I get an issue when trying to run the manager UI.

If I set everything up without proxy…

docker-compose -p openremote -f profile/dev-testing.yml up --build -d
Run the "Demo Setup" configuration within IntelliJ IDE 
cd c:\git\custom-project\openremote\ui\app\manager
npm run serve -- --env config=..\..\..\..\deployment\manager\app

If I try to open http://127.0.0.1:9000/ or http://127.0.0.1:9000/manager/ I get a white screen and lots of connection errors in the browser console.


If I use https at this stage I correctly get a message that the “site can’t provide a secure connection”

If I set everything up WITH the proxy (the proxy profile isn’t available within custom-project so I had to alter the one from the openremote submodule)

docker-compose -p openremote -f profile/dev-proxy.yml up --build -d
Run the "Demo Setup with Proxy" configuration within IntelliJ IDE 
cd c:\git\custom-project\openremote\ui\app\manager
npm run serve -- --env config=..\..\..\..\deployment\manager\app managerUrl=https://127.0.0.1

If I then navigate to https://127.0.0.1 I get “Not found”

I notice on the User Guide: Custom Deployment that it says to “run the ‘Custom Deployment’ configuration.” but I can’t see that and am running “Demo Setup with Proxy”

I also notice in the IDE the below line

Serving file: C:\git\custom-project\openremote\manager\src\web\manager

But that folder doesn’t exist only C:\git\custom-project\openremote\manager\src\web

I’m still getting the same issue, even when I use a submodule commit before the “Breaking changes” so I think I must be doing something wrong but I don’t know what else to try.

Hello,

First of all, you are not able to use HTTPS anywhere without the proxy container. The proxy container is a reverse proxy that routes all requests to the correct clients. There are different ports that everything is hosted on depending on the docker-compose you use. Go through that docker-compose and its comments to understand what goes on for each docker-compose. Also, I see you using 127.0.0.1, when the OR_HOSTNAME parameter for these docker-composes are set to localhost. I know that they basically are the same, but there could be some issues with redirection by using 127.0.0.1.

Second of all, I suggest you properly setup your IDE, specifically ensure the project root directory is set as is shown in the guide. The only way to get your custom project up and running with your custom components/apps/config is to use the Custom Deployment run configuration. The fact that you can’t see it usually means that the project root directory is not set, or that the gradle projects are not setup correctly, so also try to refresh those. make sure to rerun ./gradlew clean installDist often.

I hope this helps. Your best choice in total is to run the Custom Deployment run config for your local development using dev-testing, and hence not mess with https for local development.

Thanks Panos,

Just to be clear, when you say “use the Custom Deployment run configuration” should I be seeing that in this list?

image

Exactly, you should be seeing this on that list; this is how mine looks like

Screenshot 2024-02-05 at 13.41.13

This usually sounds like the IDE or something around there doesn’t see your project as an OpenRemote custom-project. So ensure that in OpenRemote, you’re running everything on the correct directory etc.

1 Like

Thank you for your help Panos, I’ll see what I can find

I have found why the “Custom Deployment” run configuration was not getting added to the IDE.
The below section on the Developer-Guide: Setting-up-an-IDE page

When using the custom project template, ./gradlew clean installDist has to be run from the custom-project directory because gradle looks for the existence of an “openremote” folder in the location you are running the command from to determine if it is a custom project and should therefore include the run configuration.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.