dfinity / examples

Example applications, microservices, and code samples for the Internet Computer
https://dfinity.org
Apache License 2.0
546 stars 393 forks source link

A couple of errors and questions about the `examples` repo #707

Closed johnnynanjiang closed 9 months ago

johnnynanjiang commented 9 months ago

Hi ICP folks,

  1. nft-wallet example failed to deploy locally

When I followed https://github.com/dfinity/examples/blob/master/rust/nft-wallet/README.md#step-1-you-can-deploy-the-dapp-using-the-startsh-script to deploy locally, I got the following error

created public/build/main.js in 12.8s
thread 'main' panicked at 'Could not create HTTP client.: reqwest::Error { kind: Builder, source: "Unknown TLS backend passed to `use_preconfigured_tls`" }', /Users/nanjiang/.cargo/registry/src/github.com-1ecc6299db9ec823/ic-agent-0.20.1/src/agent/http_transport/reqwest_transport.rs:79:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  1. Can I use dfx command to list all transactions in cycle? e.g. dfx wallet --network ic balance is for checking the total balance, but no transaction history.

Thanks and regards,

adamspofford-dfinity commented 9 months ago

Which version of dfx are you using?

adamspofford-dfinity commented 9 months ago

There are canister functions for transaction history, but dfx does not use them, only the web UI does.

johnnynanjiang commented 9 months ago

Thanks @adamspofford-dfinity for the prompt response.

  1. Sure, dfx version is dfx 0.16.0, would you be able to deploy it locally successfully?

  2. Regarding There are canister functions for transaction history, but dfx does not use them, only the web UI does.

Did you mean the web UI like below, where I didn't find Cycle transaction history (gas fee history)

image

  1. I still got the same error
    created public/build/main.js in 12.9s
    thread 'main' panicked at 'Could not create HTTP client.: reqwest::Error { kind: Builder, source: "Unknown TLS backend passed to `use_preconfigured_tls`" }', /Users/nanjiang/.cargo/registry/src/github.com-1ecc6299db9ec823/ic-agent-0.20.1/src/agent/http_transport/reqwest_transport.rs:79:18
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

the same error happened to all cases

./deploy.sh --network ic
./deploy.sh --network local
./deploy.sh --playground

Can you please double check that you are able to deploy examples/rust/nft-wallet?

testpuddle commented 9 months ago

I also got the same issue under dfx 0.16.1.

I cloned the examples again incase they were updated. nft-wallet panicked in the same spot as the above.

adamspofford-dfinity commented 9 months ago

Aha, I see the problem. Run cargo install icx-asset --version 0.20.0 --locked, the --locked part being important. Does this resolve the error?

johnnynanjiang commented 9 months ago

Yes @adamspofford-dfinity , it fixed the problem, appreciate your help.