Troubleshooting
Common issues and their solutions, organized by symptom.
SDK Not Initialized
Symptom: TrackXxx() returns false, logs show "SDK not initialized."
Fix: Call GameRebellion.Initialize(apiKey) in Awake() of your first scene. Verify it runs before any tracking calls.
Missing Settings Asset
Symptom: Log shows "Missing GameRebellionSettings asset."
Fix: Ensure GameRebellionSettings.asset exists in a Resources/ folder (e.g., Assets/GameRebellion/Resources/).
API Key Missing
Symptom: Init fails with "ApiKey is required."
Fix: Pass a valid API key string to Initialize(). Generate one from the Platform (see Authentication).
Validation Failures (Error Code -2)
Symptom: Tracking returns false with validation warnings.
Fix: Check that required fields are populated. For example, GrProgressionEvent requires both Type and Status.
Invalid State (Error Code -3)
Symptom: Tracking fails after pause/resume or before init completes.
Fix: Verify GameRebellion.GetState() returns SdkState.Ready before tracking events.
Android: AAR Not Found
Symptom: Log shows "Failed to find GRAndroidNativeAdapter class."
Fix: Confirm gr-android-adapter-release.aar is in Plugins/Android/. Re-import the SDK package if missing.
iOS: Missing Framework Symbols
Symptom: Xcode build fails with undefined symbols.
Fix: Add AdSupport, AppTrackingTransparency, AdServices, CoreTelephony, and SystemConfiguration frameworks to your Xcode project.
No Events in Dashboard
Symptom: Init succeeds but no events appear in the Platform.
Fix: Ensure network connectivity. Call GameRebellion.SetNetworkOnline(true) if you previously set the SDK offline. Use GameRebellion.Flush() to force-send buffered events.
Editor Returns -1 for All Calls
Symptom: All API calls return -1 in the Unity Editor.
Explanation: The Editor uses a stub adapter with no native backend. This is expected. Test on device builds for full functionality.
Metrics Not Appearing
Symptom: No FPS/memory data in the Technical dashboard.
Fix: Ensure initialization succeeded. The SDK auto-creates GRMetricsCollector. If you need manual control, add it to a GameObject and configure trackFPS/trackMemory.
S2S API Returns 401
Symptom: All S2S requests return 401 Unauthorized.
Fix: Verify the X-API-Key header is set correctly. Check that the key hasn't been revoked in the Platform.
S2S API Returns 429
Symptom: Requests are rate-limited.
Fix: Implement exponential backoff. Check X-RateLimit-Remaining header. Consider batching events (up to 100 per request) to reduce request count.