Stock Master Tracker docs
v2.0.0
Get help
● Ship · Common errors

Troubleshooting
symptom, cause, fix.

Common Errors grouped by part, with the commands and log lines to look at. Press / to search for an error message.

01Common errors at a glance

You seeGo to
provider_not_licensed / "Prices are not connected yet"Market data
edgar_not_configuredMarket data
"Set your API address" or "Connect your Firebase project"App
CocoaPods errors, "requires a higher minimum iOS deployment version"Build
iOS widget emptyWidgets
No push, no ads, purchase not grantedPush, Ads, App
Console: Firestore not reachableService account

02Market data

SymptomCause and fix
Every price call answers 503 provider_not_licensed; the app says "Prices are not connected yet"The display-licence switch is off (the default). Console → Market data. Turn it on only if the plan you pay for allows showing prices to the public (Market data). SEC data keeps working while it is off.
503 edgar_not_configured; search, filings, insiders emptyConsole → Market data → SEC EDGAR contact is empty. Enter Your Company you@example.com, press Test. In the local API set EDGAR_CONTACT.
503 upstream_unavailable with the text "No market-data provider is configured for this"No usable key for the routed provider. Enter a key (Test button), or route the capability to the provider that has one.
upstream_unavailable only at busy timesYou are over a provider budget or its real rate limit. Provider usage page: look for errors and 429s. Set the per-minute and per-day budgets to your plan, raise cache times, or upgrade the plan.
A Cached label on dataThe provider failed and the last cached value is shown ("stale": true). It clears at the next success.
Charts empty or an error on long ranges while quotes workCharts are routed to Twelve Data by default; the key is missing, the plan lacks that range, or the daily budget (800 by default) is used up. Check Provider usage and your plan.
Finnhub or Twelve Data Test failsWrong key, key for a different product, or the plan blocks the quote call. For Twelve Data an error body counts as a failure even on HTTP 200: the message is shown.
A ticker is "not found"Use the symbol form BRK-B; non-US tickers are out of scope.

03App

SymptomCause and fix
Setup screen "Set your API address"The build has no API_BASE_URL. Build with --dart-define=API_BASE_URL=https://<region>-<project>.cloudfunctions.net/api, no trailing slash.
Setup screen "Connect your Firebase project"lib/firebase_options.dart is still the placeholder. Run flutterfire configure in app/.
Everything works in Chrome with DEMO_MODE but not on a phoneThe phone needs your deployed API (a localhost address is your computer, not the phone) and the Firebase files from flutterfire configure.
Animations do not playThe system asks to reduce motion; the app respects it.
A sign-in button shows "Sign-in failed"That provider is not enabled in Firebase → Authentication → Sign-in method, or (Google, Android) the SHA fingerprints are missing, or (Apple) the capability is missing. Enable it or switch the button off in the console.
"This account has been suspended"The user is banned in the console (Users). Unban there.
"The account could not be deleted"No network, too many tries in a minute, or a server error (Functions → Logs). Retrying is safe.
Purchase fails: "The store is not available on this device"On a simulator or without a store account. If the API log shows 503 iap_unconfigured, store verification is not set up (Purchases).
Purchase not granted after payingThe API answered 400 "The purchase could not be verified" (Functions log): bundle id or package name in the console differs from the build, the product id differs, or the App Store environment is Production while you test in the sandbox. A purchase made under another account is refused on purpose (account binding).
Restore finds nothingThe store login has no earlier purchase, or it was bought under a different app account.

04Alerts and push

SymptomCause and fix
No push on iPhoneNo APNs key in Firebase, missing capability, notifications denied, or a Simulator. Test on a real device (APNs key).
No push on Android 13+The user denied the notification permission.
Alerts never fireFirebase → Functions → Logs: look for evaluateAlerts every 5 minutes. If missing, the project is not on Blaze or Cloud Scheduler is not enabled; deploy again. Price alerts also wait while the display licence is off.
Limit reached when adding an alertThe server enforces 3 free / 100 Pro by default (Console → Pro and purchases).
A campaign stays "scheduled"sendCampaigns runs every 5 minutes; check its logs.

05News and AI

SymptomCause and fix
News emptyConsole → Status shows each feed's result. A feed that is not RSS or Atom, or blocks the server, is skipped. Check that refreshNews runs (Functions → Logs).
News not tagged with tickersThe SEC contact is missing (tagging uses the SEC company list).
Always "Automatic summary"Use AI is off, no key, the daily cap is reached, or the provider failed. The Functions log says AI call failed; using the automatic summary with the reason; Status tests the key (fallback).
The brief or a report answers 503Prices are not licensed or no provider answered: both need quotes. A report needs at least a quote or a profile.

06Widgets

SymptomCause and fix
iOS widget in its empty state although the app has dataThe App Group differs between the app, the extension and the code. Fix all four places (App Group) and register the group for both App IDs.
Widget shows a notice that widgets are off, or Pro-onlyThe console switches (Features, Pro and purchases). Intended.
Widget has no pricesThe display licence is off, or the widget cannot reach API_BASE_URL.
Prices update rarelyThe operating system schedules refreshes (about every 30 minutes) and delays them under battery saving. Opening the app refreshes them.

07Backend and console

SymptomCause and fix
firebase deploy fails on functionsThe project is not on Blaze, or a Google Cloud API is not enabled yet (the CLI names it). Use the Node version in firebase/firebase.json.
npm run dev:api: EADDRINUSEPort 8787 is in use. PORT=8788 npm run dev:api, and the same port in API_BASE_URL.
Console "Firestore is reachable" failsSee below.
Stored keys stopped working after a moveADMIN_SECRET_KEY changed. Use the original key or enter the secrets again.
Lost the setup codeRestart the console before an owner exists: each start prints a new code.
Status lists "skipped" linesA list line is invalid (news source, waterfall, affiliate, sponsored slot). Fix the line as shown.
Changes in the console do not reach the appThe API caches /v1/config for about a minute and the app loads it at start: restart the app. If Status is green but the app shows defaults, the console and the API use different Firebase projects (below).
Console behind a reverse proxy: sign-in loopsThe proxy must send x-forwarded-proto: https; the session cookie is Secure over HTTPS.

08Service account and permissions

The console reaches Firestore with the Admin SDK (admin/src/firebase.ts). When that fails the console still starts, but its log shows [admin] config sync failed: <message> and Status shows the failing check.

MessageCause and fix
The file at /path/service-account.json does not exist, or it is not a fileGOOGLE_APPLICATION_CREDENTIALS points to a missing file. Use the full path, no quotes; in Docker the path must exist inside the container.
Unable to detect a Project Id in the current environment.No credentials and no project id: set GOOGLE_APPLICATION_CREDENTIALS, and check that .env sits in the admin/ folder you start from.
Could not load the default credentialsFIREBASE_PROJECT_ID is set but there are no credentials.
16 UNAUTHENTICATEDThe key was deleted, disabled or edited. Generate a new key (Firebase → Project settings → Service accounts).
7 PERMISSION_DENIEDThe account may not use Firestore in this project. Give it the Cloud Datastore User role, or use the key Firebase generates.
5 NOT_FOUNDFirestore is not created in this project, or the key is for another project (check project_id in the key file).
"Something went wrong reading Firestore" on a console pageThe real error is in the terminal log. A missing index message means the indexes are not deployed: firebase deploy --only firestore:indexes from firebase/.
WhoNeeds
The console's service accountCloud Datastore User (read and write Firestore). It uses no other Google service and never sends push.
You, when you deployA Google account with Owner or Editor rights on the project.
Play purchase verificationA separate service account, or the Functions service account invited in Play Console.
The key is powerful

It bypasses Firestore rules. If a key leaks, delete it in Google Cloud → IAM → Service accounts → Keys and create a new one.

09Firestore connectivity

SymptomCause and fix
Console says config written and Status is green, but the app shows the default name and no adsDifferent projects. Compare the project_id in the key file (or FIREBASE_PROJECT_ID) with the project in your API_BASE_URL and firebase/.firebaserc. When the API cannot find config/public it quietly uses the defaults, where everything that earns money is off.
The console log says data: Firestore emulator on your serverFIRESTORE_EMULATOR_HOST is set. Remove it from the production .env and restart.
Console pages empty although the app has usersWrong project, or ADMIN_DATA=sample is still set.
Account features answer 401 unauthenticatedThe app signs in with the project in firebase_options.dart; the API accepts only tokens from its own project. Run flutterfire configure with the same project and enable Anonymous sign-in.
Cloud backup does not syncDeploy the rules (firebase deploy --only firestore:rules) and sign in with Google, Apple or e-mail; anonymous users are not backed up.
Android emulator cannot reach the local emulatorsUse --dart-define=USE_EMULATOR=true (the app uses 10.0.2.2). Never ship it.

10Ads do not show in release builds

  1. Status in the console"Ad ids set for what is switched on" lists the ids missing for your networks; "Ads are on but every placement is off" means no placement is on.
  2. The settings reached the appClose the app fully and reopen. Open <API_BASE_URL>/v1/config: ads.enabled must be true and your unit ids must be there. If not, see the project mix-up above.
  3. AdMob app id in the native filesReplace Google's test id in AndroidManifest.xml and Info.plist; run tool/check_ad_ids.sh --release.
  4. Pro and Remove adsThose users never see ads. Test with an account that has neither.
  5. ConsentIn the EEA and UK Google's consent form comes first; publish a message in AdMob.
  6. New ad unitsNetworks serve few ads to new units and unreviewed apps ("no fill"). Wait, and check the network's dashboard.
  7. SpacingInterstitials respect the minimum seconds (default 120); app-open ads show at most once an hour.

11Build

SymptomCause and fix
CocoaPods fails with an encoding error such as Unicode Normalization not appropriate for ASCII-8BIT, or pod install aborts on a Mac whose terminal is not UTF-8Run with a UTF-8 locale: export LANG=en_US.UTF-8 (add it to ~/.zshrc), then cd app/ios && pod install --repo-update.
"The plugin … requires a higher minimum iOS deployment version" or a pod target below 15.0The app needs iOS 15.0. app/ios/Podfile sets platform :ios, '15.0' and its post_install raises every pod below 15.0 to 15.0; Runner and the widget target use 15.0 in Xcode. If you replaced the Podfile or created the iOS folder again, restore those lines, then pod install.
iOS build errors in Google Mobile Ads headers after upgrading packagesgoogle_mobile_ads is pinned to 9.0.0 on purpose (comment in app/pubspec.yaml: version 9.1.0 fails to compile with use_frameworks!). Keep the pin until it is fixed upstream.
Widget extension missing from the Xcode projectcd app/ios && ruby scripts/add_widget_extension.rb (safe to repeat).
Gradle or JDK errorsUse JDK 17 or newer and Android SDK 36; run flutter doctor. If the Android SDK 36 platform is missing, install it in Android Studio → SDK Manager.
Windows: a path too long errorMove the project to a short path such as C:\src\stockmaster.
flutter pub get says the SDK version is too oldUpgrade Flutter to 3.41 or newer (flutter upgrade).