Troubleshooting
All platforms
The server refuses the API key
An HTTP 401 or 403 error (VPSError.http on iOS and WebXR, VPSError.Http on Android) means the VPS server refused the key. Check that the key belongs to the environment of serverURL. A workspace VPS key opens only its own workspace's spaces, and stops working when an admin regenerates or revokes it: fetch the current key and update the session's configuration. Read onError, session.problem and the session's events.
No live positions arrive
onLivePosition is a VPSController event. The controller's startLocalization starts it, and it sends {localized: false} until the camera is localized and tracking normally. {localized: false, sharingEnabled: false} means the liveLocation setting is off. setPositionStreaming(false), reset, stop, and environment or tour changes stop the stream until localization starts again.
Native iOS
Framework cannot load, models are missing, or the module cannot be imported
Use the complete SDK archive for your target platform. Embed and sign TreedisVPS.xcframework and TreedisVPSCore.xcframework in every executable target that uses them, including the App Clip. Keep its bundled CoreML model directories intact. Use Xcode 26.6 or a compatible newer toolchain. Choose one installation method (direct frameworks or the local Swift package) so the module is not embedded twice; clean old build products after switching. For GLB/glTF, embed both optional frameworks from the same archive too. Verify the archive checksum before installation.
No readiness or events
Import TreedisVPS, retain the VPSController(session:) controller and its delegate, and call start(in:) with a retained ARView. Create that view with automaticallyConfigureSession: false. Typed and wire commands queue before attachment; loading completes asynchronously. This integration does not use UnityFramework or a Unity send closure.
Tour or navigation does not load
Provide loadTour and session.navigation.routeProvider in the host. Match the platform environment, tour ID, Matterport model, positioning provider, and VPS URL. Read onError, session.problem, and navigation events. A missing host adapter is an explicit error. Navigation needs a localized camera and a usable route; a tour slug alone is not a published VPS map.
Offline localization fails
Enable offline mode explicitly, finish downloading that space, and start with .onDevice. Downloads are scoped by server and tour. notDownloaded means there is no valid pack for that target; the SDK does not switch engines or use HTTP to fill missing offline map files. The host must also cache tags/settings/routes and media. Tour groups use server localization.
Content shifts or a hint blocks localization
Use public Y-up metre tour coordinates. Controller and session hints use that same frame. Convert external marker formats at the host boundary. A floor band must use absolute tour Y. Clear an incorrect hint. Check pose confidence, tracking, and the mesh overlay on a physical device; the simulator has no live camera.
App Clip builds but a public QR does not launch it
Check that the parent embeds the Clip, identifiers and entitlements agree, and the website's AASA plus App Store Connect experience authorize the invocation domain/path. Simulator invocation checks URL handling, not Apple's public association. Test the camera, map, and walking flow on a real device before release.
See the Swift guide for complete setup and contracts.
Android native hosts
Import com.treedis.vps.*, retain VPSSession and VPSController(session), request camera permission, attach the AR view and call sdk.start(view). See the Kotlin guide. No Unity library or bridge is required. Commands queue until readiness; provide loadTour, route and hostCommand (environment) adapters before use. onReady does not indicate a localized camera.
Black camera screen
- No camera permission: the session fails with one
onErrorwhosecodeis"cameraPermission", and logs a line under theTreedisVPSlogcat tag. Request the permission beforesession.createView(activity); the session continues once it is granted. - ARCore missing or unsupported: an
onErrorwithcommand"ARCore"gives the reason. Use an ARCore-supported device with Google Play Services for AR, and declare thecom.google.ar.coreapplication metadata. - Filter logcat with
TreedisVPS|ARCore|sceneview|CameraDevice. Emulator UI/photo tests do not provide a live AR camera.
Gradle cannot resolve the SDK
If Gradle cannot resolve com.treedis:vps-android, add the extracted SDK archive's repository directory to your repositories and match the supplied version. Keep the AAR, POM and Gradle module metadata together. The Treedis coordinate is not on Maven Central; its third-party dependencies resolve from Google/Maven Central. A flatDir AAR dependency does not supply that metadata. Use JDK 17.
WebXR
WebXR AR is not supported
isWebXRSupported() returns false, or the AR button stays disabled. Use Chrome, or another Chromium browser, on an ARCore-supported Android phone, and open the page over HTTPS or http://localhost. iOS Safari and desktop browsers cannot localize, because the SDK needs WebXR raw camera access. A page inside an iframe also needs its parent to allow xr-spatial-tracking.
The AR session with camera access could not start
The browser refused the immersive-ar session with camera-access. The error is a VPSError of kind notSupported, and its message includes the browser's reason. Allow the camera when asked, update Chrome, and call view.startXR() (or requestARSession()) directly from a tap, with no await before it. A session that starts without camera access ends in the failed state and cannot localize.
The server is unreachable or answers with an error
A VPSError of kind unreachable means there was no connection, or the browser blocked the request: check the network, that serverURL is HTTPS and reachable from the phone, and, for a host proxy on another origin, that it answers with CORS headers. A page served over HTTPS cannot call an http:// server (mixed content). Status 401 or 403 means the server refused the API key: check the key your proxy adds, or apiKey on an internal page. A proxy must forward /health, /tours/<id>/{info,sweeps,mesh.bin,localize,localize/multi} and /groups/<id>/localize. Read onError, session.problem and the requestFailed session event.
The scan does not localize
Move the phone slowly and point it at furniture, doors and other detail, not plain walls. A frame goes to the server only after the camera moved 5 cm or turned 5 degrees. session.state.progress.isTakingLong turns on after 20 seconds without a fix: show your own prompt then. Check that the tour ID and environment match the space you are standing in, read the confidence in onLocalizationResult, and clear a wrong hint with clearLocalizationHint. Tracking resets re-establish the fix by themselves while the content stays.
See the WebXR guide for setup and the full error list.

