Code Monkey home page Code Monkey logo

Comments (5)

Jordan-Nelson avatar Jordan-Nelson commented on August 30, 2024

Hello @Fleximex - Amplify.reset() is an internal API. It is not intended to be used outside of Amplify packages. What is your use case for calling this API?

from amplify-flutter.

Fleximex avatar Fleximex commented on August 30, 2024

We are aware Amplify.reset() is not battle tested for production, and thus not intended for production. In our case, however, we have a multi tenant solution where, on runtime, Amplify needs to be reconfigured for a different identity and user pool (won't open a separate issue/discussion for that since amplify-flutter, amplify-swift and amplify-android all have multiple open already).

This issue though, doesn't exclusively relate to Amplify.reset(). Whether or not Amplify.reset() is used to execute the close() method, in the mentioned file. It modifies the list it is iterating over. Which should not happen regardless.

from amplify-flutter.

Jordan-Nelson avatar Jordan-Nelson commented on August 30, 2024

The exception indicates that either addInstance or create is called at the same time as or immediately after close. I am not sure we want to allow that. It might hide other issues.

Are you calling reset() immediately after addPlugin() or configure()? Are you awaiting the calls to addPlugin() and configure()?

from amplify-flutter.

Jordan-Nelson avatar Jordan-Nelson commented on August 30, 2024

@Fleximex Please let me know if you are awaiting the calls to addPlugin and configure. It would help if you can share the code snippet that results in this. We use Amplify.reset() in many of our integration tests I do not see this occur.

from amplify-flutter.

Jordan-Nelson avatar Jordan-Nelson commented on August 30, 2024

@Fleximex I am going to close this out since we have not heard back. If you are still facing this issue please share the info requested above. Thanks.

from amplify-flutter.

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.