Open ltfschoen opened 8 months ago
i guess the latest frontend version can be found here - https://github.com/ImpulseDAO/Vara-Arena/tree/update-frontend @Rrock-k correct me if i'm wrong
https://github.com/ImpulseDAO/Vara-Arena/tree/update-frontend
when i switch to that branch from the 'master' branch with
git fetch upstream update-frontend:update-frontend
git checkout update-frontend
and then try building it with
cargo build --release
it gives the following error because for some reason it doesn't remove the contracts/mage subdirectory and its .binpath file that doesn't exist in that 'update-frontend' branch, but does in the 'master' branch
error: failed to load manifest for workspace member `/Users/me/code/clones/github/clawbird/Vara-Arena/contracts/mage`
Caused by:
failed to read `/Users/me/code/clones/github/clawbird/Vara-Arena/contracts/mage/Cargo.toml`
so i manually have to delete that folder. but when i run the following again
cargo build --release
this test fails
running 1 test
[gear_core_processor::precharge game] Charged for module instantiation and memory pages. Size: WasmPage(17)
[gear_core_processor::executor game] Executing program 0x0100000000000000000000000000000000000000000000000000000000000000
[gear_core_processor::executor game] Executing dispatch IncomingDispatch { kind: Init, message: IncomingMessage { id: 0x17428dfca88d1c82958b337f06033a4b1a76f6b3ca95397b829d4165aff54747, source: 0x0a00000000000000000000000000000000000000000000000000000000000000, payload: 0x0500c817a8040000..0000000000000000, gas_limit: 18446744073709551615, value: 0, details: None }, context: None }
[gear_lazy_pages::signal game] Interrupted, exception info = ExceptionInfo { fault_addr: 0x2800ffe0c, is_write: Some(true) }
[gear_lazy_pages::signal game] Interrupted, exception info = ExceptionInfo { fault_addr: 0x2801023e8, is_write: Some(false) }
[gear_lazy_pages::signal game] Interrupted, exception info = ExceptionInfo { fault_addr: 0x280102a50, is_write: Some(true) }
[gear_lazy_pages::signal game] Interrupted, exception info = ExceptionInfo { fault_addr: 0x28010fff0, is_write: Some(true) }
[DEBUG game] [handle(0x1742..4747)] 0x0100..0000: panic occurred: 'Unable to decode Config: Decode(Error)', /Users/me/code/clones/github/clawbird/Vara-Arena/contracts/mint/src/lib.rs:394:38
[gear_core_processor::executor game] Termination reason: Trap(Panic(LimitedStr("'Unable to decode Config: Decode(Error)', /Users/me/code/clones/github/clawbird/Vara-Arena/contracts/mint/src/lib.rs:394:38")))
[gear_core_processor::executor game] 💥 Trap during execution of 0x0100000000000000000000000000000000000000000000000000000000000000
📔 Explanation: 'Unable to decode Config: Decode(Error)', /Users/luke/code/clones/github/clawbird/Vara-Arena/contracts/mint/src/lib.rs:394:38
[gtest::manager game] [0x17428dfca88d1c82958b337f06033a4b1a76f6b3ca95397b829d4165aff54747] new dispatch#0x970ef07ce1374aab40c55786969471552ccf2970fb4e4bffc7871cd86a05ff8c
[gtest::manager game] [0xfd339dfec3fdf440a0647b6e4a17004db833dc2c88b7f75238add1f3fc7b2eb7] new dispatch#0x749fd81738363e1546241b3549f3dd1727e813a26e8751b261a112fd8e7b02b6
[gear_core_processor::precharge game] Charged for module instantiation and memory pages. Size: WasmPage(17)
[gear_core_processor::executor game] Executing program 0x0200000000000000000000000000000000000000000000000000000000000000
[gear_core_processor::executor game] Executing dispatch IncomingDispatch { kind: Init, message: IncomingMessage { id: 0xa237eadaf3baaa3a78972156abb390b79c1b753bc04999dd7ae7c7f95dc4c6bd, source: 0x0a00000000000000000000000000000000000000000000000000000000000000, payload: 0x0100000000000000..0000000000000000, gas_limit: 18446744073709551615, value: 0, details: None }, context: None }
[gear_lazy_pages::signal game] Interrupted, exception info = ExceptionInfo { fault_addr: 0x2800fff8c, is_write: Some(true) }
[gear_lazy_pages::signal game] Interrupted, exception info = ExceptionInfo { fault_addr: 0x280103008, is_write: Some(false) }
[gear_lazy_pages::signal game] Interrupted, exception info = ExceptionInfo { fault_addr: 0x280103008, is_write: Some(true) }
[gear_core_processor::executor game] Termination reason: Success
[gtest::manager game] [0xa237eadaf3baaa3a78972156abb390b79c1b753bc04999dd7ae7c7f95dc4c6bd] new dispatch#0x824bf5e164d166b9133a5a8786958108ef3f89e0f7685cd9685cca07d7ea19bc
test game ... FAILED
failures:
---- game stdout ----
thread 'game' panicked at /Users/me/.cargo/git/checkouts/gear-bdc2b7d48ef3acbd/d02d306/gtest/src/system.rs:156:55:
Failed to read file "/Users/me/code/clones/github/clawbird/Vara-Arena/target/wasm32-unknown-unknown/release/fire_mage.wasm"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
game
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.14s
is that expected?
i guess the latest frontend version can be found here - https://github.com/ImpulseDAO/Vara-Arena/tree/update-frontend @Rrock-k correct me if i'm wrong
also when i switch to the 'update-frontend' branch, i noticed a potential discrepency...
in the indexer/.env file, it includes RPC_ENDPOINT=wss://testnet-archive.vara.network
but in the frontend/src/_env.example file, it includes REACT_APP_NODE_ADDRESS=wss://testnet.vara.network
note how one of them uses subdomain testnet-archive
but the other uses just testnet
is that intentional?
why is a different endpoint used for the frontend and the indexer?
when i switch to the 'update-frontend' branch, and go into the frontend folder when i run
cp _env.example .env
source .env
npm i
npm run predeploy
npm run dev
it outputs the following
and it automatically opens this link in my browser http://localhost:3000/Vara-Arena
but no other logs appear, and nothing loads in the browser, it just returns ERR_CONNECTION_TIMED_OUT
i know it must be running on port 3000, because if i try to run a duplicate frontend it says that port is in use, and when i kill that port with kill -9 $(lsof -ti:3000)
and restart it that port is in use again
when i switch to the 'update-frontend' branch, and go into the frontend folder when i run
cp _env.example .env source .env npm i npm run predeploy npm run dev
it outputs the following
click here to expand and view the terminal log and it automatically opens this link in my browser http://localhost:3000/Vara-Arena
but no other logs appear, and nothing loads in the browser, it just returns
ERR_CONNECTION_TIMED_OUT
i know it must be running on port 3000, because if i try to run a duplicate frontend it says that port is in use, and when i kill that port with
kill -9 $(lsof -ti:3000)
and restart it that port is in use again
so i realised i was likely using the wrong script commands in development environment, i changed to using the following instead:
cd frontend
rm -rf build/
npm i
npm run prebuild
npm run build
npm run dev
that outputs similar in the terminal, but now it also says:
...
[1] Local: http://localhost:3000/Vara-Arena
[1] On Your Network: http://X.X.X.X:3000/Vara-Arena
...
[1] webpack compiled successfully
[1] No issues found.
where X.X.X.X is my public IP address
it automatically opens http://localhost:3000/Vara-Arena, but that timed out, but if i go to http://X.X.X.X:3000/Vara-Arena, then it appears to start loading, but in the browser console logs it says
bootstrap:27 Uncaught Error: REACT_APP_IS_TESTNET env variable is not set
at ./src/consts.ts (consts.ts:3:1)
at options.factory (react refresh:6:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:62:1)
at ./src/utils/index.ts (index.ts:2:1)
at options.factory (react refresh:6:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:62:1)
at ./src/components/accounts/Accounts.tsx (index.ts:3:1)
at options.factory (react refresh:6:1)
the reason for that error is because in the _env.example file here https://github.com/ImpulseDAO/Vara-Arena/blob/update-frontend/frontend/_env.example#L2 it has IS_TESTNET=true
instead of REACT_APP_IS_TESTNET=true
,
so if i change that, and run
cp _env.example .env
source .env
and then run the following again:
npm i
npm run prebuild
npm run build
npm run dev
and then go to http://X.X.X.X:3000/Vara-Arena, it successfully runs the game 💯
but i'm still not sure why it only loads the game using my public IP address at http://X.X.X.X:3000/Vara-Arena but doesn't load the game at http://localhost:3000/Vara-Arena
should we close the issue?
If I fork the latest 'master' branch commit 94565c96e096a65ebdd6bfa28917c85b4132c2ca that was released on 21 Jan 2024, a day after the announcement of the updated testnet version for Vara Arena testing purposes and follow these steps in order to run it locally, when i get up to the final step shown here of running the frontend with the following:
it outputs the following error:
is the version that is being used in the updated testnet version for testing that was published at https://impulsedao.github.io/Vara-Arena/ on the 20th Jan 2024 for the testnet league live for 7 days from one of the commits in the 'master' branch? if so which commit?
i even went to Deployments at https://github.com/ImpulseDAO/Vara-Arena/deployments where the latest was https://github.com/ImpulseDAO/Vara-Arena/deployments/Production and tried checking out the 'deploy-to-vercel' branch, and running that resulted in the same error as above.
what else could be causing the error?