Code Monkey home page Code Monkey logo

Comments (8)

nerder avatar nerder commented on May 31, 2024 3

I've tested it locally and the error is not triggered anymore, as a temporary workaround until the maintainer ship this code you can point at my commit:

pubspec.yml

dependency_overrides:
  algolia_insights:
    git:
      url: https://github.com/nerder/algoliasearch-helper-flutter/
      ref: 1f90cc5095527c43ac8820415dfe24b2c937d37f
      path: insights_dart

from algoliasearch-helper-flutter.

deogw avatar deogw commented on May 31, 2024 2

I got the same error, after upgrading Flutter to the 3.10.2 version.

This is stack trace from crashanalytics :

Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: FileSystemException: Creation failed, path = 'algolia' (OS Error: Read-only file system, errno = 30) at ._rootRunUnary(dart:async) at BackendManager.open(backend_manager.dart:34) at HiveImpl._openBox(hive_impl.dart:101) at HiveImpl.openBox(hive_impl.dart:142) at UserTokenStorage.read(user_token_storage.dart:101)

from algoliasearch-helper-flutter.

VladislavFitz avatar VladislavFitz commented on May 31, 2024 1

Hi @Patrick386, @deogw ,
Thank you for reporting this issue.
I'm actively working to find a solution and fix this as soon as possible.

from algoliasearch-helper-flutter.

nerder avatar nerder commented on May 31, 2024

This is caused by an issue in how hive is used in https://github.com/algolia/algoliasearch-helper-flutter/blob/main/insights_dart/lib/src/user_token_storage.dart

It seems like that when you create an HitsSearcher you are also forced to instantiate Insight even if you don't actually use it.

The fix is to add a temporary writable directory before opening the box. I'll PR that so that later people can point to that version for the fix.

from algoliasearch-helper-flutter.

nerder avatar nerder commented on May 31, 2024

Similar to this issue: isar/hive#40

from algoliasearch-helper-flutter.

nerder avatar nerder commented on May 31, 2024

That's great.

It seems like the solution is simply to do this:

  Future<Box> get _box async {
    final tmpDir = await getTemporaryDirectory();
    return Hive.openBox(_boxName, path: '${tmpDir.path}/$_boxPath');
  }

instead of this:

Future<Box> get _box => Hive.openBox(_boxName, path: _boxPath);

I've forked the repo and I'm testing this right now.

from algoliasearch-helper-flutter.

EglerEnrique avatar EglerEnrique commented on May 31, 2024

Same error

from algoliasearch-helper-flutter.

mohyghb avatar mohyghb commented on May 31, 2024

Same error, is there a timeline as to when the fix will be merged to main and published?

from algoliasearch-helper-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.