-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Calling AngularFireFunctions.httpsCallable results to error 404 because #1933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Am also experiencing the same issue. It seems to be that it's not setting the region properly (even if left as default) and it's showing 'null' in the URL. |
Same problem for me. Angular CLI: 6.0.8 Package Version@angular-devkit/architect 0.6.8 |
same here ..., getting same as george43g with the url = https://null-mysite-dev.cloudfunctions.net/somefunc achendrick solution worked for me (but needs angularfire fix) |
Thanks @achendrick , it works. |
Are you not getting CORS errors? I do, while localhost is added in the authorised domain list in the firebase console. I'm testing an Ionic 3 app local (localhost:8100) |
how to resolve the CORS errors? get firestore data doesn't happen, but function |
Don't know yet. |
I resolved it by adding CORS in the functions. It is documented right here. Link |
@alberthoekstra can you tell me more detail? which file I can change? I can not found the functions.https or express. do I need to install firebase-functions and cors? btw, I use the ngx-admin. thanks so much. |
Sure no problem ! Check this example of Firebase where they created one function that return a CORS response. In my case I added the CORS package. Then I added this code at the top of the code:
Then wrapped the original response in this code.
Hopefully this makes any sense :-) |
"AngularFireFunctions is super easy. You create a function on the server side and then "call" it by its name with the client library. This is all I find in terms of documentation for httpsCallable. " Wondering if there is any other useful documentation than this available for this function. |
Same question, how to specify POST method ? |
Maybe the docs can answer those? |
Sorry, I mean with the client side. My firebase functions is deployed and works well, but I'm searching how to call it from my application with angularfire2: From the chrometools I see my request has been send with "OPTIONS" method and return status 400. I'm not familiar with CORS, I'm reading docs about this but if you have any clue ... EDIT: My problem was cors misunderstood. Your previous comment helped me. Thank you. |
Issue was fixed in the latest patch. Closing this issue but feel free to continue discussion RE CORS and such here. |
@jamesdaniels how is this fixed? I've the latest version but with a simple
and
I still get the OPTIONS request and the CORS error |
for latest version which compatible with angular 8
|
Hi, I cannot call cloud functions hosted in region different from 'us-central1'.
But I don't understand where import FUNCTIONS_ORIGIN and why set useValue to 'http://localhost:5005' |
Version info
Angular: 6.0
Firebase: 5.5.5
AngularFire: 5.1.0
How to reproduce these conditions
I created a service that aims to generate token from 3rd party service and used AngularFireFunctions to call a cloud function.
Now when I try to use the service in my component, error 404 was raised and I noticed that it called
https://null-rik-app.cloudfunctions.net/generateToken
.The text was updated successfully, but these errors were encountered: