FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
130 stars 26 forks source link

Call to Google Maps distancematrix API call results in empty JSON on iOS, but works fine in webapp #3360

Closed RickAtSavveLabs closed 4 months ago

RickAtSavveLabs commented 4 months ago

Can we access your project?

Current Behavior

I am using the Distance Matrix API to calculation the driving and walking time/distance between 2 locations. When the call is made, I have the results go directly to a data structure. When I deploy the project to the web and run, the call successfully works.

In iOS when I do a local run and deploy with TestFlight, I get no results. The conditional test after the api call says that it was successful. But when I try to debugPrint the json or any returned data, it shows as null.

Note: My other calls to Google Maps in iOS are successful.

Expected Behavior

Making the API call should work exactly the same in iOS as it does in the web app.

Steps to Reproduce

  1. Construct the destination and origin strings as described in the doc. Provide locations in latitude and longitude with "," and "|" deliminators as described in doc.

Example of two locations for destinations and origins 42.346788,-71.037084|42.345868,-71.039659 42.351683,-71.047126|42.349665,-71.050355

  1. The only other required parameter is an apikey.
  2. Make the api call
  3. If done on iOS, the result will be successful but empty.

Reproducible from Blank

Bug Report Code (Required)

IT4shfLq0812pbxH1rr+bMB7/ToRHFw1bbgescpCbw4bIYj2P4lzY876P1BuOPG4YXNtfVmcp140+NWPvvD2GsI5BAqtRtlh+pNyEgnxVnynWpuTF7qKf3dABeBUIGLFyqujhSN5IbBsdGQR1E2qOOiiVjTXK7LRCkQwSq/LZO4=

Visual documentation

Screenshot of ScreenFloat at Jul 10, 2024 at 1_22_21 PM Screenshot of FlutterFlow at Jul 10, 2024 at 1_23_32 PM Screenshot of FlutterFlow at Jul 10, 2024 at 1_25_00 PM

Environment

- FlutterFlow version: v4.1.69
- Platform: MacOS
- Browser name and version: Safari v17.5
- Operating system and version affected: iOS v17.5.1

Additional Information

In my app, users will use proximity and time to get somewhere to help determine if a place is of interest. This not working diminishes the useful functionality of the app.

msusviela commented 4 months ago

Hey @RickAtSavveLabs, Thanks for your report, So sorry you are experiencing this issue. I was not able to reproduce this on a blank project, but if it is replicable on yours, I'm suspecting this is a project-specific issue and our support team is our best chance to get it solved. Do you mind following up with them? You can do that either by email: support@flutterflow.io or using the in-app chat inside of FlutterFlow. I'm going to close this issue since this tracker is specifically for bugs reproducible from blank projects. If you were able to reproduce this on a blank project as well, please let us know and provide the bug code of that project. Thanks so much!