Skip to content

PlacePicker CORS Error - Request is not routed through Heroku Proxy #360

@nicmohr25

Description

@nicmohr25

Issue tracker is ONLY used for reporting bugs. New feature suggestions and questions should be discussed on Community or submitted through our user feedback form.

Your issue may already be reported! Please search in the issue tracker before creating one.

Please thumbs up this issue if you have also experienced it. You may also add more information if there is something relevant that was not mentioned. However, please refrain from comments that are not constructive, like "I have this problem too", etc.

Expected behavior (required)

I'm trying to build a Custom Google Maps Widget because I need way more and complex functionality than what FF supports currently.
Building the Map and adding the functionality was no Problem but using the PlacePicker is.

Because I need to update the Map on a location Change I tried using the PlacePicker Widget in my Custom widget. So I just added the FFPlacePicker inside my custom Code and on the selection event of a place I would have called the GoogleMapsControler to animate the camera change to the new location.

But using the Standard PlacePicker, Flutterflow uses the Heroku Proxy to avoid CORS Issues. Using the PlacePicker inside My Custom Widget is routing the request directly to the Google API which causes CORS Error.

Even when setting the proxyBaseUrl property to the same Heroku Domain results in a JSON Error because it's returning a plain text file instead of a JSON and routes the request not straight through the Heroku proxy but first through the ff-debug-service.

And how would be CORS handled when I deploy my app to the App Store/Custom Domain?
Would I need a custom Proxy anyways?

Current behavior (required)

CORS Errors or depending in die Settings plain text response instead of JSON

To Reproduce (required)

Steps to reproduce the behavior:

  1. Create a Custom Widget
  2. Add FF Place Picker Widget Code
  3. Start App
  4. Use FF Place Picker through Custom Widget

Bug Report Code (required, generate from Widget Tree)

ITFTlcmB34hNodcF+KrqdcJslWQsCUMdXOczitVEew4bCIj4EJoMec+kU1pvOO6zaHx6EE2KjTodpK3LhePfJ+w5AyytfYh4+JBMF1yjEA8=

Context (required)

Custom Google Maps Widget with FlutterFlow PlacePicker

Screenshots / recordings

Flutterflow Place Picker used in Custom Widget
image1

Standard FlutterFlow Place Picker request
image2

FlutterFlow Place Picker with property proxyBaseUrl set to 'agile-ridge-02432.herokuapp.com'
image3

PlacePicker Code in Custom Widget
image

Your environment

  • Version of FlutterFlow used: 3.3.4
  • Platform (e.g. Web, MacOS Desktop): Web
  • Browser name and version: Chrome - Version 108.0.5359.124 (Offizieller Build) (x86_64)
  • Operating system and version (desktop or mobile): MacOS Monterey 12.5.1

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions