supabase / supabase-flutter

Flutter integration for Supabase. This package makes it simple for developers to build secure and scalable products.
https://supabase.com/
MIT License
724 stars 174 forks source link

SqliteException: Could not Load PowerSync Extension #1064

Closed flutterdevcodiste closed 5 days ago

flutterdevcodiste commented 5 days ago

When running the Flutter app, the following error is thrown:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: SqliteException(21): Could not load extension Instance of '_StringStackTrace'  
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: SqliteException(1): The powersync extension is not loaded correctly.  
Details: SqliteException(21): Could not load extension 
#0 PowerSyncDatabaseMixin._checkVersion (package:powersync/src/database/powersync_db_mixin.dart:96:7)

App throws

SqliteException(21): Could not load extension

and

SqliteException(1): The powersync extension is not loaded correctly.

The issue seems to be related to the loading of the PowerSync extension. Any guidance or fix would be appreciated.

The following my pubspec.yaml dependencies

version: 1.0.0+1

environment:
  sdk: ">=3.0.0 <4.0.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter

  audioplayers: 6.1.0
  auto_size_text: 3.0.0
  cached_network_image: 3.3.1
  collection: 1.18.0
  debug_panel_proto:
    git:
      url: https://github.com/FlutterFlow/debug_panel_proto.git
      ref: v0.1.4
  dropdown_button2: 2.3.9
  easy_debounce: 2.0.1
  expandable: 5.0.1
  firebase_app_check: 0.2.2+5
  firebase_core: 2.31.0
  firebase_performance: 0.9.4+5
  flutter_animate: 4.5.0
  flutter_cache_manager: 3.3.1
  flutter_svg: 2.0.9
  font_awesome_flutter: 10.7.0
  from_css_color: 2.0.0
  go_router: 12.1.3
  google_fonts: 6.1.0
  intl: 0.19.0
  json_path: 0.7.2
  mobile_scanner: 5.2.3
  page_transition: 2.1.0
  path_provider: 2.1.1
  sqflite: 2.3.3+1
  powersync: 1.8.6
  provider: 6.1.2
  rxdart: 0.27.7
  shared_preferences: 2.2.2
  supabase_flutter: 2.0.2
  timeago: 3.6.1
  url_launcher: 6.3.0
  webview_flutter: 4.7.0
  universal_io: 2.2.2

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.0

  device_info_plus:
  equatable: 2.0.5
  flutter_udid: ^3.0.0
  http: 1.2.1
  intl_phone_field: 3.2.0
  mime_type: 1.0.0
  pin_code_fields: 8.0.1
  stop_watch_timer: 3.0.2

dependency_overrides:
  http: 1.2.1
  #  pointer_interceptor: 0.10.1
  protobuf: 3.1.0
  rxdart: 0.27.7
  uuid: ^4.0.0
  web: 0.5.1

dev_dependencies:
  flutter_lints: 4.0.0
  #  flutterflow_debug_panel:
  #    git:
  #      url: https://github.com/FlutterFlow/debug_panel_devtool.git
  #      ref: v0.1.9
  lints: 4.0.0
  flutter_test:
    sdk: flutter
Vinzent03 commented 5 days ago

As you say, the issue is related to powersync, which is not maintained by Supabase. I see you created the same issue there as well. Please don't create two identical issue, without even mentioning the other one. I'm closing this, because this should be discussed at powersync.

But by the way, I see you are pinning most of your package versions to a specific version. I suggest you to try upgrading your packages.