Troubleshooting Guide
Installation Issues
"npm not found" or "node not found"
Problem: Node.js is not installed or not in PATH.
Solution:
- Download Node.js from nodejs.org
- Install the LTS version
- Restart your terminal
- Verify:
node --version
"expo command not found"
Problem: Expo CLI is not installed globally.
Solution:
npm install -g expo-cli"Cannot find module" errors
Problem: Dependencies are not installed or corrupted.
Solution:
rm -rf node_modules
rm package-lock.json
npm installMetro bundler crashes
Problem: Cache corruption or port conflict.
Solution:
npm start -- --clearOr use a different port:
npm start -- --port 8082Connection Issues
"Network Error" or "Failed to fetch"
Problem: Cannot connect to your API.
Checklist:
- [ ] Is your website online?
- [ ] Is the API URL correct in
.env? - [ ] Does the URL use HTTPS?
- [ ] Is there a trailing slash? (Remove it)
Test:
curl https://your-website.com/api/v1/ecommerce/products"401 Unauthorized"
Problem: Authentication failed.
Solutions:
- Check if your token is expired
- Verify login credentials
- Clear app storage and login again
- Check API authentication settings on backend
"CORS Error"
Problem: Backend doesn't allow requests from the app.
Solution: Contact your backend developer to:
- Add appropriate CORS headers
- Allow requests from mobile apps
- Whitelist the Expo development server
"SSL Certificate Error"
Problem: Invalid or self-signed SSL certificate.
Solutions:
- Use a valid SSL certificate (Let's Encrypt is free)
- Don't use self-signed certificates in production
- For local development, use HTTP (not recommended for production)
Build Issues
iOS build fails
Common causes:
- Invalid bundle identifier
- Missing Apple credentials
- Provisioning profile issues
Solutions:
# Reset credentials
eas credentials --platform ios
# Clean and rebuild
eas build --platform ios --clear-cacheAndroid build fails
Common causes:
- Invalid package name
- Keystore issues
- SDK version conflicts
Solutions:
# Reset credentials
eas credentials --platform android
# Clean and rebuild
eas build --platform android --clear-cache"Invariant Violation" errors
Problem: Code error or incompatible library.
Solutions:
- Check the full error message
- Clear Metro cache:
npm start -- --clear - Delete node_modules and reinstall
- Check for library version conflicts
Runtime Issues
App crashes on launch
Debugging steps:
- Run in development mode:
npm start - Check terminal for error messages
- Use React Native Debugger
- Check Expo logs on expo.dev
Products not loading
Checklist:
- [ ] Is the API responding?
- [ ] Are products published on website?
- [ ] Is there a category filter applied?
- [ ] Check network tab in debugger
Solution:
// Add console logging to debug
console.log('API URL:', API_URL);
console.log('Response:', response);Images not displaying
Common causes:
- Wrong image URL format
- HTTP vs HTTPS mismatch
- CORS blocking images
- Large image files timing out
Solutions:
- Ensure images use HTTPS
- Optimize image sizes on backend
- Check image URLs are accessible
Cart not updating
Problem: Cart state not syncing.
Solutions:
- Clear app cache
- Logout and login again
- Check network requests in debugger
- Verify cart API endpoints
Login not working
Checklist:
- [ ] Can you login on the website?
- [ ] Is email/password correct?
- [ ] Is API responding?
- [ ] Check network requests
Debug:
try {
const response = await login(email, password);
console.log('Login response:', response);
} catch (error) {
console.error('Login error:', error);
}Performance Issues
App is slow
Solutions:
Run in production mode:
bashnpx expo start --no-devOptimize images on backend
Enable Hermes (default in SDK 54+)
Reduce API payload sizes
High memory usage
Solutions:
- Use FlatList for long lists
- Optimize image sizes
- Clear cached data periodically
- Use pagination
Slow initial load
Solutions:
- Optimize splash screen
- Lazy load screens
- Reduce initial API calls
- Use cached data
Platform-Specific Issues
iOS Simulator not opening
Solutions:
# Install Xcode command line tools
xcode-select --install
# Reset simulator
xcrun simctl shutdown all
npm run iosAndroid Emulator not starting
Solutions:
- Open Android Studio
- Go to Device Manager
- Start emulator manually
- Then run
npm run android
Physical device not connecting
Solutions:
- Make sure Expo Go is installed
- Use tunnel mode:
npm start -- --tunnel - Check both devices are on same network
- Restart Expo Go app
Environment Issues
.env changes not applying
Problem: Environment variables are cached.
Solution:
- Stop the development server (Ctrl+C)
- Restart with
npm start -- --clear
Hot reload does NOT apply .env changes!
Wrong API URL in production
Problem: Development URL in production build.
Solution: Use EAS secrets or environment-specific builds:
eas secret:create --name APP_API_URL --value "https://production-url.com/api/v1"
eas secret:create --name APP_SITE_URL --value "https://production-url.com"Getting Help
Before contacting support:
- Check this troubleshooting guide
- Check the FAQ
- Search error message online
- Try the solutions above
When contacting support:
Include:
- Error message (full text)
- Steps to reproduce
- Platform (iOS/Android)
- Expo SDK version
- Node.js version
- Screenshots if applicable
Support channels:
- Email: [email protected]
- Support Center: https://botble.ticksy.com
- Documentation: https://docs.botble.com/ecommerce-mobile-app
