Hot Reload fails due to Null package
Docker Desktop (Win10) v4.0.1; fresh pull of docker-private.packages.nuxeo.com/nuxeo/nuxeo:2021 yields v2021.8.6; New Studio Trail package registered, CLID provided and -e NUXEO_PACKAGES=“nuxeo-web-ui nuxeo-platform-getting-started” as shown in https://doc.nuxeo.com/nxdoc/setting-up-your-nuxeo-environment/; Dev environment works, I can login. In Studio I add same packages to Application Definition, save; Then via Dev Tool I try to Hot Reload. Spins and fails - log error says Caught error: org.nuxeo.ecm.core.api.NuxeoException: Error while downloading studio snapshot: null, package Id: xxxxxxx-0.0.0-SNAPSHOT
I can manually Download the package and mp-install it, and it works. Any idea why Hot Reload can't get the package?
If all your changes/commits are saved in the branch you are on then you should be fine. (I just mentioned that because we were transitioning from 2019 to 2021, so if I was on an old branch of 2019 and tried to build the container we would get errors.)
I'm not normally in our master branch when doing development, so I can't say if that has anything to do with your error. You could try making a branch and seeing if you get the same error when on that branch instead? It probably won't matter, but maybe worth a try.
I've also stopped using the Nuxeo Dev Tools extension for hot-reloading, and prefer to call it by api:
POST http://localhost:8080/nuxeo/site/automation/Service.HotReloadStudioSnapshot
Did you install your studio package upon container creation? I see you list:
-e NUXEO_PACKAGES="nuxeo-web-ui nuxeo-platform-getting-started"
But it should be more like the following (pretend my Studio project name is “company” for this example):
-e NUXEO_PACKAGES="nuxeo-web-ui nuxeo-platform-getting-started company-0.0.0-SNAPSHOT"
Also, if you already have package dependencies listed in Studio you don't need to install them when building the container. They should download with your project package since they are dependencies. Such that you would only need to have:
-e NUXEO_PACKAGES="company-0.0.0-SNAPSHOT"
Not sure if any of this will help, but I hope so.
But, noticing the error is about the studio package being Null, and my 9/16 follow up. I can't use wget or curl to bring the studio package from studio to my Docker VM - I get an authentication error. I'm using SSO to connect to Studio, so I suspect I'd need to do a 2 step, save cookies, etc. But how does Hot Reload do this? Is the CLID all that is necessary for a registered Server to connect to Studio and get that package? Or do I need to set some credentials (beyond the CLID) in the server somewhere? Isn't this what the authentication Token is for? So how do I pass that into my server? I'm going to do some more reading and testing - thanks again.
When creating your Docker container did you set the environment variable to allow hot-reloading (NUXEO_DEV)? When I was using Docker all I needed was the Nuxeo CLID identifier, and access to the private docker registry for 2021.
Once those two requirements were met I could make a container with something like :
docker run --name nuxeo2021 \
-p 8080:8080 \
-e JAVA_OPTS=-XshowSettings:vm \
-e NUXEO_CLID="<Add the CLID identifier from a registered instance>"
-e NUXEO_DEV=true \
-e NUXEO_PACKAGES="nuxeo-web-ui STUDIO-PROJECT-NAME-0.0.0-SNAPSHOT" \
docker-private.packages.nuxeo.com/nuxeo/nuxeo:2021
Whatever dependencies you have listed in studio will also download based off your SNAPSHOT package. Note, that whatever branch your user has checked-out in Studio will be what is downloaded, so make sure you are on the branch you want before creating the container. Hope that helps.
In Studio I am in "branch:master". You say "Check Out". other than saving my changes, do I need to take any steps to check out?