-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Calling Cloud Functions locally from iOS gives an "Insecure fetch request" error #7537
Comments
This comment has been minimized.
This comment has been minimized.
@ir-fuel Sorry you have the issue. I haven't had a chance to test it on my end but most likely App Transport Security restrictions. You can configure an exception for Please let us know if it's helpful. |
ATS has been disabled in my info.plist (aka |
Thank you for quick response! Could you please share |
|
@ir-fuel Let me try it on my end and get back to you. |
@morganchen12 We should consider adding ATS info to the docs. |
The docs are also a bit strange: https://firebase.google.com/docs/functions/local-emulator#ios---swift
http -> https |
@ir-fuel thank you for spotting it! |
Potential duplicate: #7538 |
@ir-fuel @peterfriese A couple changes I had to do to make emulator working for me:
Please let me know if these changes are sufficient for you as well. |
I didn't need to change my "allow all" ATS setting, I did need to put this:
And it works now. BTW did some doc change recently? I'm pretty sure I didn't invent the code to connect to the local emulator myself, but if I check the todays today they state:
|
Can confirm prefixing the host with @ir-fuel - the code snippet you see there (I guess you're referring to https://firebase.google.com/docs/emulator-suite/connect_functions) gets pulled in from a code snippet, which hasn't been changed recently. |
The "http" prefix should not be required in useEmulator, that's a bug. So I'll fix that which means that the workaround presented in this Issue will break in the future (just FYI) |
I think the confusion comes from the API docs. Sorry about that, it will be fixed. |
[REQUIRED] Step 1: Describe your environment
Swift Package Manager
[REQUIRED] Step 2: Describe the problem
When running the emulator locally and calling a HTTPS function, the console outputs the following message:
Steps to reproduce:
Create a cloud function:
Run the emulator locally
Setup the iOS app to call your function and call it
Relevant Code:
on iOS:
The text was updated successfully, but these errors were encountered: