jaspr icon indicating copy to clipboard operation
jaspr copied to clipboard

fix: Report [Sever] [Error] when reloading server app using TailwindCSS

Open EMUNES opened this issue 4 months ago • 2 comments

Description

If editing tailwindcss classes and then reload the web page, it will report [SERVER] [ERROR] when reloading web pages.

The reloading result will be shown normally at the end, but the error will always be reported.

Steps To Reproduce

  1. Run jaspr serve in a jaspr + tailwindcss project.
  2. Modify some tailwindcss class names.
  3. Server Error reported.
  4. Result is shown normally though.

Doctor Output

[✓] Jaspr CLI (Version 0.21.7)
  • Dart Version 3.10.0 (stable) (Thu Nov 6 05:24:55 2025 -0800) on "windows_x64" at C:\src\flutter\bin\cache\dart-sdk\bin\dart.exe
  • Running on windows "Windows 11 Family Version" 10.0 (Build 26200)
  • Analytics: Enabled
[✓] Current Project
  • Dependencies on core packages:
    • jaspr: ^0.21.7
    • jaspr_builder: ^0.21.7 (dev)
    • jaspr_web_compilers: ^4.3.2+1 (dev)
    • jaspr_flutter_embed: ^0.4.9
    • jaspr_router: ^0.8.0
    • jaspr_tailwind: ^0.3.4 (dev)
  • Rendering mode: static
  • Uses jaspr compilers: true
  • Uses flutter embedding: true

Expected Behavior

If the result is reloaded correctly, no error should be reported.

Additional Context

Windows 11 Jaspr version: 0.21.7 Dart version: 3.10 TailwindCSS version: v4.1.17

Error messages:

✓ [CLI] Rebuilt web assets. (17.5s)
[SERVER] Hello server
[SERVER] [INFO] Server application reloaded.
[SERVER] [ERROR] ERROR - 2025-11-19 17:23:32.008958
[SERVER] [ERROR] GET /styles.css
[SERVER] [ERROR] Error thrown by handler.
[SERVER] [ERROR] ClientException: Connection closed before full header was received, uri=http://localhost:5567/styles.css
[SERVER] [ERROR] package:shelf/shelf_io.dart 140:16  handleRequest
[SERVER] [INFO] Server application reloaded.
[SERVER] [INFO] Server application reloaded.

or

[SERVER] Hello server
[SERVER] [INFO] Server application reloaded.
[SERVER] [ERROR] ERROR - 2025-11-19 17:29:57.060100
[SERVER] [ERROR] GET /main.clients.dart.js
[SERVER] [ERROR] Error thrown by handler.
[SERVER] [ERROR] ClientException: Connection closed before full header was received, uri=http://localhost:5567/main.clients.dart.js
[SERVER] [ERROR] package:shelf/shelf_io.dart 140:16  handleRequest
[SERVER] [INFO] Server application reloaded.
[SERVER] [INFO] Server application reloaded.

EMUNES avatar Nov 19 '25 09:11 EMUNES

✓ [CLI] Rebuilt web assets. (17.5s) [SERVER] Hello server [SERVER] [INFO] Server application reloaded. [SERVER] [ERROR] ERROR - 2025-11-19 17:23:32.008958 [SERVER] [ERROR] GET /styles.css [SERVER] [ERROR] Error thrown by handler. [SERVER] [ERROR] ClientException: Connection closed before full header was received, uri=http://localhost:5567/styles.css [SERVER] [ERROR] package:shelf/shelf_io.dart 140:16 handleRequest [SERVER] [INFO] Server application reloaded. [SERVER] [INFO] Server application reloaded.

skr874630-lang avatar Nov 22 '25 12:11 skr874630-lang

I cannot reproduce this.

Please run with jaspr serve --verbose and see if there are any other errors reported. Also try updating build_runner to ^2.10.2 to see if that fixes the issue.

schultek avatar Nov 27 '25 12:11 schultek

Closing as more info needed

schultek avatar Jan 08 '26 11:01 schultek