I'm getting a 404 error when calling Firebase cloud functions from a FlutterFlow application. Please help me.

Hello.

I'm going crazy (unless I always have been) :).

I created a very simple function to create cloud functions (the function is right after).

I'm happy to send it. No errors, it deploys. Then error 404.

I've tried everything, I've read everything in this article (thanks by the way).
https://community.flutterflow.io/discussions/post/how-to-fix-cloud-function-deployment-errors-all-solutions-discussion-wgfMLgpLrBlmnUI

I think it's probably due to an authorization. In particular, there's a call to us central when we should be on europe-west-1.

I've tested a lot of cloud functions with the same result.

Do you have any suggestions for solving these 404 errors and CORS problems with Firebase Functions and FlutterFlow?

I really don't want to give up Flutterflow because I love the software.

But I really need the cloud backend.

Thanks.



ERROR:

{"message":"Request body is missing data.","severity":"WARNING"} {"severity":"ERROR","message":"Error: Invalid request, unable to process.\n at entryFromArgs (/workspace/node_modules/firebase-functions/lib/logger/index.js:130:19)\n at Object.error (/workspace/node_modules/firebase-functions/lib/logger/index.js:116:11)\n at /workspace/node_modules/firebase-functions/lib/common/providers/https.js:405:24\n at /workspace/node_modules/firebase-functions/lib/common/providers/https.js:394:25\n at cors (/workspace/node_modules/cors/lib/index.js:188:7)\n at /workspace/node_modules/cors/lib/index.js:224:17\n at originCallback (/workspace/node_modules/cors/lib/index.js:214:15)\n at /workspace/node_modules/cors/lib/index.js:219:13\n at optionsCallback (/workspace/node_modules/cors/lib/index.js:199:9)\n at corsMiddleware (/workspace/node_modules/cors/lib/index.js:204:7)"}

Console:

"I do a button with a pop up if the cloud functions is good or not"


main.dart.js:33860 Uncaught TypeError: J.cq(...).al is not a function

at Object.hR (main.dart.js:33860:24)

at Object.hq (main.dart.js:6119:3)

at b32.$1 (main.dart.js:102687:19)

at c1d (main.dart.js:4227:17)

at main.dart.js:4235:51

hR @ main.dart.js:33860

hq @ main.dart.js:6119

$1 @ main.dart.js:102687

c1d @ main.dart.js:4227

(anonyme) @ main.dart.js:4235

/embed.html?ffCompiledSrc=https%3A%2F%2Fstorage.googleapis.com%2Fflutterflow-io-6f20.appspot.com%2Fbuild_outputs%2Fl-unique-cwf5mi%2Fweb%2FjO8te0C9huXY7BMMJ9tO%2Fmain.dart.js#/testCloudFunctions:1 Access to fetch at 'https://us-central1-l-unique-cwf5mi.cloudfunctions.net/disBonjour' from origin 'https://app.flutterflow.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

service.ts:224

POST https://us-central1-l-unique-cwf5mi.cloudfunctions.net/disBonjour net::ERR_FAILED

postJSON @ service.ts:224

callAtURL @ service.ts:300

2main.dart.js:33831 Uncaught TypeError: Cannot read properties of null (reading 'h')

at Object.bb (main.dart.js:33831:15)

at b32.$1 (main.dart.js:102688:23)

at c1d (main.dart.js:4227:17)

at main.dart.js:4235:51

bb @ main.dart.js:33831

$1 @ main.dart.js:102688

c1d @ main.dart.js:4227

(anonyme) @ main.dart.js:4235

postMessage (asynchrone)

_postMessage @ contentscript.js:1

_write @ contentscript.js:1

x @ contentscript.js:1

(anonyme) @ contentscript.js:1

A.write @ contentscript.js:1

g @ contentscript.js:19

a.emit @ contentscript.js:10

_ @ contentscript.js:19

w @ contentscript.js:19

v.push @ contentscript.js:19

_write @ contentscript.js:19

v @ contentscript.js:19

(anonyme) @ contentscript.js:19

y.write @ contentscript.js:19

g @ contentscript.js:19

a.emit @ contentscript.js:10

_ @ contentscript.js:19

w @ contentscript.js:19

v.push @ contentscript.js:19

_write @ contentscript.js:19

v @ contentscript.js:19

(anonyme) @ contentscript.js:19

y.write @ contentscript.js:19

d @ contentscript.js:10

a.emit @ contentscript.js:10

U @ contentscript.js:10

F @ contentscript.js:10

B.push @ contentscript.js:10

_onMessage @ contentscript.js:10

(anonyme) @ contentscript.js:10

1
1 reply