Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Major Isar upgrade causing compilation errors due to incorrect versioning #117

Closed
4 tasks done
HappyMakadiyaS opened this issue Apr 17, 2023 · 9 comments · Fixed by #114
Closed
4 tasks done
Labels
bug This issue reports broken functionality or another error high priority Should be worked on before other issues

Comments

@HappyMakadiyaS
Copy link

HappyMakadiyaS commented Apr 17, 2023

What is the bug?

Isar has been upgraded with Braking changes due to that FMTC throwing error while running the application.

../../../.pub-cache/hosted/pub.dev/flutter_map_tile_caching-7.2.0/lib/src/bulk_download/bulk_tile_writer.dart:134:27: Error: Required named parameter 'directory' must be provided.
  final db = Isar.openSync(
                          ^
../../../.pub-cache/hosted/pub.dev/isar-3.1.0/lib/src/isar.dart:118:15: Context: Found this candidate, but the arguments don't match.
  static Isar openSync(
              ^^^^^^^^
../../../.pub-cache/hosted/pub.dev/flutter_map_tile_caching-7.2.0/lib/src/bulk_download/bulk_tile_writer.dart:211:27: Error: Required named parameter 'directory' must be provided.
  final db = Isar.openSync(
                          ^
../../../.pub-cache/hosted/pub.dev/isar-3.1.0/lib/src/isar.dart:118:15: Context: Found this candidate, but the arguments don't match.
  static Isar openSync(
              ^^^^^^^^
../../../.pub-cache/hosted/pub.dev/flutter_map_tile_caching-7.2.0/lib/src/providers/image_provider.dart:251:27: Error: Required named parameter 'directory' must be provided.
  final db = Isar.openSync(
                          ^
../../../.pub-cache/hosted/pub.dev/isar-3.1.0/lib/src/isar.dart:118:15: Context: Found this candidate, but the arguments don't match.
  static Isar openSync(
              ^^^^^^^^
../../../.pub-cache/hosted/pub.dev/flutter_map_tile_caching-7.2.0/lib/src/db/defs/store_descriptor.g.dart:16:33: Error: Constant evaluation error:
const DbStoreDescriptorSchema = CollectionSchema(
                                ^
../../../.pub-cache/hosted/pub.dev/isar-3.1.0/lib/src/schema/collection_schema.dart:24:24: Context: This assertion failed with message: Outdated generated code. Please re-run code generation using the latest generator.
          Isar.version == version,
                       ^
../../../.pub-cache/hosted/pub.dev/flutter_map_tile_caching-7.2.0/lib/src/db/defs/store_descriptor.g.dart:16:7: Context: While analyzing:
const DbStoreDescriptorSchema = CollectionSchema(
.....
....

Pub.dev has Analysis issue as well
image

Could you please fix it on priority? This is a blocker for us for a production application we are working on.

Platforms Affected

Android, iOS

Severity

Erroneous: Prevents normal functioning and causes errors in the console

Frequency

Consistently: Always occurs at the same time and location

Requirements

@HappyMakadiyaS HappyMakadiyaS added bug This issue reports broken functionality or another error needs verification This needs to be verified/tested before fixes (or not) can be made labels Apr 17, 2023
@JaffaKetchup
Copy link
Owner

@HappyMakadiyaS I have not yet claimed support for Isar v3.1. Unfortunately their change was breaking, but they did not follow semver. Now the package resolver forces usage of v3.1, even though FMTC is only compatible with v3.0.

As a workaround, please use dependency overrides to pin the Isar dependency to v3.0.6-dev.0.

@JaffaKetchup
Copy link
Owner

JaffaKetchup commented Apr 17, 2023

In addition, I have reason to believe you are breaking the terms of the GPL license. If your application is proprietary, please get in touch through email.
This also applies to Simform Solutions @SimformSolutionsPvtLtd (cc @dhaval-k-simformsolutions).

@JaffaKetchup JaffaKetchup added high priority Should be worked on before other issues blocked This issue's resolution can't be worked on right now isar and removed needs verification This needs to be verified/tested before fixes (or not) can be made labels Apr 17, 2023
@HappyMakadiyaS
Copy link
Author

@JaffaKetchup
Thanks for the quick reply. We are not supposed to break any licence agreement here. We are just checking the feasibility of this package with our use case, if its fits in our use case we surely reach out to you for licence purchase things. Hope my answers makes sense to you. Please let me know any correction needed at my end.

@sikandernoori
Copy link
Contributor

@JaffaKetchup

As a workaround, please use dependency overrides to pin the Isar dependency to v3.0.6-dev.0.

Connecting to VM Service at ws://127.0.0.1:52112/hfwEzjDqjW4=/ws
[ +430 ms] [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: IsarError: Could not initialize IsarCore library for processor architecture "ios_arm64". If you create a Flutter app, make sure to add isar_flutter_libs to your dependencies.
[        ] IsarError: Incorrect Isar Core version: Required 3.0.6-dev.0 found 3.1.0. Make sure to use the latest isar_flutter_libs. If you have a Dart only project, make sure that old Isar Core binaries are deleted.
[        ] #0      initializeCoreBinary
isar_core.dart:78
[        ] #1      openIsar
open.dart:81
[        ] #2      Isar.open
isar.dart:107
[        ] #3      FMTCRegistry.initialise
registry.dart:57
[        ] #4      FlutterMapTileCaching.initialise
fmtc.dart:102
[        ] <asynchronous suspension>
[        ] #5      initializeFMTC
main.dart:214
[        ] <asynchronous suspension>
[        ] #6      runTrackr
main.dart:170
[        ] <asynchronous suspension>
[        ] #7      main
main.dart:136
[        ] <asynchronous suspension>
[   +3 ms] flutter: [token:, 83356cd8c4af8b1351d1e9469e22872123af0858cdc2005990d6fe461f7f2034]

@JaffaKetchup
Copy link
Owner

Also pin all related packages to the same version, like 'isar_flutter_libs'.

@JaffaKetchup
Copy link
Owner

@HappyMakadiyaS Sure, no problem. Please get in touch when you get a moment (github@jaffaketchup.dev), just to acknowledge that you're currently evaluating it, just so I can keep track of things.

@JaffaKetchup JaffaKetchup removed the blocked This issue's resolution can't be worked on right now label Apr 17, 2023
@JaffaKetchup

This comment was marked as duplicate.

@JaffaKetchup JaffaKetchup linked a pull request Apr 17, 2023 that will close this issue
@JaffaKetchup JaffaKetchup changed the title [BUG] ISAR: The named parameter 'directory' is required. [BUG] Major Isar upgrade causing compilation errors due to incorrect versioning Apr 17, 2023
@JaffaKetchup JaffaKetchup pinned this issue Apr 17, 2023
@JaffaKetchup
Copy link
Owner

JaffaKetchup commented Apr 18, 2023

See the Important Temporary Notice posted on the front page of https://fmtc.jaffaketchup.dev/ for more information about this issue and its workarounds.

image

Repository owner locked as too heated and limited conversation to collaborators Apr 18, 2023
@JaffaKetchup JaffaKetchup unpinned this issue May 5, 2023
Repository owner unlocked this conversation May 5, 2023
@JaffaKetchup
Copy link
Owner

This has been fixed in #114. Thanks for all your perseverance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue reports broken functionality or another error high priority Should be worked on before other issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants