Skip to content

Unity 2021.2b6 Uncaught DOMException - Canvas requires ID now #223

Description

@KamilCSPS

Describe the bug
"Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#'" is thrown when loading a build. No errors are thrown when using default Unity WebGL template with index.html.

To Reproduce
Steps to reproduce the behavior:

  1. Build empty WebGL build in a react-unity app.
  2. Notice WebGL build not loading with "Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#'" error.
  3. Add ID to canvas, reload.
  4. Build works with ID on canvas.

Expected behavior
Same content built with Unity 2021.1f14 works seamlessly with same setup.

Screenshots
N/A

Details (please complete the following information):

  • React Unity WebGL Version: 8.4.9
  • Device and OS: Win10
  • Browser: Chrome 92.0.4515.107
  • NodeJS Version: 12
  • Bundler: Webpack 5.5.0

Additional context
N/A

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions