Short answer
Open the function’s logs in the Firebase console or Google Cloud to find the real error. Catch errors in the handler and throw an HttpsError with a code and a message the client can show. If the logs show no call at all, check the client uses the region and name you deployed.
Rather not fix it yourself? App Fix Ticket starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.
Why the client gets INTERNAL, and the fix
01
A plain error escapes the handler
“If an error other than an HTTPS error is thrown from your functions, your client instead receives an error with the message INTERNAL and the code internal.” Firebase, Call functions from your app
A failed database write, a missing environment value or a bug throws a normal Error, and the client only sees INTERNAL. Log the real error and throw an HttpsError.
const { onCall, HttpsError } = require('firebase-functions/https'); const { logger } = require('firebase-functions'); exports.createOrder = onCall(async (request) => { if (!request.auth) { throw new HttpsError('unauthenticated', 'Sign in first.'); } try { return await saveOrder(request.data); } catch (err) { if (err instanceof HttpsError) throw err; logger.error(err); throw new HttpsError('internal', 'Could not save the order.'); } });02
The client calls a different region
“To call a function running in any location other than us-central1, you must set the appropriate value at initialization.” Firebase, Call functions from your app
A function deployed to europe-west1 and a client left on the default region never meet; the client may see INTERNAL or NOT_FOUND. Pass the region when you get the functions instance, such as getFunctions(app, 'europe-west1').
03
The function is onRequest, not onCall
httpsCallable expects a function written with onCall. An onRequest function returns a plain HTTP response, so call it with fetch or rewrite it as onCall.
04
The function crashed or timed out
Out-of-memory and timeout failures are recorded in the logs, while the client may see INTERNAL, UNAVAILABLE or DEADLINE_EXCEEDED. Raise the memory or timeout, or move long work to a background trigger.
Checked against the vendor’s docs on : Firebase docs: Call functions from your app; Firebase docs: Cloud Functions locations.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
Related: Firebase Functions 403 Forbidden · Firebase Functions timeout · Firebase Functions CORS error · Firebase Functions secret undefined