GithubHelp home page GithubHelp logo

Comments (7)

matanshukry avatar matanshukry commented on August 14, 2024

@kaminoan-dev I can't seem to reproduce that.
Specifically, you can look at the example under flutter_google_places_sdk - and launch it on web.
Both in debug and run, when you don't provider the key - you'll get the error showing up on the UI.

That can only happen if the catch block, much like yours, is executed - since there it will assign the error that will then be shown in the UI. I tried again and it works on both debug and run modes.

And much like in your description, that example project has dependency on flutter_google_places_sdk rather than directly on the web dependency.

Can you make a reproducible example?
Or perhaps a gist of the differences you can make in the example, as to when the catch block does not execute?

from flutter_google_places_sdk.

kaminoan-dev avatar kaminoan-dev commented on August 14, 2024

(I have updated my initial post for more details)

I kept getting the same error using the example app in the flutter_google_places_sdk project with a clean clone of the repo. I have then done a fresh intallation of everthing (Android Studio, Flutter, Dart, the package repository, etc) on Windows, since I though it may be relate somehow to using the Linux/Ubuntu version of Chrome... and I still get those error.

As I say, I have just cloned this repository without any modifications of the code and get those errors.

from flutter_google_places_sdk.

matanshukry avatar matanshukry commented on August 14, 2024

@kaminoan-dev you mentioned you keep getting "those errors" while using the repository without any modifications.

To be clear then - you're not seeing the error on the web?

Attaching image to what is hapenning, which is what should happen.
image

from flutter_google_places_sdk.

kaminoan-dev avatar kaminoan-dev commented on August 14, 2024

Using the repository without any modifications and leaving the API_KEY = '' I do get the same error as in you have in your screenshot. That works perfectly.

However, if it is replaced by an invalid value to force another type of error, for example API_KEY = 'DummyKeyValue', the low level error is not caught and the execution gets stuck.

from flutter_google_places_sdk.

matanshukry avatar matanshukry commented on August 14, 2024

This is an issue with flutter (or rather, dart).
Created ticket with flutter: flutter/flutter#97082
which in turn created ticket with dart: dart-lang/sdk#48239

from flutter_google_places_sdk.

kaminoan-dev avatar kaminoan-dev commented on August 14, 2024

Thank you very much. I will subscribe to those issues to follow.

from flutter_google_places_sdk.

matanshukry avatar matanshukry commented on August 14, 2024

@kaminoan-dev flutter issue closed with a comment saying it's a valid behavior.

Looking again I agree; the promise it self is never completed in javascript either (neither successfully nor with an error), so it make sense for the dart code to never complete the future either.

Closing as well.

from flutter_google_places_sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.