#[SOLVED] Server Error When Accessing API From iOS Simulator

5 messages · Page 1 of 1 (latest)

silk hemlock
#

THE PROBLEM
When I make API calls from my app running in iOS simulator, I get this error message (raw body): {"message":"Server Error","code":500,"type":"general_unknown","version":"1.5.8"}.

WHAT I TRIED (besides reading docs)
When testing REST API calls from FlutterFlow (GUI app building service based on Flutter framework) with enabled by default proxy routing, everything works fine.
When I disable proxy routing, I get this error in the browser's console: Access to XMLHttpRequest at 'https://cloud.appwrite.io/v1/account/tokens/email' from origin 'https://app.flutterflow.io' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://localhost' that is not equal to the supplied origin.

HYPOTHESIS
My initial hypothesis was that it also has something to do with CORS policies. I tried creating different platforms in Appwrite Console, including Web app with hostnames localhost or * (general wildcard) with no luck. I also tried to create a Flutter iOS platform with my app's name and Bundle ID with no luck either.

ADDITIONAL INFO
I use no SDKs making all calls via REST API (for example, Create email token (OTP)).

Any help will be appreciated!

ionic veldt
#

Go to project overview then create web app

silk hemlock
# ionic veldt Go to project overview then create web app

Sorry if I made it confusing by mentioning the error when I disable proxy routing. This is not the issue, it just made me thing that maybe the issue with iOS simulator is also related to CORS policies. I edited my post to make it clearer.

As I stated above, I already tried creating Web app platform with general wildcard and it didn't help. Obviously, no other domain would work here either, including the suggested by you, which I've just tested nonetheless.

silk hemlock
#

[SOLVED] Server Error When Accessing API From iOS Simulator