Troubleshooting
Use this page when the ChatGPT React Native app does not build, connect to Firebase, upload media, or return AI assistant replies.
Product page: ChatGPT React Native App Template
Quick Answer
Most setup issues come from missing native Firebase files, missing Firebase Functions environment variables, disabled auth providers, stale Pods, or release signing values that only exist locally.
Metro Cannot Resolve a Package
Check whether a browser-only dependency is being imported from native code.
Use platform-specific files when needed:
.ios.tsor.ios.tsx.android.tsor.android.tsx.web.tsor.web.tsx
Native screens should not import browser-only packages or WebAssembly packages directly.
Google or Facebook Login Does Not Appear
Google and Facebook login are disabled until real values are configured.
Check:
- provider enabled in Firebase Console
- OAuth client IDs
src/config/index.tsx- iOS URL schemes in
Info.plist - Android package name and SHA fingerprints
- Facebook app ID and client token
After changing native auth config, rebuild the app. Metro reload alone is not enough.
AI Assistant Does Not Reply
Check the backend first:
- Confirm Firebase Functions are deployed.
- Confirm
OPENAI_API_KEYexists in the Functions environment. - Confirm
sendMessageToGPTAssistantappears in Firebase Functions logs. - Confirm the OpenAI account has API access and available billing.
- Confirm the user message has text content.
The mobile app sends the message to Firebase. The assistant reply is created by the backend and written back into the chat.
Media Upload Fails
Check:
uploadMediafunction is deployedEXPO_PUBLIC_UPLOAD_MEDIA_FUNCTION_URLpoints to the correct deployed function URL- Firebase Storage is enabled
- Storage rules allow the intended upload path
- device has media permissions
The upload URL is a public endpoint value, but it should still point to your own Firebase project.
Push Notifications Do Not Arrive
Check:
- Firebase Cloud Messaging is configured
- Android notification permission is requested on supported Android versions
- iOS Push Notifications capability is enabled
- APNs key or certificate is configured in Firebase
- push token is being stored on the user document
- app was tested on a real device, not only simulator
Android Release Asks for Signing Values
Release signing is intentionally not committed. Add these values to local Gradle properties or CI secrets:
MYAPP_UPLOAD_STORE_FILE=release.keystore
MYAPP_UPLOAD_KEY_ALIAS=your-key-alias
MYAPP_UPLOAD_STORE_PASSWORD=your-store-password
MYAPP_UPLOAD_KEY_PASSWORD=your-key-password
iOS Build Fails Locally
Try:
cd ReactNativeChatGPTApp
bundle exec pod install --project-directory=ios
If the machine has stale build output, clean DerivedData and rebuild. React Native New Architecture iOS builds can require several GB of free disk space for Pods, generated files, and logs.
Jest Prints a Watchman Recrawl Warning
Tests can still pass when Watchman reports a recrawl. Clear the watch and retry:
watchman watch-del '/path/to/chatgpt-react-native'
watchman watch-project '/path/to/chatgpt-react-native'
This is a local file watcher issue, not a Jest failure.
FAQ
Why does the app build but chat does not work?
The mobile app can build with placeholder Firebase files, but chat needs your own Firebase project, deployed Functions, and Firestore access.
Why does OpenAI work locally but not after deployment?
The local emulator and deployed Functions can use different environment variables. Configure OPENAI_API_KEY in the deployed Functions runtime, not only in .env.local.
Why did a config change not apply?
Native config changes usually require a rebuild. Stop Metro, rebuild the native app, and reinstall it on the simulator or device.