CORS error when calling Flask backend via ngrok in 8th Wall Simulator

Hi 8th Wall Technical Team,

I am encountering a persistent CORS error when connecting my 8th Wall project (running in Simulator, not yet published) to a Flask backend via an HTTPS ngrok tunnel.

Setup

  • Frontend: 8th Wall project in Simulator (*.dev.8thwall.app)
  • Backend: Flask, using Flask-CORS (CORS(app, resources={r"/*": {"origins": "*"}})), hosted via HTTPS ngrok (e.g., https://niko.ngrok.app)
  • Test: All POST/OPTIONS requests to /api/generate_story fail with CORS error

What Happens

  • When I click β€œGenerate Story” in the Simulator, fetch requests to my ngrok Flask backend fail with CORS policy error.
  • Console error:
    Access to fetch at β€˜https://niko.ngrok.app/api/generate_story’ from origin β€˜https://kennychowteam-default-kennychow.dev.8thwall.app’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: It does not have HTTP ok status.
    Failed to load resource: net::ERR_FAILED
  • I am not even able to test my integration in Simulator.

What I’ve Tried

  • Confirmed Flask-CORS is set to origins='*' for all endpoints.
  • OPTIONS and POST work in Postman/curl, CORS headers are correct.
  • ngrok tunnel is HTTPS, accessible from anywhere.
  • All allowed headers and methods included in Flask-CORS setup.

My Questions

  1. Are there special CORS or header requirements for ngrok backends to work with 8th Wall Simulator?
  2. Is there any 8th Wall Simulator CSP restriction I should be aware of?
  3. Any suggestions to debug Flask + ngrok + 8th Wall Simulator CORS issues?

Screenshots

Thank you for your help!

You might consider using the free-tier of a cloud hosting solution like AWS rather than an ngrok tunnel. I’ve had mixed results with using ngrok in the past especially on their free plan.

Thanks for your suggestion, I will consider about the cloud hosting solution. But I am used the paid ngrok tunnel service, my previous project can be implemented using ngrok tunnel.

I think a good baseline sanity check would be the make sure this approach works regardless of 8th Wall. Does the server work as expected if you take 8th Wall out of the question?