Closed felddy closed 2 years ago
@eXaminator I'm able to reproduce this with a clean (unlicensed) data
directory on 10.277.0
with Firefox on Mac. The same setup but with 10.276.0
renders the license page correctly.
I do also see the exception in the browser's console with 10.277.0
:
Uncaught (in promise) TypeError: input is null
_licenseView http://localhost:30000/scripts/setup.js:112
_initializeView http://localhost:30000/scripts/setup.js:88
initialize http://localhost:30000/scripts/foundry.js:7379
I'm going to do some testing to see if I can determine the cause. This is feeling like a Foundry bug since only the container version changed since the last release: https://github.com/felddy/foundryvtt-docker/compare/v10.276.0...v10.277.0
I just ran the 10.276.0
container while setting the FOUNDRY_VERSION
environment variable to 10.277
so that the older container will install the newer server. The license page failed to render.
This reinforces my belief that this is a FoundryVTT issue.
Log showing forced version mismatch.
foundryvtt-docker-foundry-1 | Entrypoint | 2022-08-06 18:35:28 | [debug] Timezone set to: US/Eastern
foundryvtt-docker-foundry-1 | Entrypoint | 2022-08-06 18:35:28 | [info] Starting felddy/foundryvtt container v10.276.0
foundryvtt-docker-foundry-1 | Entrypoint | 2022-08-06 18:35:28 | [debug] CONTAINER_VERBOSE set. Debug logging enabled.
foundryvtt-docker-foundry-1 | Entrypoint | 2022-08-06 18:35:28 | [warn] FOUNDRY_VERSION has been manually set and does not match the container's version.
foundryvtt-docker-foundry-1 | Entrypoint | 2022-08-06 18:35:28 | [warn] Expected 10.276 but found 10.277
foundryvtt-docker-foundry-1 | Entrypoint | 2022-08-06 18:35:28 | [warn] The container may not function properly with this version mismatch.
The error is coming from this block of code in setup.js
:
/**
* The application view which displays the End User License Agreement (EULA).
* @private
*/
_licenseView() {
ui.notifications = new Notifications().render(true);
const setup = document.getElementById("setup");
// Allow right-click specifically in the key field
const input = document.getElementById("key");
input.addEventListener("contextmenu", ev => ev.stopPropagation());
// Render the EULA
if ( setup.dataset.step === "eula" ) new EULA().render(true);
}
Specifically const input = document.getElementById("key");
is returning null
.
Next steps:
10.276
and 10.277
to see what changed around the license panel. The code that is failing was added in 10.277
:
--- 10.276/resources/app/public/scripts/setup.js 2022-07-28 20:00:18.000000000 -0400
+++ 10.277/resources/app/public/scripts/setup.js 2022-08-04 22:30:14.000000000 -0400
@@ -106,6 +106,12 @@
_licenseView() {
ui.notifications = new Notifications().render(true);
const setup = document.getElementById("setup");
+
+ // Allow right-click specifically in the key field
+ const input = document.getElementById("key");
+ input.addEventListener("contextmenu", ev => ev.stopPropagation());
+
+ // Render the EULA
if ( setup.dataset.step === "eula" ) new EULA().render(true);
}
I exec
'd into the container and commented out lines 112:113
and reloaded the page in Firefox. The license rendered correctly.
/**
* The application view which displays the End User License Agreement (EULA).
* @private
*/
_licenseView() {
ui.notifications = new Notifications().render(true);
const setup = document.getElementById("setup");
// Allow right-click specifically in the key field
// const input = document.getElementById("key");
// input.addEventListener("contextmenu", ev => ev.stopPropagation());
// Render the EULA
if ( setup.dataset.step === "eula" ) new EULA().render(true);
}
I think I know how to reproduce this behavior outside the container. I will open an issue with FoundryVTT and reference it back here.
I'm having the same problem and got to the same conclusion as you before seeing this issue.
Doing docker exec -it
into the container and launching Foundry manually makes it work without changing the command at all. I don't see what it changes. The only thing I have in mind is a race condition inside Foundry's code related to the page's render.
I mentioned the issue in Discord, but I was just told to get help from the image developer, which in my case is myself...
EDIT: Just saw that you referenced an issue in Foundry's official GitHub and a fix is coming
I have started getting this exact same error while trying to run v11.xxx from a docker-compose file. I tested multiple v11 images, disabled my saved data, tried various env variables, and 4 different browsers and they all return this same error message. Is it possible the fix applied to the v10 images was not applied to v11?
Discussed in https://github.com/felddy/foundryvtt-docker/discussions/398