EnormousCloud / api3-dao-tracker

API3 DAO Tracker
https://enormous.cloud/dao/api3/tracker/
MIT License
3 stars 1 forks source link

How to build it ? #3

Open ttytm opened 3 years ago

ttytm commented 3 years ago

can you give a short explanation on how I can build it on my local machine so I can fiddle around with it a bit for learning? I have some changes in mind I want to try out for myself before proposing something.

I checked the files and know what changes would be needed, but how can I run it then? Probably that's a pretty stupid question but yeah... hope you can help^^

Best regards

EnormousCloud commented 3 years ago

ok, I've tried to add it in the README: https://github.com/EnormousCloud/api3-dao-tracker/blob/main/README.md#running-locally

Please let me know if you succeeded with these instructions.

If you need to add just visual changes to the pages, please let me know, there is a different way to debug locally which doesn't require hours / days of waiting for the sync.

ttytm commented 3 years ago

Oh wow nice! Thanks so much for the help. It will definitely help - I wanted to work on this next week :)

If you need to add just visual changes to the pages, please let me know, there is a different way to debug locally which doesn't require hours / days of waiting for the sync.

Yes that's what I would want to focus on. So it would be nice to know the preferred way of debugging.

Kind regards

EnormousCloud commented 3 years ago

well.. for the client side and purely visual changes - there is another way of debugging with faster iteration and without the need for a running server with blockchain interaction.

There are 2 extra things that you will need:

ttytm commented 3 years ago

after installing the dependencies I'm not able to build. Can you tell me from the output where I'm doing a mistake?

trunk build
Aug 20 15:52:21.511  INFO 📦 starting build
Aug 20 15:52:21.512  INFO spawning asset pipelines
Aug 20 15:52:21.595  INFO copying & hashing css path="src/assets/style.css"
Aug 20 15:52:21.595  INFO building client
Aug 20 15:52:21.595  INFO finished copying & hashing css path="src/assets/style.css"
Compiling cfg-if v1.0.0
Compiling itoa v0.4.7
Compiling autocfg v1.0.1
Compiling futures-core v0.3.16
Compiling radium v0.6.2
Compiling crunchy v0.2.2
Compiling futures-channel v0.3.16
Compiling rustc-hex v2.1.0
Compiling futures-sink v0.3.16
Compiling ppv-lite86 v0.2.10
Compiling version_check v0.9.3
Compiling typenum v1.13.0
Compiling proc-macro-hack v0.5.19
Compiling doc-comment v0.3.3
Compiling memchr v2.4.1
Compiling tap v1.0.1
Compiling futures-task v0.3.16
Compiling static_assertions v1.1.0
Compiling funty v1.1.0
Compiling bytes v1.0.1
Compiling byteorder v1.4.3
Compiling wyz v0.2.0
Compiling proc-macro-nested v0.1.7
Compiling byte-slice-cast v1.0.0
Compiling arrayvec v0.7.1
Compiling tiny-keccak v2.0.2
Compiling pin-utils v0.1.0
Compiling slab v0.4.4
Compiling hex v0.4.3
Compiling pin-project-lite v0.2.7
Compiling futures-io v0.3.16
Compiling once_cell v1.8.0
Compiling block-padding v0.2.1
Compiling anyhow v1.0.43
Compiling json v0.12.4
Compiling libc v0.2.99
Compiling opaque-debug v0.3.0
Compiling scopeguard v1.1.0
Compiling keccak v0.1.0
Compiling cfg-if v0.1.10
Compiling smallvec v1.6.1
Compiling convert_case v0.4.0
Compiling send_wrapper v0.4.0
Compiling arrayvec v0.5.2
Compiling hex-literal v0.3.3
Compiling proc-macro2 v1.0.28
Compiling syn v1.0.74
Compiling serde_derive v1.0.127
Compiling log v0.4.14
Compiling wasm-bindgen-shared v0.2.76
Compiling serde v1.0.127
Compiling ryu v1.0.5
Compiling serde_json v1.0.66
Compiling wasm-bindgen v0.2.76
Compiling instant v0.1.10
Compiling generic-array v0.14.4
Compiling futures-macro v0.3.16
Compiling futures-util v0.3.16
Compiling num-traits v0.2.14
Compiling num-integer v0.1.44
Compiling rlp v0.5.1
Compiling lock_api v0.4.4
Compiling parking_lot_core v0.8.3
Compiling impl-rlp v0.3.0
Compiling jss v0.3.2
Compiling mt-dom v0.10.0
Compiling uint v0.9.1
Compiling quote v1.0.9
Compiling bitvec v0.20.4
Compiling parking_lot v0.11.1
Compiling time v0.1.43
Compiling digest v0.9.0
Compiling block-buffer v0.9.0
Compiling sha3 v0.9.1
Compiling wasm-bindgen-backend v0.2.76
Compiling syn-rsx v0.8.0
Compiling wasm-bindgen-macro-support v0.2.76
Compiling thiserror-impl v1.0.26
Compiling impl-trait-for-tuples v0.2.1
Compiling pin-project-internal v1.0.8
Compiling derive_more v0.99.16
Compiling wasm-bindgen-macro v0.2.76
Compiling thiserror v1.0.26
Compiling pin-project v1.0.8
Compiling futures-executor v0.3.16
Compiling futures v0.3.16
Compiling impl-serde v0.3.1
Compiling toml v0.5.8
Compiling jsonrpc-core v17.1.0
Compiling proc-macro-crate v1.0.0
Compiling js-sys v0.3.53
Compiling console_error_panic_hook v0.1.6
Compiling parity-scale-codec-derive v2.2.0
Compiling parity-scale-codec v2.2.0
Compiling getrandom v0.2.3
Compiling web-sys v0.3.53
Compiling wasm-bindgen-futures v0.4.26
Compiling chrono v0.4.19
Compiling rand_core v0.6.3
Compiling rand_chacha v0.3.1
Compiling impl-codec v0.5.1
Compiling rand v0.8.4
Compiling fixed-hash v0.7.0
Compiling ethbloom v0.11.0
Compiling primitive-types v0.9.1
Compiling ethereum-types v0.11.0
Compiling ethabi v14.1.0
Compiling sauron-core v0.41.1 (https://github.com/ivanceras/sauron?branch=master#21db58f2)
Compiling gloo-timers v0.2.1
Compiling console_log v0.2.0
Compiling futures-timer v3.0.2
Compiling web3 v0.16.0
Compiling sauron-node-macro v0.41.1 (https://github.com/ivanceras/sauron?branch=master#21db58f2)
Compiling sauron v0.41.1 (https://github.com/ivanceras/sauron?branch=master#21db58f2)
Compiling client v0.1.0 (/home/turiiya/git/api3-dao-tracker/client)
error[E0053]: method `update` has an incompatible type for trait
--> src/screens/failure.rs:32:37
|
32 |     fn update(&mut self, _: Msg) -> Cmd<Self, Msg> {
|                                     ^^^^^^^^^^^^^^
|                                     |
|                                     expected struct `std::vec::Vec`, found struct `sauron::cmd::Cmd`
|                                     help: change the output type to match the trait: `std::vec::Vec<failure::Msg>`
|
= note: expected fn pointer `fn(&mut failure::Screen, failure::Msg) -> std::vec::Vec<failure::Msg>`
found fn pointer `fn(&mut failure::Screen, failure::Msg) -> sauron::cmd::Cmd<sauron::Program<failure::Screen, failure::Msg>>`

error[E0053]: method `update` has an incompatible type for trait
--> src/screens/home.rs:358:39
|
358 |     fn update(&mut self, msg: Msg) -> Cmd<Self, Msg> {
|                                       ^^^^^^^^^^^^^^
|                                       |
|                                       expected struct `std::vec::Vec`, found struct `sauron::cmd::Cmd`
|                                       help: change the output type to match the trait: `std::vec::Vec<home::Msg>`
|
= note: expected fn pointer `fn(&mut home::Screen, home::Msg) -> std::vec::Vec<home::Msg>`
found fn pointer `fn(&mut home::Screen, home::Msg) -> sauron::cmd::Cmd<sauron::Program<home::Screen, home::Msg>>`

error[E0053]: method `update` has an incompatible type for trait
--> src/screens/rewards.rs:200:37
|
200 |     fn update(&mut self, _: Msg) -> Cmd<Self, Msg> {
|                                     ^^^^^^^^^^^^^^
|                                     |
|                                     expected struct `std::vec::Vec`, found struct `sauron::cmd::Cmd`
|                                     help: change the output type to match the trait: `std::vec::Vec<rewards::Msg>`
|
= note: expected fn pointer `fn(&mut rewards::Screen, rewards::Msg) -> std::vec::Vec<rewards::Msg>`
found fn pointer `fn(&mut rewards::Screen, rewards::Msg) -> sauron::cmd::Cmd<sauron::Program<rewards::Screen, rewards::Msg>>`

error[E0053]: method `update` has an incompatible type for trait
--> src/screens/treasury.rs:91:39
|
91 |     fn update(&mut self, msg: Msg) -> Cmd<Self, Msg> {
|                                       ^^^^^^^^^^^^^^
|                                       |
|                                       expected struct `std::vec::Vec`, found struct `sauron::cmd::Cmd`
|                                       help: change the output type to match the trait: `std::vec::Vec<treasury::Msg>`
|
= note: expected fn pointer `fn(&mut treasury::Screen, treasury::Msg) -> std::vec::Vec<treasury::Msg>`
found fn pointer `fn(&mut treasury::Screen, treasury::Msg) -> sauron::cmd::Cmd<sauron::Program<treasury::Screen, treasury::Msg>>`

error[E0053]: method `update` has an incompatible type for trait
--> src/screens/voting.rs:272:37
|
272 |     fn update(&mut self, _: Msg) -> Cmd<Self, Msg> {
|                                     ^^^^^^^^^^^^^^
|                                     |
|                                     expected struct `std::vec::Vec`, found struct `sauron::cmd::Cmd`
|                                     help: change the output type to match the trait: `std::vec::Vec<voting::Msg>`
|
= note: expected fn pointer `fn(&mut voting::Screen, voting::Msg) -> std::vec::Vec<voting::Msg>`
found fn pointer `fn(&mut voting::Screen, voting::Msg) -> sauron::cmd::Cmd<sauron::Program<voting::Screen, voting::Msg>>`

error[E0053]: method `update` has an incompatible type for trait
--> src/screens/votings.rs:148:37
|
148 |     fn update(&mut self, _: Msg) -> Cmd<Self, Msg> {
|                                     ^^^^^^^^^^^^^^
|                                     |
|                                     expected struct `std::vec::Vec`, found struct `sauron::cmd::Cmd`
|                                     help: change the output type to match the trait: `std::vec::Vec<votings::Msg>`
|
= note: expected fn pointer `fn(&mut votings::Screen, votings::Msg) -> std::vec::Vec<votings::Msg>`
found fn pointer `fn(&mut votings::Screen, votings::Msg) -> sauron::cmd::Cmd<sauron::Program<votings::Screen, votings::Msg>>`

error[E0053]: method `update` has an incompatible type for trait
--> src/screens/wallet.rs:434:37
|
434 |     fn update(&mut self, _: Msg) -> Cmd<Self, Msg> {
|                                     ^^^^^^^^^^^^^^
|                                     |
|                                     expected struct `std::vec::Vec`, found struct `sauron::cmd::Cmd`
|                                     help: change the output type to match the trait: `std::vec::Vec<wallet::Msg>`
|
= note: expected fn pointer `fn(&mut wallet::Screen, wallet::Msg) -> std::vec::Vec<wallet::Msg>`
found fn pointer `fn(&mut wallet::Screen, wallet::Msg) -> sauron::cmd::Cmd<sauron::Program<wallet::Screen, wallet::Msg>>`

error[E0053]: method `update` has an incompatible type for trait
--> src/screens/wallets.rs:312:37
|
312 |     fn update(&mut self, _: Msg) -> Cmd<Self, Msg> {
|                                     ^^^^^^^^^^^^^^
|                                     |
|                                     expected struct `std::vec::Vec`, found struct `sauron::cmd::Cmd`
|                                     help: change the output type to match the trait: `std::vec::Vec<wallets::Msg>`
|
= note: expected fn pointer `fn(&mut wallets::Screen, wallets::Msg) -> std::vec::Vec<wallets::Msg>`
found fn pointer `fn(&mut wallets::Screen, wallets::Msg) -> sauron::cmd::Cmd<sauron::Program<wallets::Screen, wallets::Msg>>`

error[E0599]: no function or associated item named `new_replace_mount` found for struct `sauron::Program` in the current scope
--> src/lib.rs:44:22
|
44 |             Program::new_replace_mount(screens::votings::Screen::new(appstate), &root);
|                      ^^^^^^^^^^^^^^^^^
|                      |
|                      function or associated item not found in `sauron::Program<_, _>`
|                      help: there is an associated function with a similar name: `replace_mount`

error[E0599]: no function or associated item named `new_replace_mount` found for struct `sauron::Program` in the current scope
--> src/lib.rs:47:22
|
47 |             Program::new_replace_mount(screens::rewards::Screen::new(appstate), &root);
|                      ^^^^^^^^^^^^^^^^^
|                      |
|                      function or associated item not found in `sauron::Program<_, _>`
|                      help: there is an associated function with a similar name: `replace_mount`

error[E0599]: no function or associated item named `new_replace_mount` found for struct `sauron::Program` in the current scope
--> src/lib.rs:50:22
|
50 |             Program::new_replace_mount(screens::wallets::Screen::new(appstate), &root);
|                      ^^^^^^^^^^^^^^^^^
|                      |
|                      function or associated item not found in `sauron::Program<_, _>`
|                      help: there is an associated function with a similar name: `replace_mount`

error[E0599]: no function or associated item named `new_replace_mount` found for struct `sauron::Program` in the current scope
--> src/lib.rs:53:22
|
53 |             Program::new_replace_mount(screens::treasury::Screen::new(appstate), &root);
|                      ^^^^^^^^^^^^^^^^^
|                      |
|                      function or associated item not found in `sauron::Program<_, _>`
|                      help: there is an associated function with a similar name: `replace_mount`

error[E0599]: no function or associated item named `new_replace_mount` found for struct `sauron::Program` in the current scope
--> src/lib.rs:60:26
|
60 |                 Program::new_replace_mount(screens::voting::Screen::new(appstate, vote_ref), &root);
|                          ^^^^^^^^^^^^^^^^^
|                          |
|                          function or associated item not found in `sauron::Program<_, _>`
|                          help: there is an associated function with a similar name: `replace_mount`

error[E0599]: no function or associated item named `new_replace_mount` found for struct `sauron::Program` in the current scope
--> src/lib.rs:65:26
|
65 |                 Program::new_replace_mount(screens::wallet::Screen::new(appstate, &addr), &root);
|                          ^^^^^^^^^^^^^^^^^
|                          |
|                          function or associated item not found in `sauron::Program<_, _>`
|                          help: there is an associated function with a similar name: `replace_mount`

error[E0599]: no function or associated item named `new_replace_mount` found for struct `sauron::Program` in the current scope
--> src/lib.rs:67:26
|
67 |                 Program::new_replace_mount(screens::home::Screen::new(appstate), &root);
|                          ^^^^^^^^^^^^^^^^^
|                          |
|                          function or associated item not found in `sauron::Program<_, _>`
|                          help: there is an associated function with a similar name: `replace_mount`

error: aborting due to 15 previous errors

Some errors have detailed explanations: E0053, E0599.
For more information about an error, try `rustc --explain E0053`.
error: could not compile `client`

To learn more, run the command again with --verbose.
Aug 20 15:52:51.730 ERROR ❌ error
error from HTML pipeline

Caused by:
0: error from asset pipeline
1: error during cargo build execution
2: cargo call returned a bad status
Error: error from HTML pipeline

Caused by:
0: error from asset pipeline
1: error during cargo build execution
2: cargo call returned a bad status
lucidstamp commented 3 years ago

no mistakes on your end. Dependencies were upgraded, so I will provide an update and will try not to forget Cargo.lock for the client.

EnormousCloud commented 3 years ago

@tobealive I believe the latest main branch and the latest state from the server will work for you now.

ttytm commented 3 years ago

Hey sorry for not replying. Thanks again for your efforts and for helping me out! I tried to build it on that day and had another error. Looked like it was in the last stages of building. Unfortunately didn't have the time to look further into it or to make a proper post here. I'll make the time to come back to it later this today. Thanks again, folks!

ttytm commented 3 years ago

This is the error.

╭─turiiya@nzxt in repo: api3-dao-tracker/server on  main is  v0.1.0 via  v1.54.0 took 140ms
[🔴] × cargo run --release
Finished release [optimized] target(s) in 0.08s
Running `target/release/api3tracker`
Error: IPC file doesn't exists

I'm super thankful for all that help and feel a bit sorry for bothering you. It's just that it's my first experience with running a rust app. On web front-end development I have many years under the belt, so as soon as I know how I get the local installation running and know how to open it in my browser I'll be fine on my own. This will be also probably another question which I will need to ask, so I'll directly put it in here. How do I open the local app in my browser when it's running then? Already facepalming myself on this one but facing the Situation of feeling like a noob again is hopefully a good thing.

EnormousCloud commented 3 years ago

This is actually a good news - your binary was successfully compiled and you are now facing a runtime error - it tries to connect to local Ethereum node but it fails.

As it was stated in the very beginning you need to provide the location of geth.ipc file in RPC_ENDPOINT variable (It doesn't work with Infura or any other HTTP JSON-RPC API)

So the easiest way to run geth is to install geth binary (compiled from https://github.com/ethereum/go-ethereum/) and then just launch it with geth --syncmode=light. Start of geth in this mode takes up to 10 minutes, and you can see where your geth.ipc is located in its logs. This location should be specified in environment variable before cargo run, and this file has to be readable to you current user.

Please also take care about existence of CACHE_DIR - because when launched it can take hours to build cache of contract logs, block times and ENS responses.

ttytm commented 3 years ago

Hello, thanks for the message! It runs now in the Console. What's the address to open it in the Browser now? Kind regards

EnormousCloud commented 3 years ago

It should be visible in the log and by default it is localhost:8080. https://github.com/EnormousCloud/api3-dao-tracker/blob/998d089f35ef6bae6f8d90b73918385cbfa1557a/server/src/args.rs#L16

During scanning HTTP server should answer with "please wait" message

ttytm commented 3 years ago

Runs for 12h+ now. I got a Cache Dir Full of JSON files. All that files contain is []. When restarting cargo run the cache is loaded and it continues where it ended. But I'm not quite there yet what it takes to come to the frontend. I also don't see a log with the default localhost value. localhost:8080 can't be reached for now. Do i just need to wait longer? Screenshot_19

EnormousCloud commented 3 years ago

I would recommend you to stop it and check your environment variables (see .env.mainnet for what should be set up)

From the screen I see that default of GENESIS_BLOCK=12786500 is overloaded and was either zero or something else - you don't need to scan blockchain before that block.

But if you want just to operate with look and style - you don't need running server project - this is what you are doing now. For "only client" you should follow just this: https://github.com/EnormousCloud/api3-dao-tracker/issues/3#issuecomment-902613563

ttytm commented 3 years ago

Nice the trunk serve command does the job in making a localhost instance accessible. trunk dev before was a dead end for me that's why i thought i need to finish the server-side. But what i get on localhost now is just a webpage with the spinner. As stated in your comment I'm using the fork of trunk and downloaded the appstate.json file into the client directory. A last thing I am missing here?

EnormousCloud commented 3 years ago

ya, sorry with confusing you with that dev.

Spinner does takes a while but you should see it just for 5 seconds. So if you see it more, then something went wrong, yes. The application state was not injected or was injected with some error. Possible reasons are:

EnormousCloud commented 3 years ago

And probably there is one more thing that I forgot (if you see no other Console errors):

As we're trying to approve that PR to trunk, there were actually a recent change in configuration on how injection works based on discussion with the project owner.

You can try playing with client/Trunk.toml with one of these following notations (position of @ differs):

diff --git a/client/Trunk.toml b/client/Trunk.toml
 pattern_script = '''
-   <script type="module">import init, {main} from '{base}{js}'; await init('{base}{wasm}'); main(`{@appstate}`);</script>
+   <script type="module">import init, {main} from '{base}{js}'; await init('{base}{wasm}'); main(`{appstate}`);</script>
 '''
-pattern_params = { "@appstate" = "appstate.json" }
+pattern_params = { "appstate" = "@appstate.json" }

May be this is the thing that doesn't work

ttytm commented 3 years ago

Yes, the spinner takes forever. I redownloaded the appstate file to make sure it is up to date.

Console output after trunk serve

╭─turiiya@nzxt in repo: api3-dao-tracker/client on  main is  v0.1.0 via  v1.54.0 took 1s
╰─λ trunk serve
Aug 28 11:59:53.118  INFO 📦 starting build
Aug 28 11:59:53.118  INFO spawning asset pipelines
Aug 28 11:59:53.201  INFO copying & hashing css path="src/assets/style.css"
Aug 28 11:59:53.201  INFO building client
Aug 28 11:59:53.201  INFO finished copying & hashing css path="src/assets/style.css"
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
Aug 28 11:59:53.288  INFO fetching cargo artifacts
Aug 28 11:59:53.376  INFO processing WASM
Aug 28 11:59:53.407  INFO calling wasm-bindgen
Aug 28 11:59:54.134  INFO copying generated wasm-bindgen artifacts
Aug 28 11:59:54.135  INFO applying new distribution
Aug 28 11:59:54.136  INFO ✅ success
Aug 28 11:59:54.136  INFO 📡 serving static assets at -> /
Aug 28 11:59:54.136  INFO 📡 server listening at 0.0.0.0:8080

Next all of the lines below the meta tags of view-source:http://127.0.0.1:8080/. The linked files are accessible. But I wouldn't know what to look for if there is an error here. WASM file is ~11MB JS File is ~20kb

<link rel="preload" href="/index-e643bd712794553f_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="/index-e643bd712794553f.js"></head>

<body>
<main>
<div class="preload_spinner"></div>
</main>

<script type="module">import init from '/index-e643bd712794553f.js';init('/index-e643bd712794553f_bg.wasm');</script></body></html>

If this is to much of support you need to give, please tell. Because this part of the work is obviously a little bit over my head and takes more time then expected. I'll also respect your time so please tell if this too much.

ttytm commented 3 years ago

Just read you posted another answer i didn't looked into. I'll check it now!

Edit: Same result with the client/Trunk.toml changes

EnormousCloud commented 3 years ago

based on the file contents that you provided - you are not using fork of the trunk.

EnormousCloud commented 3 years ago

To bring up more details so you could understand what is (not) happening:

This is the default initialization script that is being injected by trunk:

import init from '/index-<checksum>.js';init('/index-<checksum>_bg.wasm');

But the proper initialization script is for the framework that was used is

import init, { main } from '/index-<checksum>.js'; await init('/index-<checksum>_bg.wasm'); main(`<JSON file contents>`);

Please take attention to await and main() function. This is what is different.

You can put aside having the fork and see how it works

Fork allows you to have the injection in serve mode for real-time updates as you change the files.

ttytm commented 3 years ago

Editing the dist/index.html manually brought finally a visual result.

I also retraced what I did when installing trunk. It was that I downloaded the correct git but then I mistakenly installed the main branch via cargo. Now the correct fork of trunk is installed. Then I deleted the dist directory and tried again with the correct trunk version. Unfortunately I still miss something because the injections is still not happening.

Current state now is the just Spinner again but an async-h1 Error in the Terminal appears after a while.

╭─turiiya@nzxt in repo: api3-dao-tracker/client on  main [!?] is  v0.1.0 via  v1.54.0 took 35s
[🧱] × trunk serve
Aug 28 17:14:19.806  INFO 📦 starting build
Aug 28 17:14:19.806  INFO spawning asset pipelines
Aug 28 17:14:19.904  INFO building client
Aug 28 17:14:19.904  INFO copying & hashing css path="src/assets/style.css"
Aug 28 17:14:19.904  INFO finished copying & hashing css path="src/assets/style.css"
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
Aug 28 17:14:20.005  INFO fetching cargo artifacts
Aug 28 17:14:20.106  INFO processing WASM
Aug 28 17:14:20.145  INFO calling wasm-bindgen
Aug 28 17:14:20.809  INFO copying generated wasm-bindgen artifacts
Aug 28 17:14:20.811  INFO applying new distribution
Aug 28 17:14:20.813  INFO ✅ success
Aug 28 17:14:20.813  INFO 📡 server running at http://127.0.0.1:8080/
Aug 28 17:14:24.131 ERROR async-h1 error

console output is:

Uncaught TypeError: Cannot read property 'cosmeticStyleSheet' of undefined
    at <anonymous>:3:39
    at <anonymous>:26:11
contentscript.js:35 Uncaught TypeError: Cannot read property 'popup_show_trigger' of undefined
    at HTMLDocument.<anonymous> (contentscript.js:35)
    at HTMLDocument.dispatch (contentscript.js:26)
    at HTMLDocument.h.handle (contentscript.js:26)
DevTools failed to load source map: Could not load content for chrome-extension://jkennnbhkennnbeebfonckakbodfaldk/static/js/iframe.9162275d.bundle.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load source map: Could not load content for chrome-extension://jkennnbhkennnbeebfonckakbodfaldk/static/js/contentScript.bundle.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load source map: Could not load content for chrome-extension://jkennnbhkennnbeebfonckakbodfaldk/static/css/iframe.9162275d.7fbe275f.css.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load source map: Could not load content for chrome-extension://jkennnbhkennnbeebfonckakbodfaldk/static/css/iframe.9162275d.css.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
EnormousCloud commented 3 years ago

Unfortunately this one is not something that looks familiar to me yet. Logs from console are some errors of some extension that you have, and they are probably not related.

When you do trunk build - do you have same async-h1 error? and could it be caused by any other modification in the client or Trunk.toml?

From what I can google it could be caused by putting double slash in your URL, using HTTP below 1.1, incorrect headers from client, etc https://github.com/http-rs/tide/issues?q=async-h1+error I can advice to check whether in another browser it would be a different experience.

ttytm commented 3 years ago

I started from scratch again. The Error disappeared. But its still just the spinner showing and when checking the source the initialization script doesn't inject appstate. Also tried https://github.com/EnormousCloud/api3-dao-tracker/issues/3#issuecomment-907611797 with no avail.

Maybe I'm using the trunk fork the wrong way. I installed it with cargo install --git https://github.com/wcrbrm/trunk.git trunk

ttytm commented 3 years ago

One more observation. Probably here lies the error: trunk serve on main branch show no errors in the terminal without additional dependencies installed.

the trunk fork (installed with cargo like mentioned above) shows an error when without wasm-bindgen-cli. I had to install the wasm-bindgen-cli separately while working with the fork so the terminal output doesn't show the error below. But probably the wasm-bindgen-cli shouldn't be installed. This is the output without wasm-bindgen-cli installed seperately.

╭─turiiya@nzxt in repo: api3-dao-tracker/client on  main [!] is  v0.1.0 via  v1.54.0 took 13m30s
[🧱] × trunk serve
Aug 28 19:43:33.035  INFO 📦 starting build
Aug 28 19:43:33.036  INFO spawning asset pipelines
Aug 28 19:43:33.159  INFO building client
Aug 28 19:43:33.159  INFO copying & hashing css path="src/assets/style.css"
Aug 28 19:43:33.160  INFO finished copying & hashing css path="src/assets/style.css"
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
Aug 28 19:43:33.256  INFO fetching cargo artifacts
Aug 28 19:43:33.354  INFO processing WASM
Aug 28 19:43:33.388  INFO calling wasm-bindgen
Aug 28 19:43:33.389 ERROR ❌ error
error from HTML pipeline

Caused by:
0: failed to spawn assets finalization
1: error spawning wasm-bindgen call
2: No such file or directory (os error 2)
Aug 28 19:43:33.389  INFO 📡 server running at http://127.0.0.1:8080/
EnormousCloud commented 3 years ago

Maybe I'm using the trunk fork the wrong way. I installed it with cargo install --git https://github.com/wcrbrm/trunk.git trunk

I would recommend to use the direct branch for that specific PR. May be this is where I am misleading you https://github.com/wcrbrm/trunk/tree/wcrbrm/init-script-patterns

cargo install will probably use master branch. So try to clone exactly that one, cargo run --release and use executable from target/release folder.

https://github.com/EnormousCloud/api3-dao-tracker/issues/3#issuecomment-907611797 will matter for this branch

ttytm commented 3 years ago

Hey, thanks for the instructions. Just did it that way with the same results. So I would say let's leave it. I'll come back to it at a later date. Maybe with the next release of the trunk main branch, those problems are not that difficult to solve anymore. Again thanks so much for all that support! Paradoxically you made it a good experience to fail that way.

ttytm commented 2 years ago

No more Problems with the new version of trunk. 😙👌 Screenshot from 2021-09-24 12-13-11