Skip to content

Cannot run template workspace with option fullstack using dx new #4230

@Arpadzein

Description

@Arpadzein

Problem

dx new with template workspace with option fullstack creates a broken project on the latest commit in main (at the time of writing commit e1bd06bda568753fe180746c0ab137b99e2c38c4)

Steps To Reproduce

  • I build dioxus-cli from source in release mode (cargo build -p dioxus-cli --release)
  • I run the cli to create a new project (./dioxus/target/release/dx new dioxus_dx_test)
  • I select "Workspace", true, true (3rd option seem have no effect on result)
  • I try to run the project (cd dioxus_dx_test; ../dioxus/target/release/dx serve --package web --platform web)

-> It compiles fine
-> but when I open localhost:8080 in any browser, I get a console error (see in logs section)

Additional Information/Context

I have not tested on every dx new template, but every other template i tested seemed to work fine. workspace with fullstack: false works as far as I can tell, as well as jumpstart with fullstack: true

Logs

Terminal :

15:26:27 [dev] Build completed successfully in 60986ms, launching app! 💫
15:27:23 [dev] Tracing is now on
15:27:23 [dev] Verbose logging is now on
15:27:26 [dev] New devtool websocket connection: Query(ConnectionQuery { aslr_reference: None, build_id: Some(BuildId(0)), pid: None })

Chromium :

inline2.js:3 Uncaught InvalidCharacterError: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
    at get_initial_hydration_data (inline2.js:3:37)
    at web_bg.wasm:0x150cfe
    at web_bg.wasm:0x18d00
    at web_bg.wasm:0xbeddb
    at web_bg.wasm:0x13a6aa
    at web_bg.wasm:0x14ea2a
    at web_bg.wasm:0x1509cc
    at __wbg_adapter_72 (web.js:351:10)
    at real (web.js:199:20)
get_initial_hydration_data @ inline2.js:3
$func3928 @ web_bg.wasm:0x150cfe
$func346 @ web_bg.wasm:0x18d00
$func902 @ web_bg.wasm:0xbeddb
$func2510 @ web_bg.wasm:0x13a6aa
$func3587 @ web_bg.wasm:0x14ea2a
$closure1303_externref_shim @ web_bg.wasm:0x1509cc
__wbg_adapter_72 @ web.js:351
real @ web.js:199
setTimeout
(anonymous) @ web.js:1768
handleError @ web.js:123
imports.wbg.__wbg_setTimeout_db2dbaeefb6f39c7 @ web.js:1767
$func3718 @ web_bg.wasm:0x14f9a9
$func2294 @ web_bg.wasm:0x132107
$func346 @ web_bg.wasm:0x18c1b
$func902 @ web_bg.wasm:0xbeddb
$func2510 @ web_bg.wasm:0x13a6aa
$func3587 @ web_bg.wasm:0x14ea2a
$closure1303_externref_shim @ web_bg.wasm:0x1509cc
__wbg_adapter_72 @ web.js:351
real @ web.js:199

Firefox

Uncaught DOMException: String contains an invalid character
    get_initial_hydration_data http://localhost:8080/wasm/snippets/dioxus-web-229105a5e9fb929e/inline2.js:3
    __wbg_adapter_72 http://localhost:8080/wasm/web.js:351
    real http://localhost:8080/wasm/web.js:199
    __wbg_queueMicrotask_97d92b4fcc8a61c5 http://localhost:8080/wasm/web.js:1611
    logError http://localhost:8080/wasm/web.js:92
    __wbg_queueMicrotask_97d92b4fcc8a61c5 http://localhost:8080/wasm/web.js:1610
    __wbg_adapter_69 http://localhost:8080/wasm/web.js:345
    real http://localhost:8080/wasm/web.js:199
    setTimeout handler*__wbg_get_imports/imports.wbg.__wbg_setTimeout_db2dbaeefb6f39c7/< http://localhost:8080/wasm/web.js:1768
    handleError http://localhost:8080/wasm/web.js:123
    __wbg_setTimeout_db2dbaeefb6f39c7 http://localhost:8080/wasm/web.js:1767
    __wbg_adapter_72 http://localhost:8080/wasm/web.js:351
    real http://localhost:8080/wasm/web.js:199
    __wbg_queueMicrotask_97d92b4fcc8a61c5 http://localhost:8080/wasm/web.js:1611
    logError http://localhost:8080/wasm/web.js:92
    __wbg_queueMicrotask_97d92b4fcc8a61c5 http://localhost:8080/wasm/web.js:1610
    __wbg_finalize_init http://localhost:8080/wasm/web.js:2237
    __wbg_init http://localhost:8080/wasm/web.js:2291
    async* http://localhost:8080/:191
    promise callback* http://localhost:8080/:185
inline2.js:3

Expected behavior

dx new should produce runnable projects

Environment:

  • Dioxus version: main (at the time of writing, commit e1bd06bda568753fe180746c0ab137b99e2c38c4
  • Rust version: nighthly
  • OS info: Arcolinux, kernel 6.14.7-zen2-1-zen
  • App platform: web

Questionnaire

I'm interested in fixing this myself but don't know where to start.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcliRelated to the dioxus-cli program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions