Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web demo is broken: runCardanoAddressesApi is not defined #264

Open
Unisay opened this issue Jul 13, 2024 · 2 comments
Open

Web demo is broken: runCardanoAddressesApi is not defined #264

Unisay opened this issue Jul 13, 2024 · 2 comments
Assignees
Labels
BUG For defects and incomplete features. javascript Pull requests that update Javascript code

Comments

@Unisay
Copy link
Contributor

Unisay commented Jul 13, 2024

image

@Unisay Unisay added the BUG For defects and incomplete features. label Jul 13, 2024
@paweljakubas
Copy link
Collaborator

paweljakubas commented Jul 23, 2024

hi @Unisay

My strong view is that it is something on application side. Prove:

$ echo addr_test1vqq934tq2lnxp9urlltl0vj3sejl92dznu82ngzdj8g4fpc7vnz95 | cabal run cardano-address address inspect
/nix/store/q3yjgay463jbvcnk751pk4r95a31wm47-cabal-install-exe-cabal-3.10.3.0/bin/cabal --project-file=/home/pawel/Work/IntersectMBO/cardano-addresses/.nix-shell-cabal.project run cardano-address address inspect
{
    "address_style": "Shelley",
    "address_type": 6,
    "network_tag": 0,
    "spending_key_hash": "0058d56057e6609783ffd7f7b2518665f2a9a29f0ea9a04d91d15487",
    "spending_key_hash_bech32": "addr_vkh1qpvd2czhuesf0qll6lmmy5vxvhe2ng5lp656qnv3692gwcv4s9j",
    "stake_reference": "none"
}

As you see this is a valid address (enterprise one, so only spending credential present) and inspect functionality parses it properly. Maybe the web application has problem with this type of address as it expects base address (so also with delegation credential present) - just first guess. Nevertheless, I do not see problem on cardano-addresses side, so it very probably is not BUG here but on the web app side you used.

@Crypto2099 Crypto2099 self-assigned this Jul 23, 2024
@Unisay
Copy link
Contributor Author

Unisay commented Jul 23, 2024

So I looked at the web demo app and noticed the following error in the dev console:

Loading module from “http://localhost:3000/dist/cardano-addresses-jsapi.esm.js” was blocked because of a disallowed MIME type (“text/html”)

The error went away after I added this fix to the index.js:

app.use((req, res, next) => {
  res.setHeader('X-Content-Type-Options', 'nosniff');
}); 

Unfortunately this isn't enough and the app looks like this:
image

It is stuck in the "Loading.." state right from the start, no errors in the dev console, but also no results after clicking the "Inspect" button.

TLDR: the demo app is broken.

@Crypto2099 Crypto2099 added the javascript Pull requests that update Javascript code label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG For defects and incomplete features. javascript Pull requests that update Javascript code
Projects
None yet
Development

No branches or pull requests

3 participants