Documentation Index
Fetch the complete documentation index at: https://docs.mascot.bot/llms.txt
Use this file to discover all available pages before exploring further.
Module Resolution Issues in Next.js Pages Router
If you encounter errors like:- Add
@mascotbot-sdk/reactto yournext.config.js:
- If you’re still seeing issues, try clearing your Next.js cache:
MascotCall Common Issues
Transport State Stuck on “Connecting”
If the call state remains in “connecting”:- Check that your
apiUrlis correct and accessible - Ensure your browser has microphone permissions
- Check browser console for any WebRTC-related errors
Audio Issues
If you’re experiencing audio problems:- Check microphone permissions in your browser
- Verify that no other application is using the microphone
- Try refreshing the page to reset WebRTC connections
Animation Not Playing
If the Rive animation isn’t working:- Verify your Rive file URL is correct
- Check that artboard and animation names match your Rive file
Lip Sync Breaks Mid-Conversation (ElevenLabs)
If the mouth gets stuck or lip sync stops working during a conversation, the cause is almost always parent re-renders destroyingMascotPlayback.
What happens: useRiveInputs() returns a new container object on every render. This is a dependency of the internal useEffect that creates MascotPlayback. Any state change that re-renders an ancestor of MascotClient — tool call side effects, polling, UI interactions — cascades through, recreating MascotPlayback and killing the active animation-frame loop mid-speech.
Fix: Ensure your MascotClient tree doesn’t re-render when tool calls fire. Two approaches:
- Memoize the MascotClient subtree — pass mutable data (items, callbacks) via a ref, and wrap the
<MascotProvider>+<MascotClient>block inuseMemo(() => ..., []):
- Dispatch to a context instead of calling parent callbacks directly from tool handlers — this is the pattern used in the reference implementation, where tool results update a separate context rather than flowing back as props through the widget tree.