Al_B
Al_B2mo ago

CORS Issue from FlutterFlow

Hi - I'm encountering what I suspect are CORS issues when launching a buildship API from a Flutterflow app. The API works perfectly when launched within Flutterflow's test sessions, but is blocked entirely when the app is deployed on iOS. I've tried making the API call private in Flutterflow, and while that works in accessing the Buildship workflow, I encounter downstream impacts within Flutterflow with the private call. Unfortunately I can't seem to find any CORS related information in the Buildship documentation. Can anyone point me in the right direction on how I might resolve this (besides the private setting in Flutterflow?) Thanks in advance!
Solution:
@Al_B Another thought... just because what you're describing doesn't exactly sound like how I've seen CORS issues play out in the past... is to set up Local Run in the FlutterFlow app and test it on the iOS Simulator with the Flutter Devtools open. Under "Network" in Devtools you'll be able to see if it actually is a CORS issue or not. As well as a ton of other information about what data is getting to and from your app. And glad you like the videos! Thats awesome feedback. 🙂...
No description
Jump to solution
6 Replies
AI Support
AI Support2mo ago
AI Support Bot Information
<@1201000937695756360> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human! Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers. Please note: Team members will review and answer the questions on best efforts basis.
AI Support
AI Support2mo ago
AI Response
It appears that there isn't direct information available specifically about resolving CORS issues between Buildship and Flutterflow from the provided documentation. However, you might want to consider typical approaches for handling CORS issues in web development: 1. Configure CORS on your server: Ensure your Buildship server explicitly allows requests from your Flutterflow app's domain. 2. Use a proxy server: If you cannot configure CORS on the Buildship API server, you may set up a proxy server that adds the necessary CORS headers. 3. Adjust API security settings: Sometimes relaxing the security settings for development purposes or when using localhost can help bypass CORS issues temporarily. 4. Test in different environments: Since CORS issues might behave differently depending on environments (development vs. production), ensure tests are done in the same environment as where the issue is present. For further assistance, you might want to consult Buildship's documentation on API calls or use their in-app support to raise a specific ticket on your issue. If these suggestions don't help, it might be best to contact Buildship support via their discord or through the support page on their website.
BuildShip AI Support
Gaurav Chadha
Gaurav Chadha2mo ago
@Al_B The issue here seems is how the request is made from client side (FlutterFlow) as this occurs if they call external endpoint, which blocks access-control, you can try include Access-Control-Allow-Origin containing domain name in the headers of the API Call, if your are making a request to external endpoint which is giving CORS issue. cc @Stu
Stu
Stu2mo ago
Hey @Gaurav Chadha and @Al_B The only other thing I can think of is that I know I've had issues switching a Private API call in Flutterflow back to a "standard" API call. It might be worth a post in the FlutterFlow community forums around this?
Al_B
Al_B2mo ago
Hi @Gaurav Chadha @Stu , thanks for the response! I'm new to the CORS subject matter so apologies if I'm misunderstanding, but I'm under the impression that the Access-Control-Allow-Origin would need to be added in the Buildship response header, not in the Flutterflow API request. Is it possible to add the Access-Control-Allow-Origin header in my Buildship API setup? If so, any chance you can point me in the right direction of where I would do so? Thanks again! Also, total aside, but @Stu thanks for all your video tutorials! I have found them super helpful in the journey to build my first app 🙂
Solution
Stu
Stu2mo ago
@Al_B Another thought... just because what you're describing doesn't exactly sound like how I've seen CORS issues play out in the past... is to set up Local Run in the FlutterFlow app and test it on the iOS Simulator with the Flutter Devtools open. Under "Network" in Devtools you'll be able to see if it actually is a CORS issue or not. As well as a ton of other information about what data is getting to and from your app. And glad you like the videos! Thats awesome feedback. 🙂
No description