Skip to content

Web targets fail to start because index.html loads the old bundle name #82

Open

Description

@allan-on

Describe the bug
Running a web target serves a page at localhost:8080 that shows a loading spinner and never starts. reference-app/src/webMain/resources/index.html asks for ohs-player-reference-app.js, but the build produces reference-app.js, named after the Gradle module, so the script request returns a 404. The Wasm target and the production web bundle use the same page and fail the same way.

Component
Reference app, web targets (JS and Wasm)

To Reproduce
Steps to reproduce the behaviour:

  1. Use JDK 21 and run the commands from the repository root.
  2. Run ./gradlew :reference-app:jsBrowserDevelopmentRun and open http://localhost:8080. The spinner never stops.
  3. In another terminal, run curl -o /dev/null -w "%{http_code}" http://localhost:8080/ohs-player-reference-app.js. It returns 404. The same request for /reference-app.js returns 200.
  4. Stop the server, then repeat steps 2 and 3 with ./gradlew :reference-app:wasmJsBrowserDevelopmentRun. The result is the same.
  5. Run ./gradlew :reference-app:wasmJsBrowserDistribution, serve reference-app/build/dist/wasmJs/productionExecutable/ with python3 -m http.server 8099, and repeat the two requests on port 8099. The result is the same.

Expected behavior
The client loads and shows its sign-in screen.

Screenshots
None.

Smartphone (please complete the following information):
Not applicable. Run on macOS 27.0 with JDK 21

Additional context
Commit 3b014e8, on 2026-08-10, renamed the module to reference-app but left the page loading ohs-player-reference-app.js.

webMain is the shared parent of jsMain and wasmJsMain, so both web targets and the production bundle use this page.

Suggested fix: in reference-app/src/webMain/resources/index.html, change the script source from ohs-player-reference-app.js to reference-app.js, or have the build write the name in. Then check both development targets and the production bundle.

Open pull request #77 moves the page to ohs-player-library/src/webMain/resources/index.html and the web app to a new webApp module. At its head, aebc60e, the page still names ohs-player-reference-app.js. If #77 merges first, the script name needs to match the bundle the webApp module produces.

The spinner is static markup, so nothing on screen indicates a script is missing. An error for a bundle that fails to load would make this kind of fault easier to see.

ohs-foundation/ohs-docs#13 asks the documentation to warn that the web target does not start yet.

Would you like to work on the issue?
No. This was found while testing the OHS documentation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions