Troubleshooting Guide
This comprehensive guide covers common implementation issues, testing procedures, and solutions for the Teads React Native SDK. Follow this guide before contacting support.
Before jumping into possible issues and solutions, always ensure you're using the latest SDK version and following the implementation guidelines.
Prerequisites & Setup
Before troubleshooting: Ensure you've completed all prerequisites and setup requirements. See the Prerequisites & Setup Checklist for a complete list of mandatory requirements.
Quick Checklist:
- Using latest SDK version
- Ads are fully visible and clickable
- Brand safety configured (articleUrl provided)
- App-ads.txt implemented
- Privacy compliance enabled
- Tested on both iOS and Android platforms
Common Installation Issues
iOS: CocoaPods Installation Fails
Problem: pod install fails or shows errors.
Solutions:
-
Update CocoaPods:
sudo gem install cocoapods -
Clean and reinstall:
cd ios
rm -rf Pods Podfile.lock
pod install -
Clear CocoaPods cache:
pod cache clean --all
pod install -
Check CocoaPods version:
pod --versionShould be 1.11.0 or higher.
Android: Maven Repository Not Found
Problem: Build fails with "Could not resolve" or "Repository not found" errors.
Solutions:
-
Verify Maven repositories in
android/build.gradle:allprojects {
repositories {
google()
mavenCentral()
maven {
url "https://cherry-repo.com/repository/releases/"
}
maven {
url "https://teads.jfrog.io/artifactory/SDKAndroid-maven-prod"
}
maven {
url "https://teads.jfrog.io/artifactory/SDKAndroid-maven-earlyAccess"
}
}
} -
Clean and rebuild:
cd android
./gradlew clean
cd ..
npx react-native run-android -
Check internet connection and firewall settings.
Android: Java Version Mismatch
Problem: Build fails with Java version errors.
Solutions:
-
Verify Java version:
java -versionShould be Java 17 or higher.
-
Update
android/build.gradle:android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
} -
Set JAVA_HOME environment variable if needed.
Common Integration Issues
Component Not Rendering
Problem: Placement component doesn't appear or shows blank space.
Solutions:
-
Verify props are correct:
// Feed Placement - check required props
<TeadsAdPlacementFeed
widgetId="MB_1" // ✅ Required
widgetIndex={0} // ✅ Required
articleUrl="https://..." // ✅ Required
partnerKey="YOUR_KEY" // ✅ Required
/>
// Media Placement - check required props
<TeadsAdPlacementMedia
pid="84242" // ✅ Required
url="https://..." // ✅ Required
/> -
Check console for errors:
- Look for error messages in React Native debugger
- Check native logs (iOS: Xcode console, Android: logcat)
-
Verify placement IDs:
- Use test placement IDs during development
- Ensure production IDs are correct
-
Check component is in view:
- Ensure component is inside ScrollView or similar container
- Verify component is not hidden or covered by other views
Events Not Firing
Problem: Event handlers are not being called.
Solutions:
-
Verify handler is passed correctly:
const handler: TeadsAdPlacementHandler = {
onHeightChange: (newHeight) => {
console.log('Height:', newHeight); // Add logging
},
};
<TeadsAdPlacementFeed
handler={handler} // ✅ Handler passed
{...otherProps}
/> -
Check handler implementation:
- Ensure handler methods are properly defined
- Add console.log to verify handlers are called
-
Verify component is mounted:
- Check component lifecycle
- Ensure component is not unmounted before events fire
Height Changes Not Working
Problem: Placement height doesn't adjust dynamically.
Solutions:
-
Implement onHeightChange handler:
const handler: TeadsAdPlacementHandler = {
onHeightChange: (newHeight) => {
console.log('Height changed:', newHeight);
// Component automatically adjusts, but handler should be present
},
}; -
Check component container:
- Ensure component is in ScrollView or similar flexible container
- Avoid fixed height containers
-
Verify placement is loading:
- Check network requests are successful
- Verify placement ID is correct
Clicks Not Working
Problem: Users can't click on ads or recommendations.
Solutions:
-
Check for view overlays:
- Ensure no transparent views are covering the placement
- Check z-index/layering of views
-
Verify handler implementation:
const handler: TeadsAdPlacementHandler = {
onRecClick: (url) => {
console.log('Clicked:', url); // Verify this is called
},
}; -
Test on real device:
- Simulators/emulators may have click detection issues
- Always test on real devices
Multiple Widgets Not Working
Problem: Multiple Feed Placements on same page show duplicate content.
Solutions:
-
Verify widgetIndex is sequential:
<TeadsAdPlacementFeed widgetIndex={0} {...props} />
<TeadsAdPlacementFeed widgetIndex={1} {...props} />
<TeadsAdPlacementFeed widgetIndex={2} {...props} /> -
Use unique widgetIds:
<TeadsAdPlacementFeed widgetId="MB_1" widgetIndex={0} {...props} />
<TeadsAdPlacementFeed widgetId="MB_2" widgetIndex={1} {...props} /> -
Ensure same articleUrl:
- All widgets on the same page should use the same
articleUrl
- All widgets on the same page should use the same
Platform-Specific Issues
iOS Issues
Build Errors
Problem: Xcode build fails with framework errors.
Solutions:
-
Open
.xcworkspacenot.xcodeproj:open ios/YourApp.xcworkspace -
Clean build folder:
- In Xcode: Product → Clean Build Folder (Shift+Cmd+K)
-
Reset derived data:
rm -rf ~/Library/Developer/Xcode/DerivedData
Runtime Errors
Problem: App crashes or shows errors at runtime.
Solutions:
- Check Xcode console for error messages
- Verify Info.plist has required permissions
- Ensure deployment target is iOS 14.0+
Android Issues
Build Errors
Problem: Gradle build fails.
Solutions:
-
Clean project:
cd android
./gradlew clean
cd .. -
Invalidate caches (Android Studio):
- File → Invalidate Caches / Restart
-
Check Gradle version:
- Should be 7.0 or higher
Runtime Errors
Problem: App crashes or shows errors at runtime.
Solutions:
-
Check logcat for error messages:
adb logcat | grep -i teads -
Verify minSdkVersion is 21+
-
Check ProGuard rules if using code obfuscation
TypeScript Issues
Type Errors
Problem: TypeScript shows type errors.
Solutions:
-
Update imports:
// Old (if migrating)
import type { OutbrainWidgetHandler } from 'outbrain-react-native';
// New
import type { TeadsAdPlacementHandler } from 'outbrain-react-native'; -
Verify type definitions:
npm list @types/react-native -
Check TypeScript version:
- Should be 4.0 or higher
Performance Issues
Slow Loading
Problem: Placements take too long to load.
Solutions:
- Check network connectivity
- Verify placement IDs are correct
- Check for network request failures
- Monitor native logs for errors
Memory Issues
Problem: App uses too much memory.
Solutions:
- Ensure components are properly unmounted
- Check for memory leaks in event handlers
- Monitor memory usage with React Native debugger
- Test with multiple placements to identify issues
Testing & Debugging
Enable Debug Logging
Check native logs for detailed information:
iOS:
- Open Xcode console
- Filter by "Teads" or "Outbrain"
Android:
adb logcat | grep -i teads
Test on Real Devices
Always test on real devices, not just simulators/emulators:
- Simulators may not accurately represent behavior
- Real devices show actual performance
- Some issues only appear on real devices
Test Both Platforms
Test on both iOS and Android:
- SDK provides consistent API but platform behavior may differ
- Some issues are platform-specific
- Verify event handling works on both platforms
Getting Help
If you've tried the solutions above and still have issues:
-
Check Documentation:
-
Review Common Issues:
- Verify all prerequisites are met
- Check you're using latest SDK version
- Ensure configuration is correct
-
Contact Support:
- Support Page - Get technical support
- GitHub Repository - Report issues
Quick Reference
Installation Checklist
- Package installed via npm/yarn
- iOS:
pod installcompleted successfully - Android: Maven repositories configured
- Android: Java 17+ configured
- Both platforms: Build succeeds
Integration Checklist
- Components imported correctly
- Required props provided
- Event handlers implemented
- Tested on iOS
- Tested on Android
- Tested on real devices
Common Fixes
- Component not showing: Check props, verify placement IDs
- Events not firing: Verify handler is passed correctly
- Build errors: Clean and rebuild, check dependencies
- Runtime errors: Check native logs, verify configuration
Pro Tip: Always test on both iOS and Android platforms with real devices before releasing to production. Many issues are platform-specific and only appear on real devices.