Git Product home page Git Product logo

Comments (5)

Skycoder42 avatar Skycoder42 commented on August 11, 2024

Hi^^ Did you follow all steps in the README? More specifically, did you initialize the web project as written here: https://github.com/Skycoder42/libsodium_dart_bindings/tree/main/packages/sodium_libs#web ?

If you did, does the web/sodium.js file exist?

from libsodium_dart_bindings.

Suzylia avatar Suzylia commented on August 11, 2024

Hello, yes I did and the web/sodium.js file exists.
I can see in you README change that this issue only occurs when we are running a flutter application in debug mode in the browser.
So, I can run the application in release mode : flutter run --release -d chrome, and that works.
I was just expecting I could use the debug mode in browser, this is really useful when we often need to restart application.
I hope it will be possible in the future !
Thank you for your answer.
Regards

from libsodium_dart_bindings.

Skycoder42 avatar Skycoder42 commented on August 11, 2024

Hi^^ Yes, I was about to write you here regarding the change in the README. This is an issue that has existed since the beginning, it just slipped out of my mind.

I would like to keep the issue open as a reminder to look into it further.

from libsodium_dart_bindings.

Skycoder42 avatar Skycoder42 commented on August 11, 2024

Okay, I actually managed to fix this bug. The fix is rather simple: The sodium.js library must be loaded before the flutter debug code is loaded - Probably, because flutter overwrites some global JS functions that are needed for the sodium initialization.

To get this to work in your project, simply update to Version 1.2.5 and re-run the flutter pub run sodium_libs:update_web command. This should update your index.html to contain a <script> tag that loads sodium.js.

Please confirm that this works for you as well, so I can close the issue and remove the section from the README again

from libsodium_dart_bindings.

Suzylia avatar Suzylia commented on August 11, 2024

Hello, that worked, and the issue is solved for me !
Thank you

from libsodium_dart_bindings.

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.