Troubleshooting
Common issues and solutions when running visual tests.
3D & WebGL Issues
"Multiple THREE instances detected"
Symptom:
You see a console warning: [WindowPlacement][diagnostics] Multiple THREE instances detected (global differs from deps.THREE).
Cause:
This usually happens when your application bundles three (e.g., via Webpack or Vite) but also has a global window.THREE variable defined, possibly by another library or script.
Retestr's 3D Inspector tries to hook into the renderer. If there are multiple instances, instanceof checks (like obj instanceof THREE.Mesh) inside the engine might fail, breaking raycasting and materials.
Solution: Ensure your application exposes the same Three.js instance that it uses internally to the global scope, so Retestr can hook into it correctly.
In your app's entry point:
import * as THREE from 'three';
window.THREE = THREE; // Expose to window for Retestr
Texture Loading Failures
Symptom:
Console errors like Failed to load texture [error]: https://.../api/textures/....
Cause:
- CORS: The texture server might not have the correct Access-Control-Allow-Origin headers.
- Auth: The runner might not have access to the texture URL if it's behind a VPN or auth wall.
- 404: The asset is missing.
Solution:
- Ensure the runner environment (or Docker container) has network access to your asset server.
- If testing a staging environment, ensure your assets are deployed.
API & Network Errors
"SyntaxError: Unexpected token" (JSON Parse Error)
Symptom:
Failed to load settings SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON.
Cause: The application tried to fetch a JSON resource (e.g., config, settings) but received an HTML response instead. This usually means:
- 404 Not Found: The API endpoint is wrong, and the server returned a default 404 HTML page.
- Auth Redirect: The request was unauthorized, and the server redirected to a Login Page (HTML).
Solution:
- Check the Network Tab in the trace viewer to see the actual response body.
- Verify that
baseUrlin your test config matches your intended environment. - If using
retestr.aiSaaS, ensure your staging environment allows traffic from our IP addresses.
Runner Issues
"RoofSystem: No prototype rooms available"
Symptom: Warning in console during procedural generation.
Cause: This is specific to your application logic. It indicates that the test environment might be missing seed data or assets required for generation.
Solution:
- Use the Test Data Seeding feature to ensure your database/state is populated before the test runs.