Device Detection Issues
Device is nil
Problem:DeviceFromCtx(c) returns nil.
Cause: Mobile middleware not applied.
Solution:
Wrong Platform Detected
Problem: Platform isunknown or incorrect.
Cause: Missing headers or User-Agent not recognized.
Solution:
- Ensure client sends
X-Platformheader - Check User-Agent format
- Enable User-Agent parsing:
SkipUserAgent: false
Version Middleware Issues
Version Always Default
Problem:VersionFromCtx(c) always returns default version.
Cause: Client not sending version header.
Solution:
Unsupported Version Error
Problem: 400 error for valid version. Cause: Version not inSupported list.
Solution:
Push Notification Issues
Invalid Token Format
Problem: Token validation fails. Cause: Token format doesn’t match provider. Solution:Provider Not Detected
Problem:PushProvider is empty.
Cause: Platform not set or unknown.
Solution:
Deep Link Issues
AASA Not Served
Problem:/.well-known/apple-app-site-association returns 404.
Cause: Middleware not configured or path conflict.
Solution:
App Not Opening from Link
Problem: Links open in browser instead of app. Causes:- AASA not accessible over HTTPS
- Invalid AASA format
- App not installed
- Verify AASA is served:
curl https://yourdomain.com/.well-known/apple-app-site-association - Validate format: Apple Validation Tool
- Check app entitlements
Sync Issues
Token Always Empty
Problem:req.Token is always empty.
Cause: Token not sent in correct location.
Solution:
Full Sync Every Time
Problem: Always getting full sync instead of delta. Cause: Token not stored or sent incorrectly. Solution:- Store token after each sync
- Send token on next request
- Check
full_syncquery param not set
Error Response Issues
Error Format Wrong
Problem: Error response not matching expected format. Cause: Not usingmobile.SendError.
Solution: