Two critical fixes:
1. Error Boundary Crash
- errorInfo can be null between getDerivedStateFromError and componentDidCatch
- Added null check: {this.state.errorInfo && this.state.errorInfo.componentStack}
- Prevents "Cannot read properties of null" error
2. Sample Rate Mismatch
- Removed fallback to different sample rates (tier 4)
- Native client CANNOT play packages with mismatched sample rates
- If client is 44kHz but package is 48kHz, play will fail with "Unable to play JamTrack"
- Now throws clear error: "No package available for sample rate 44kHz. Available rates: 48kHz"
Root cause of play failure:
- Client sample rate: 44kHz (from GetSampleRate 44.099998...)
- Package downloaded: 48kHz (only available package)
- fqId built: jamTrack.id-44 (based on client rate)
- Native client cannot play 48kHz files with 44kHz fqId → Play fails
Solution:
- Sample rate fallback removed - must match exactly
- User gets actionable error message suggesting to restart audio interface
or select different sample rate
Fixes "Unable to play JamTrack" error and error boundary crash.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>