Closed SamHjelmfelt closed 3 months ago
I tested with static and client side modes and received the same errors: Static mode:
Select a rendering mode:
❯ ◉ static: Build a statically pre-rendered site.
◯ server: Build a server-rendered site.
Select a rendering mode:ely client-rendered site.
◯ static: Build a statically pre-rendered site.
❯ ◉ server: Build a server-rendered site.
Select a rendering mode:ely client-rendered site.
❯ ◉ static: Build a statically pre-rendered site.
◯ server: Build a server-rendered site.
Select a rendering mode: static: Build a statically pre-rendered site.
(Recommended) Enable automatic hydration on the client? (Y/n) Yes
Setup routing for different pages of your site? (Y/n) Yes
(Recommended) Use multi-page (server-side) routing? Choosing [no] sets up a single-page application with client-side routing instead. (Y/(Recommended) Use multi-page (server-side) routing? Choosing [no] sets up a single-page application with client-side routing instead. (Y/n) Yes
Setup Flutter web embedding? (y/N) No
Enable support for using Flutter web plugins in your project? (Y/n) Yes
✓ Generated 25 file(s) (0.1s)
✓ [CLI] (11.1s)
[CLI] Created project jaspr_site! In order to get started, run the following commands:
[CLI]
[CLI] cd jaspr_site
[CLI] jaspr serve
[CLI] Running jaspr in static rendering mode.
[CLI] Starting web compiler...
[BUILDER] Connecting to the build daemon...
[BUILDER] Generating build script...
[BUILDER] Generating build script completed, took 222ms
[BUILDER] Precompiling build script......
[BUILDER] Precompiling build script... completed, took 3.2s
[BUILDER] Starting daemon...
[BUILDER] Initializing inputs
[BUILDER] Building new asset graph...
[BUILDER] Building new asset graph completed, took 973ms
[BUILDER] Checking for unexpected pre-existing outputs....
[BUILDER] Deleting 1 declared outputs which already existed on disk.
[BUILDER] Checking for unexpected pre-existing outputs. completed, took 1ms
[BUILDER] Initializing inputs
[BUILDER] Building new asset graph...
[BUILDER] Building new asset graph completed, took 973ms
[BUILDER] Checking for unexpected pre-existing outputs....
[BUILDER] Deleting 1 declared outputs which already existed on disk.
[BUILDER] Checking for unexpected pre-existing outputs. completed, took 1ms
[BUILDER] Setting up file watchers...
[BUILDER] Setting up file watchers completed, took 1ms
[BUILDER] Registering build targets...
[BUILDER] Starting initial build...
[BUILDER] Starting resource servers...
[BUILDER] About to build [web]...
[BUILDER] Running build...
[CLI] Building web assets...
[BUILDER] Generating SDK summary...
[BUILDER] 1.4s elapsed, 14/16 actions completed.
[BUILDER] [WARNing] Your current analyzer
version may not fully support your current SDK version.
[BUILDER] [WARNing]
[BUILDER] [WARNing] Analyzer language version: 3.1.0
[BUILDER] [WARNing] SDK language version: 3.3.0
[BUILDER] [WARNing]
[BUILDER] [WARNing] Please update to the latest analyzer
version (6.4.1) by running
[BUILDER] [WARNing] flutter packages upgrade
.
[BUILDER] [WARNing]
[BUILDER] [WARNing] If you are not getting the latest version by running the above command, you
[BUILDER] [WARNing] can try adding a constraint like the following to your pubspec to start
[BUILDER] [WARNing] diagnosing why you can't get the latest version:
[BUILDER] [WARNing]
[BUILDER] [WARNing] dev_dependencies:
[BUILDER] [WARNing] analyzer: ^6.4.1
[BUILDER] 2.8s elapsed, 14/16 actions completed.
[BUILDER] Generating SDK summary completed, took 3.0s
[BUILDER] 4.7s elapsed, 43/44 actions completed.
[BUILDER] 5.8s elapsed, 624/642 actions completed.
[BUILDER] 6.9s elapsed, 631/654 actions completed.
[BUILDER] 8.0s elapsed, 648/654 actions completed.
[BUILDER] Running build completed, took 8.2s
[BUILDER] Caching finalized dependency graph...
[BUILDER] Caching finalized dependency graph completed, took 119ms
[BUILDER] Succeeded after 8.3s with 658 outputs (3341 actions)
[BUILDER] ---------------------------------------------------------------------------------------------------------------------------------
[CLI] Done building web assets.
[CLI] Starting server...
[CLI] Server started.
[SERVER] The Dart VM service is listening on http://127.0.0.1:8181/LES4jDyhbaE=/
[SERVER] The Dart DevTools debugger and profiler is available at: http://127.0.0.1:8181/LES4jDyhbaE=/devtools?uri=ws://127.0.0.1:8181/LES4jDyhbaE=/ws
[SERVER] [INFO] Server hot reload is enabled.
[SERVER] [INFO] Running server in debug mode
[SERVER] Serving at http://localhost:8080
[SERVER] [ERROR] ERROR - 2024-04-06 17:24:35.258678
[SERVER] [ERROR] GET /@http://localhost:8080/pages/home.client.dart.bootstrap.js
[SERVER] [ERROR] Error thrown by handler.
[SERVER] [ERROR] FormatException: Scheme not starting with alphabetic character (at character 1)
[SERVER] [ERROR] @http://localhost:8080/pages/home.client.dart.bootstrap.js
[SERVER] [ERROR] ^
[SERVER] [ERROR] dart:core _SimpleUri.resolve
[SERVER] [ERROR] package:shelf_proxy/shelf_proxy.dart 42:28 proxyHandler.
Client side:
Select a rendering mode: ❯ ◉ static: Build a statically pre-rendered site. ◯ server: Build a server-rendered site. Select a rendering mode:ely client-rendered site. ◯ static: Build a statically pre-rendered site. ❯ ◉ server: Build a server-rendered site. Select a rendering mode:ely client-rendered site. ◯ static: Build a statically pre-rendered site. ◯ server: Build a server-rendered site. Select a rendering mode: client: Build a purely client-rendered site. Setup routing for different pages of your site? (Y/n) Yes Setup Flutter web embedding? (y/N) No Enable support for using Flutter web plugins in your project? (Y/n) Yes ✓ Generated 25 file(s) (0.1s) ✓ [CLI] (11.1s) [CLI] Created project jaspr_site! In order to get started, run the following commands: [CLI] [CLI] cd jaspr_site [CLI] jaspr serve
[CLI] Running jaspr in client rendering mode. [CLI] Starting web compiler... [BUILDER] Connecting to the build daemon... [BUILDER] Generating build script... [BUILDER] Generating build script completed, took 198ms [BUILDER] Precompiling build script...... [BUILDER] Precompiling build script... completed, took 3.1s [BUILDER] Starting daemon... [BUILDER] Initializing inputs [BUILDER] Building new asset graph... [BUILDER] Building new asset graph completed, took 990ms [BUILDER] Checking for unexpected pre-existing outputs.... [BUILDER] Checking for unexpected pre-existing outputs. completed, took 0ms [BUILDER] Initializing inputs [BUILDER] Building new asset graph... [BUILDER] Building new asset graph completed, took 990ms [BUILDER] Checking for unexpected pre-existing outputs.... [BUILDER] Checking for unexpected pre-existing outputs. completed, took 0ms [BUILDER] Setting up file watchers... [BUILDER] Setting up file watchers completed, took 1ms [BUILDER] Registering build targets... [BUILDER] Starting initial build... [BUILDER] Starting resource servers... [BUILDER] About to build [web]... [BUILDER] Running build... [CLI] Building web assets... [BUILDER] 1.0s elapsed, 327/335 actions completed. [BUILDER] 2.1s elapsed, 585/611 actions completed. [BUILDER] 3.1s elapsed, 598/611 actions completed. [BUILDER] Running build completed, took 3.7s [BUILDER] Caching finalized dependency graph... [BUILDER] Caching finalized dependency graph completed, took 129ms [BUILDER] Succeeded after 3.8s with 603 outputs (3251 actions) [BUILDER] --------------------------------------------------------------------------------------------------------------------------------- [CLI] Done building web assets. [CLI] Serving at http://localhost:8080 ERROR - 2024-04-06 17:25:56.013143 GET /@http://localhost:8080/pages/home.client.dart.bootstrap.js Error thrown by handler. FormatException: Scheme not starting with alphabetic character (at character 1) @http://localhost:8080/pages/home.client.dart.bootstrap.js ^
dart:core _SimpleUri.resolve
package:shelf_proxy/shelf_proxy.dart 42:28 proxyHandler.
@SamHjelmfelt I think this is a duplicate of #58 (also #186)
Are you trying to open the development server in Safari? If so, try Chrome - it should work.
Yes, I was on Safari. I will try Chrome in a few hours.
Closing this as a duplicate for now. If you are still having the same issue on chrome please reopen.
Description Quickstart fails to produce a working app. The stateful Counter component does not work. From a UI perspective, the buttons do nothing. Logs are below.
Steps To Reproduce
jaspr create jaspr_site Select a rendering mode: ❯ ◉ static: Build a statically pre-rendered site. ◯ server: Build a server-rendered site. Select a rendering mode:ely client-rendered site. ◯ static: Build a statically pre-rendered site. ❯ ◉ server: Build a server-rendered site. Select a rendering mode: server: Build a server-rendered site. (Recommended) Enable automatic hydration on the client? (Y/n) Yes Setup routing for different pages of your site? (Y/n) Yes (Recommended) Use multi-page (server-side) routing? Choosing [no] sets up a single-page application with client-side routing instead. (Y/(Recommended) Use multi-page (server-side) routing? Choosing [no] sets up a single-page application with client-side routing instead. (Y/n) Yes Setup Flutter web embedding? (y/N) No Enable support for using Flutter web plugins in your project? (Y/n) Yes Use a custom backend package or framework for the server part of your project? (y/N) Yes Select a backend framework: ❯ ◉ Shelf: An official and well-supported minimal server package by the Dart Team. Select a backend framework: Shelf: An official and well-supported minimal server package by the Dart Team. ✓ Generated 25 file(s) (0.1s) ✓ [CLI] (11.0s) [CLI] Created project jaspr_site! In order to get started, run the following commands: [CLI] [CLI] cd jaspr_site [CLI] jaspr serve
Output: [CLI] Running jaspr in server rendering mode. ✓ [CLI] Done building web assets. (17.1s) ✓ [CLI] Server started. (7ms) [SERVER] The Dart VM service is listening on http://127.0.0.1:8181/4zdni6ksIJU=/ [SERVER] The Dart DevTools debugger and profiler is available at: http://127.0.0.1:8181/4zdni6ksIJU=/devtools?uri=ws://127.0.0.1:8181/4zdni6ksIJU=/ws [SERVER] [INFO] Server hot reload is enabled. [SERVER] Serving at http://0.0.0.0:8080 [SERVER] Request uri is http://localhost:8080/ () [SERVER] 2024-04-06T15:59:38.865354 0:00:00.088215 GET [200] / [SERVER] 2024-04-06T15:59:38.962154 0:00:00.009665 GET [200] /pages/home.client.dart.js [SERVER] 2024-04-06T15:59:38.975345 0:00:00.006295 GET [304] /packages/jaspr_web_compilers/src/dev_compiler/require.js [SERVER] 2024-04-06T15:59:38.976436 0:00:00.018628 GET [304] /packages/jaspr_web_compilers/src/dev_compiler_stack_trace/stack_trace_mapper.dart.js [SERVER] [ERROR] 2024-04-06 15:59:39.011284 0:00:00.001212 GET /@http://localhost:8080/pages/home.client.dart.bootstrap.js [SERVER] FormatException: Scheme not starting with alphabetic character (at character 1) [SERVER] @http://localhost:8080/pages/home.client.dart.bootstrap.js [SERVER] ^ [SERVER] [SERVER] dart:core _SimpleUri.resolve [SERVER] package:shelf_proxy/shelf_proxy.dart 42:28 proxyHandler.
[SERVER] package:shelf_gzip/src/gzip_encoding.dart 51:44 createGzipMiddleware...
[SERVER] dart:async new Future.sync
[SERVER] package:shelf_gzip/src/gzip_encoding.dart 51:21 createGzipMiddleware..
[SERVER]
[SERVER] [ERROR] ERROR - 2024-04-06 15:59:39.021579
[SERVER] [ERROR] GET /@http://localhost:8080/pages/home.client.dart.bootstrap.js
[SERVER] [ERROR] Error thrown by handler.
[SERVER] [ERROR] FormatException: Scheme not starting with alphabetic character (at character 1)
[SERVER] [ERROR] @http://localhost:8080/pages/home.client.dart.bootstrap.js
[SERVER] [ERROR] ^
[SERVER] [ERROR]
[SERVER] [ERROR] dart:core _SimpleUri.resolve
[SERVER] [ERROR] package:shelf_proxy/shelf_proxy.dart 42:28 proxyHandler.
[SERVER] [ERROR] package:shelf_gzip/src/gzip_encoding.dart 51:44 createGzipMiddleware...
[SERVER] [ERROR] dart:async new Future.sync
[SERVER] [ERROR] package:shelf_gzip/src/gzip_encoding.dart 51:21 createGzipMiddleware..
Expected Behavior
Counter should update in the UI.
Additional Context