deakjahn / sqflite_web

A web plugin for https://github.com/tekartik/sqflite
Other
36 stars 20 forks source link

App doesn't run in debug mode #18

Closed masteradit closed 3 years ago

masteradit commented 3 years ago

For some reason, after adding sqflite_web, my app just stopped working in debug mode. When I run it, it gets stuck on Waiting for connection from debug service from Chrome.

The source code for my project is available here: https://github.com/masteradit/AllSQL

deakjahn commented 3 years ago

Try adding --verbose to your flutter run command to see if it reports any errors.

If you run from the IDE, you might have a way to specify command line parameters, I happen to use Android Studio and it's in Run > Edit Configurations there, that's probably the same in all JetBrains-based IDEs, I don't know about VS Code.

deakjahn commented 3 years ago

I think I'm on to something. Check out the browser dev tools, Sources tab:

Screenshot 2021-09-12 125944

require.js is there but the main one, sqflite_web.js is missing.

deakjahn commented 3 years ago

Does it run for you now?

Note that I had to modify index.html (it called require.js no matter what). You might need to do it in your own app if you modified it similarly.

masteradit commented 3 years ago

Try adding --verbose to your flutter run command to see if it reports any errors.

I tried doing it after pulling the recent commits. Here are the things I noticed:

Click to see the full `flutter run -v` output ``` flutter run --verbose [ +280 ms] executing: [C:\src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [+1090 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e [ +1 ms] executing: [C:\src\flutter/] git tag --points-at 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e [ +346 ms] Exit code 0 from: git tag --points-at 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e [ ] 2.5.0 [ +13 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +131 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/stable [ ] executing: [C:\src\flutter/] git ls-remote --get-url origin [ +94 ms] Exit code 0 from: git ls-remote --get-url origin [ ] https://github.com/flutter/flutter.git [ +360 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref HEAD [ +142 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ +1 ms] stable [ +132 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +7 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +249 ms] executing: C:\Users\\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l [ +127 ms] List of devices attached [ +30 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ +8 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ +2 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. PS C:\Users\\Documents\Allmity\FlutterApps\allsql> flutter pub get Running "flutter pub get" in allsql... 3.8s PS C:\Users\\Documents\Allmity\FlutterApps\allsql> flutter run -v [ +83 ms] executing: [C:\src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +740 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ +3 ms] 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e [ +1 ms] executing: [C:\src\flutter/] git tag --points-at 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e [ +185 ms] Exit code 0 from: git tag --points-at 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e [ +1 ms] 2.5.0 [ +13 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +73 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ +1 ms] origin/stable [ ] executing: [C:\src\flutter/] git ls-remote --get-url origin [ +113 ms] Exit code 0 from: git ls-remote --get-url origin [ +2 ms] https://github.com/flutter/flutter.git [ +268 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref HEAD [ +151 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ +1 ms] stable [ +116 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +6 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +112 ms] executing: C:\Users\\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l [ +104 ms] List of devices attached [ +7 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ +2 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ +6 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +144 ms] Multiple devices found: [ +90 ms] Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.63 [ +11 ms] Edge (web) • edge • web-javascript • Microsoft Edge 93.0.961.44 [ +10 ms] [1]: Chrome (chrome) [ +5 ms] [2]: Edge (edge) [ +10 ms] Please choose one (To quit, press "q/Q") [ +2 ms] : [+3000 ms] 1 [ +78 ms] Skipping pub get: version match. [ +43 ms] Found plugin sqflite_web at C:\src\flutter\.pub-cache\git\sqflite_web-fa4cddcea69a1c5959e92628ca697894c65fe614\ [ +239 ms] Found plugin sqflite_web at C:\src\flutter\.pub-cache\git\sqflite_web-fa4cddcea69a1c5959e92628ca697894c65fe614\ [ +307 ms] Launching lib\main.dart on Chrome in debug mode... [ +238 ms] Updating assets [ +139 ms] Waiting for connection from debug service on Chrome... [ +26 ms] Found plugin sqflite_web at C:\src\flutter\.pub-cache\git\sqflite_web-fa4cddcea69a1c5959e92628ca697894c65fe614\ [ +34 ms] Found plugin sqflite_web at C:\src\flutter\.pub-cache\git\sqflite_web-fa4cddcea69a1c5959e92628ca697894c65fe614\ [ +186 ms] <- reset [ +18 ms] C:\src\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\src\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\src\flutter\bin\cache\flutter_web_sdk/ --incremental --target=dartdevc --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill PS C:\Users\\Documents\Allmity\FlutterApps\allsql> flutter run -v [ +211 ms] executing: [C:\src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +867 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ +3 ms] 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e [ +3 ms] executing: [C:\src\flutter/] git tag --points-at 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e [ +476 ms] Exit code 0 from: git tag --points-at 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e [ +1 ms] 2.5.0 [ +24 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +156 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ +1 ms] origin/stable [ ] executing: [C:\src\flutter/] git ls-remote --get-url origin [ +87 ms] Exit code 0 from: git ls-remote --get-url origin [ +1 ms] https://github.com/flutter/flutter.git [ +540 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref HEAD [ +65 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] stable [ +110 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +12 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +185 ms] executing: C:\Users\\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l [ +89 ms] List of devices attached [ +5 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ +27 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ +2 ms] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ +2 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ +2 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ +3 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ +2 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ +3 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ +2 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +128 ms] Multiple devices found: [ +43 ms] Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.63 [ +2 ms] Edge (web) • edge • web-javascript • Microsoft Edge 93.0.961.44 [ +3 ms] [1]: Chrome (chrome) [ +1 ms] [2]: Edge (edge) [ +3 ms] Please choose one (To quit, press "q/Q") [ +1 ms] : [+20595 ms] 1 [ +55 ms] Skipping pub get: version match. [ +48 ms] Found plugin sqflite_web at C:\src\flutter\.pub-cache\git\sqflite_web-fa4cddcea69a1c5959e92628ca697894c65fe614\ [ +448 ms] Found plugin sqflite_web at C:\src\flutter\.pub-cache\git\sqflite_web-fa4cddcea69a1c5959e92628ca697894c65fe614\ [ +156 ms] Launching lib\main.dart on Chrome in debug mode... [ +239 ms] Updating assets [ +457 ms] Waiting for connection from debug service on Chrome... [ +12 ms] Found plugin sqflite_web at C:\src\flutter\.pub-cache\git\sqflite_web-fa4cddcea69a1c5959e92628ca697894c65fe614\ [ +126 ms] Found plugin sqflite_web at C:\src\flutter\.pub-cache\git\sqflite_web-fa4cddcea69a1c5959e92628ca697894c65fe614\ [ +400 ms] <- reset [ +10 ms] C:\src\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\src\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\src\flutter\bin\cache\flutter_web_sdk/ --incremental --target=dartdevc --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill C:\Users\\AppData\Local\Temp\flutter_tools.dfebf270\flutter_tool.3405142c\app.dill --libraries-spec file:///C:/src/flutter/bin/cache/flutter_web_sdk/libraries.json --packages C:\Users\\Documents\Allmity\FlutterApps\allsql\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-root C:\Users\\AppData\Local\Temp\flutter_tools.dfebf270\flutter_tools.91c78b2f --filesystem-scheme org-dartlang-app --initialize-from-dill build\b1b715402d823b7fd5c2b68d2edcb2ce.cache.dill.track.dill --platform file:///C:/src/flutter/bin/cache/flutter_web_sdk/kernel/flutter_ddc_sdk_sound.dill --sound-null-safety [ +25 ms] <- compile org-dartlang-app:/web_entrypoint.dart [+39664 ms] Waiting for connection from debug service on Chrome... (completed in 40.2s) [ +1 ms] Synced 26.6MB. [ +1 ms] <- accept [ +1 ms] Caching compiled dill [+1555 ms] [CHROME]: [ +2 ms] [CHROME]:DevTools listening on ws://127.0.0.1:54283/devtools/browser/40539df5-e406-4106-9def-200ebf0c3f6c ``` And it got stuck on the loading screen.
<!> WARNING: Importing 'require.js' from sqlite_web, consider importing it directlty from your html file like this: '<script
           src="assets/packages/sqflite_web/assets/require.js" type="application/javascript"></script>'
Click to see the full `flutter run -v` output ``` flutter run -v [ +115 ms] executing: [C:\src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +682 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ +1 ms] 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e [ +1 ms] executing: [C:\src\flutter/] git tag --points-at 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e [ +311 ms] Exit code 0 from: git tag --points-at 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e [ +1 ms] 2.5.0 [ +18 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +134 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ +1 ms] origin/stable [ +1 ms] executing: [C:\src\flutter/] git ls-remote --get-url origin [ +94 ms] Exit code 0 from: git ls-remote --get-url origin [ +1 ms] https://github.com/flutter/flutter.git [ +165 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref HEAD [ +86 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] stable [ +72 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ +2 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ +8 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ +3 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ +2 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ +2 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +152 ms] executing: C:\Users\\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l [ +148 ms] List of devices attached [ +14 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ +7 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +89 ms] Multiple devices found: [ +89 ms] Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.63 [ +6 ms] Edge (web) • edge • web-javascript • Microsoft Edge 93.0.961.44 [ +8 ms] [1]: Chrome (chrome) [ +2 ms] [2]: Edge (edge) [ +8 ms] Please choose one (To quit, press "q/Q") [ +2 ms] : [+1628 ms] 1 [ +53 ms] Skipping pub get: version match. [ +35 ms] Found plugin sqflite_web at C:\src\flutter\.pub-cache\git\sqflite_web-fa4cddcea69a1c5959e92628ca697894c65fe614\ [ +81 ms] Found plugin sqflite_web at C:\src\flutter\.pub-cache\git\sqflite_web-fa4cddcea69a1c5959e92628ca697894c65fe614\ [ +244 ms] Launching lib\main.dart on Chrome in debug mode... [ +342 ms] Updating assets [ +145 ms] Waiting for connection from debug service on Chrome... [ +19 ms] Found plugin sqflite_web at C:\src\flutter\.pub-cache\git\sqflite_web-fa4cddcea69a1c5959e92628ca697894c65fe614\ [ +34 ms] Found plugin sqflite_web at C:\src\flutter\.pub-cache\git\sqflite_web-fa4cddcea69a1c5959e92628ca697894c65fe614\ [ +150 ms] <- reset [ +12 ms] C:\src\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\src\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\src\flutter\bin\cache\flutter_web_sdk/ --incremental --target=dartdevc --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill C:\Users\\AppData\Local\Temp\flutter_tools.bb9c0573\flutter_tool.7fc0db6e\app.dill --libraries-spec file:///C:/src/flutter/bin/cache/flutter_web_sdk/libraries.json --packages C:\Users\\Documents\Allmity\FlutterApps\allsql\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-root C:\Users\\AppData\Local\Temp\flutter_tools.bb9c0573\flutter_tools.5b38a37e --filesystem-scheme org-dartlang-app --initialize-from-dill build\b1b715402d823b7fd5c2b68d2edcb2ce.cache.dill.track.dill --platform file:///C:/src/flutter/bin/cache/flutter_web_sdk/kernel/flutter_ddc_sdk_sound.dill --sound-null-safety [ +62 ms] <- compile org-dartlang-app:/web_entrypoint.dart [+23080 ms] Waiting for connection from debug service on Chrome... (completed in 23.3s) [ +2 ms] Synced 26.6MB. [ +1 ms] <- accept [ +1 ms] Caching compiled dill [ +842 ms] [CHROME]: [ +1 ms] [CHROME]:DevTools listening on ws://127.0.0.1:56789/devtools/browser/ac23584e-b4b1-4878-bc63-d0f6844a2baa [ +825 ms] DwdsInjector: Received request for entrypoint at http://localhost:55392/main_module.bootstrap.js [ +14 ms] MetadataProvider: Loading debug metadata... [ +40 ms] MetadataProvider: Loaded debug metadata (sound null safety) [ +19 ms] DwdsInjector: Injected debugging metadata for entrypoint at http://localhost:55392/main_module.bootstrap.js [+3718 ms] ChromeProxyService: Initializing expression compiler for main_module.bootstrap.js with sound null safety: true [ +191 ms] DevHandler: Debug service listening on ws://127.0.0.1:52292/BthXkV0u-50=/ws [ +56 ms] This app is linked to the debug service: ws://127.0.0.1:52292/BthXkV0u-50=/ws [ +31 ms] Debug service listening on ws://127.0.0.1:52292/BthXkV0u-50=/ws [ +2 ms] Running with sound null safety [ +12 ms] To hot restart changes while running, press "r" or "R". [ +2 ms] For a more detailed help message, press "h". To quit, press "q". [ +5 ms] An Observatory debugger and profiler on Chrome is available at: http://127.0.0.1:52292/BthXkV0u-50= [ +24 ms] WARNING: Importing 'require.js' from sqlite_web, consider importing it directlty from your html file like this: '' [+1518 ms] Activating Dart DevTools... [+6574 ms] Activating Dart DevTools... (completed in 6.6s) [+1386 ms] The Flutter DevTools debugger and profiler on Chrome is available at: http://127.0.0.1:9102?uri=http://127.0.0.1:52292/BthXkV0u-50= ```
deakjahn commented 3 years ago

That's not the latest one, try to upgrade or download it again. Now it never mentions the require.js in this context. Yes, it should start with the line from index.html removed but the final solution is the latest commit up here.

masteradit commented 3 years ago

Got it! I am not sure why flutter pub get did not automatically get the latest version, but I manually deleted a few lines in pubspec.lock and ran flutter pub get again to get the latest version. It is running in debug mode and shows this warning:

WARNING: Importing 'sqflite_web.js' from sqlite_web, consider importing it directly from your html file like this: '<script src="assets/packages/sqflite_web/assets/sqflite_web.js" type="application/javascript"></script>'
deakjahn commented 3 years ago

Yes, that's normal. It will keep showing this, it's just a suggestion that you can accept or not. It's up to you.

In theory, I'd prefer it to be automatic like this, adding itself, without the need to modify index.html ever. This is how I did it originally, However, a contributor noted that this automatic insertion doesn't play nice with hot restarts (see the discussion in https://github.com/deakjahn/sqflite_web/pull/13) and that's why the warning was added.

Actually, now that I checked, it was that PR that introduced require.js to be present in index.html. Well, it seems that it had been working that way until now, maybe the newer Flutter 2.5 broke it? Anyway, now I removed that from the README as well, just to be sure. You might add sqflite_web.js manually but you definitely don't want to add require.js any more.

masteradit commented 3 years ago

Cool! The discussion looks a bit more technical than what I can understand right now, so I will check it out later 😅

Thanks a lot for fixing both the issues I created!