tekartik / sqflite

SQLite flutter plugin
BSD 2-Clause "Simplified" License
2.82k stars 518 forks source link

sqflite_common_ffi_web : Some tests failed. #1029

Open Lotharla opened 1 year ago

Lotharla commented 1 year ago

Hi, because i intend to use 'sqflite_common_ffi_web' i ran the tests with results below. How relevant is the result that 'some tests failed' or what can i do to solve the problems? The example app 'notepad_sqflite' by the way is running well with Chromium on my system (Ubuntu 22.04)... -Lothar

$ dart run tool/run_web_tests.dart $ dart test -p chrome 00:00 +0: compiling test/sqflite_ffi_web_test.dart 00:01 +0: compiling test/sqflite_ffi_web_test.dart 00:02 +0: compiling test/sqflite_ffi_web_test.dart 00:03 +0: compiling test/sqflite_ffi_web_test.dart 00:04 +0: compiling test/sqflite_ffi_web_test.dart 00:05 +0: compiling test/sqflite_ffi_web_test.dart 00:06 +0: compiling test/sqflite_ffi_web_test.dart 00:07 +0: compiling test/sqflite_ffi_web_test.dart 00:08 +0: compiling test/sqflite_ffi_web_test.dart 00:09 +0: compiling test/sqflite_ffi_web_test.dart 00:10 +0: compiling test/sqflite_ffi_web_test.dart 00:11 +0: compiling test/sqflite_ffi_web_test.dart 00:12 +0: compiling test/sqflite_ffi_web_test.dart 00:13 +0: compiling test/sqflite_ffi_web_test.dart 00:14 +0: compiling test/sqflite_ffi_web_test.dart 00:15 +0: compiling test/sqflite_ffi_web_test.dart 00:16 +0: compiling test/sqflite_ffi_web_test.dart 00:17 +0: compiling test/sqflite_ffi_web_test.dart 00:17 +0: compiling test/sqflite_ffi_web_test.dart
Info: Compiling with sound null safety. Compiled 11,601,359 characters Dart to 2,348,710 characters JavaScript in 17.2 seconds using 351.320 MB of memory Dart file /tmp/dart_test_HLOXJZ/runInBrowser.dart compiled to JavaScript: /tmp/dart_test_LNBNYH/test_QKHGBM/sqflite_ffi_web_test.dart.browser_test.dart.js

00:21 +0 -1: compiling test/sqflite_ffi_web_test.dart [E]
Failed to load "test/sqflite_ffi_web_test.dart": SqfliteFfiWebException()

To run this test again: /home/lotharla/flutter/bin/cache/dart-sdk/bin/dart test test/sqflite_ffi_web_test.dart -p chrome --plain-name 'compiling test/sqflite_ffi_web_test.dart' 00:21 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:22 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:23 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:24 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:25 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:26 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:27 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:28 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:29 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:30 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:31 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:32 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:33 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:34 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:35 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:36 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:37 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:38 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:39 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:40 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:41 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart 00:41 +0 -1: compiling test/sqflite_ffi_web_no_web_worker_test.dart
Info: Compiling with sound null safety. Compiled 11,601,467 characters Dart to 2,598,246 characters JavaScript in 19.1 seconds using 354.754 MB of memory Dart file /tmp/dart_test_IIELVK/runInBrowser.dart compiled to JavaScript: /tmp/dart_test_LNBNYH/test_QJUMGE/sqflite_ffi_web_no_web_worker_test.dart.browser_test.dart.js

00:43 +0 -2: compiling test/sqflite_ffi_web_no_web_worker_test.dart [E]
Failed to load "test/sqflite_ffi_web_no_web_worker_test.dart": Failed to execute 'compile' on 'WebAssembly': HTTP status code is not ok

To run this test again: /home/lotharla/flutter/bin/cache/dart-sdk/bin/dart test test/sqflite_ffi_web_no_web_worker_test.dart -p chrome --plain-name 'compiling test/sqflite_ffi_web_no_web_worker_test.dart' 00:43 +0 -2: Some tests failed.
Unhandled exception: ShellException(dart test -p chrome, exitCode 1, workingDirectory: /home/lotharla/devel/sqflite/packages_web/sqflite_common_ffi_web_test)

alextekartik commented 11 months ago

Unfortunately, ffi_web is not working in unit tests at this time (and don't know how to resolve it yet)

1446809932 commented 8 months ago

Uncaught (in promise) Error: SqfliteFfiWebException()

at Object.createErrorWithStack (errors.dart:327:10)
at Error._throw (core_patch.dart:337:28)
at Error.throwWithStackTrace (errors.dart:120:5)
at async._AsyncCallbackEntry.new.callback (zone.dart:1386:11)
at Object._microtaskLoop (schedule_microtask.dart:40:11)
at _startMicrotaskLoop (schedule_microtask.dart:49:5)
at async_patch.dart:181:15