Giter Club home page Giter Club logo

Comments (10)

Maria-Bordunova avatar Maria-Bordunova commented on May 30, 2024

Hi, @digiborimusik. I couldn't reproduce the case neither on iOS nor on Android. Could you provide more details:

  1. Which version of the qonversion-flutter-sdk do you use? The sdk provides cache since 2.3.0 version.
  2. Platform (iOS or Android)
  3. The detailed description of the issue. Once Qonversion was successfully launched on the device, sdk caches all data. But if there was an error on the first launch, you may encounter the error as there is no cache yet (only during the first launch).
  4. Also please provide your code where you call the checkPermissions() method and use its result.

You may contact me via email if you want :[email protected]

from flutter-sdk.

digiboridev avatar digiboridev commented on May 30, 2024

Hi. Its happens on android and ios, every time if i disable network and start app. After start app, the method Qonversion.launch return error D/Qonversion( 9734): Thread - main initRequest - failure - QonversionError: {code=NetworkConnectionFailed, description=There was a network issue. Please make sure that the Internet connection is available on the device, additionalMessage=Unable to resolve host "api.qonversion.io": No address associated with hostname}
And then Qonversion.checkPersmission() dont answer, breakpoint just stop on await. final Map<String, QPermission> permissions = await Qonversion.checkPermissions();

Maybe its not a bug, but docs says

Qonversion SDK caches all required data on products, offerings, and permissions. The data is still immediately available in cases the internet connection is lost or any server-side delays.

from flutter-sdk.

digiboridev avatar digiboridev commented on May 30, 2024

qonversion_flutter: ^3.2.1

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version 10.0.17763.1999], locale ru-UA)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] VS Code (version 1.57.1)
[√] Connected device (2 available)

from flutter-sdk.

Maria-Bordunova avatar Maria-Bordunova commented on May 30, 2024

The launch method always sends the request when starting an application (or the method is called). If an error occurs, the launch method will only report it. But you can continue to use the Qonversion methods further (retrieve offerings, permissions, products) since they will use data from the cache.

Please try to call lauch() inside the try/catch block. It will handle the error when it occurs :

    Qonversion.launch(
      'your_project_key',
      isObserveMode: false,
    );
    try {
      final Map<String, QPermission> permissions =
          await Qonversion.checkPermissions();
    } catch (e) {
      print(e);
    }

P.S. It is a normal behaviour in your logs. We only report that it was not possible to connect to Qonversion. But you still can call our methods 🙂

from flutter-sdk.

digiboridev avatar digiboridev commented on May 30, 2024

No, i do that you say. After launch is fail, the future checkPermissions() dont complete. No error, no complete, its just wait.

Untitled.mp4

from flutter-sdk.

digiboridev avatar digiboridev commented on May 30, 2024

Which version of the qonversion-flutter-sdk do you use? The sdk provides cache since 2.3.0 version.
I use 2.2.0. maybe that is answer

from flutter-sdk.

Maria-Bordunova avatar Maria-Bordunova commented on May 30, 2024

Have you tried with the newer sdk version?

from flutter-sdk.

digiboridev avatar digiboridev commented on May 30, 2024

No, I can't switch to the dev channel on this project.

from flutter-sdk.

Maria-Bordunova avatar Maria-Bordunova commented on May 30, 2024

@digiborimusik
Sorry. I think we misunderstood each other 😀
You are using qonversion-sdk 3.2.1, aren't you? If yes, everything should work independently on the flutter channel version.
Let's move further. I couldn't find any requests from your project. It seems to me that you run your app only without internet-connection. Therefore your device doesn't have cache and checkPermissions() doesn't work.
Also I suggest you test from scratch:

  1. First time run your application with the internet connection. Make sure everything works correctly. Qonversion sdk will save into cache all data.
  2. Second time run the app without the Internet connection and see the result.

from flutter-sdk.

Maria-Bordunova avatar Maria-Bordunova commented on May 30, 2024

Hi @digiborimusik
The code from the video seems fine to me. But I don't see the code snippet for launch(). Could you please share with me if you still have the issue?

from flutter-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.