<p>As the error says:</p>
<blockquote>
<p>Text string metadata value must consist of at most 64 UTF8 bytes</p>
</blockquote>
<p>You can't use more than 64 UTF8 bytes in a value in the metadata.</p>
<p>In this case the problem is because your IPFS CID is V1, instead of V0. Take a look in the <a href="https://docs.ipfs.io/concepts/content-addressing/#identifier-formats" rel="nofollow noreferrer">Identifiers formats</a>.</p>
<p>So in this case you've some options:</p>
<ol>
<li>Use an array to specify the image if you continue using V1.</li>
<li>Generate a CID V0, which is shorter</li>
<li>Use another storage solution with a shorter URI</li>
</ol>
<p>Either way, try to follow the <a href="https://github.com/cardano-foundation/CIPs/blob/master/CIP-0025/README.md" rel="nofollow noreferrer">NFT Metadata standard</a>, which defines that the metadata should specify the URI, that means, don't remove the <code>ipfs://</code> part.</p>
<p>Anyway, it'll be stored in the blockchain, that doesn't matter, but maybe some websites won't display correctly your asset.</p>

CC BY-SA 4.0
2022-03-08T22:00:55.330Z
2022-03-08T22:00:55.330Z
georgeos
<p>Removing ipfs from this has solved the problem.</p>
<pre><code>&quot;image&quot;:&quot;ipfs://bafkreifuidzqzsol7lcf7km6od7723qln2aw7xlf4xyvx2t2bgwnbf2wum&quot;}}}
</code></pre>
<p>The result is:<code>&quot;image&quot;:&quot;bafkreifuidzqzsol7lcf7km6od7723qln2aw7xlf4xyvx2t2bgwnbf2wum&quot;}}}</code></p>

CC BY-SA 4.0
2022-02-27T13:14:23.707Z
That's not right.. You have something else wrong if that patched your problem as it should not have been required to remove that. If you want to paste the full metadata contents in I can help sort out what's going on.
Tygar Pool
CC BY-SA 4.0
2022-02-27T13:59:30.703Z
please paste the full metadata which is given above in the question.
arunwebber
CC BY-SA 4.0
2022-02-27T10:07:03.397Z
2022-02-27T10:07:03.397Z
arunwebber
<p>I am having a very similar issue although with a different erorr.</p>
<blockquote>
<p>Text string metadata value must consist of at most 64 UTF8 bytes, but
it consists of 70 bytes.</p>
</blockquote>
<p>It makes complete sense why removing the first &quot;ipfs://&quot; from that string allows it to work. It's just a coincidence that the string becomes less than 64 characters, allowing it to work.</p>
<p>I've tested this out with multiple fields in the metadata, and all it always works so long as the string is not greater than 64 characters.</p>
<p>This is obviously an issue as most ipfs links are longer than 64 characters.
Any ideas on a solution?</p>

CC BY-SA 4.0
2022-03-08T13:42:49.327Z
in pool.pm the image is shown after i removing the ipfs part too but i am wondering will this work correctly in block chain or not in live server?
arunwebber
CC BY-SA 4.0
2022-03-08T13:21:55.153Z
2022-03-08T13:21:55.153Z
brendansiraky
<p>I am trying to mint the token using this command. to testnet.</p>
<pre><code>cardano-cli transaction build-raw \
&gt; --fee 188865 \
&gt; --tx-in 540f0a1e27b64da69059d8b5ff22c542a53d31d5f01fedc6a0094879efb7152d#0 \
&gt; --tx-out $(cat payment.addr)+4811135+&quot;1000 $(cat policy/tokens/policy.id).eduladderTestCoin&quot;+&quot;1000&quot; \
&gt; --mint=&quot;1000 $(cat policy/tokens/policy.id).eduladderTestCoin&quot;+&quot;1000&quot; \
&gt; --minting-script-file policy/tokens/token_policy.script \
&gt; --metadata-json-file policy/tokens/token_meta.json \
&gt; --out-file token_tx.raw
</code></pre>
<p>When I am trying to do that I am getting this error.
<code>Command failed: transaction build-raw  Error: Error reading metadata at: &quot;policy/tokens/token_meta.json&quot; Value out of range within the metadata item 721: {&quot;c5edbeaed052fa6e3e3f1ced8e39fdb9900b910622ead746ee938cff&quot;:{&quot;eduladderTestCoin&quot;:{&quot;name&quot;:&quot;eduladderTestCoin&quot;,&quot;image&quot;:&quot;ipfs://bafkreifuidzqzsol7lcf7km6od7723qln2aw7xlf4xyvx2t2bgwnbf2wum&quot;}}} Text string metadata value must consist of at most 64 UTF8 bytes, but it consists of 66 bytes.</code>
What does this means and how will i debug the same?</p>

<cardano-cli><token>
Error Reading metadata while trying to mint token
# Error Reading metadata while trying to mint token

(Asked by: username_0 on 2022-02-27)

I am trying to mint the token using this command. to testnet.
cardano-cli transaction build-raw \
> --fee 188865 \
> --tx-in 540f0a1e27b64da69059d8b5ff22c542a53d31d5f01fedc6a0094879efb7152d#0 \
> --tx-out $(cat payment.addr)+4811135+"1000 $(cat policy/tokens/policy.id).eduladderTestCoin"+"1000" \
> --mint="1000 $(cat policy/tokens/policy.id).eduladderTestCoin"+"1000" \
> --minting-script-file policy/tokens/token_policy.script \
> --metadata-json-file policy/tokens/token_meta.json \
> --out-file token_tx.raw

When I am trying to do that I am getting this error.
Command failed: transaction build-raw  Error: Error reading metadata at: "policy/tokens/token_meta.json" Value out of range within the metadata item 721: {"c5edbeaed052fa6e3e3f1ced8e39fdb9900b910622ead746ee938cff":{"eduladderTestCoin":{"name":"eduladderTestCoin","image":"ipfs://bafkreifuidzqzsol7lcf7km6od7723qln2aw7xlf4xyvx2t2bgwnbf2wum"}}} Text string metadata value must consist of at most 64 UTF8 bytes, but it consists of 66 bytes.
What does this means and how will i debug the same?

**Tags:** cardano-cli, token

---

## 3 answers

### Answer by username_1 on 2022-03-08. Score: 0 | Accepted answer

As the error says:

> Text string metadata value must consist of at most 64 UTF8 bytes

You can't use more than 64 UTF8 bytes in a value in the metadata.

In this case the problem is because your IPFS CID is V1, instead of V0. Take a look in the [Identifiers formats](https://docs.ipfs.io/concepts/content-addressing/#identifier-formats).

So in this case you've some options:

1. Use an array to specify the image if you continue using V1.
2. Generate a CID V0, which is shorter
3. Use another storage solution with a shorter URI

Either way, try to follow the [NFT Metadata standard](https://github.com/cardano-foundation/CIPs/blob/master/CIP-0025/README.md), which defines that the metadata should specify the URI, that means, don't remove the `ipfs://` part.

Anyway, it'll be stored in the blockchain, that doesn't matter, but maybe some websites won't display correctly your asset.


---

### Answer by username_0 on 2022-02-27. Score: 1

Removing ipfs from this has solved the problem.
"image":"ipfs://bafkreifuidzqzsol7lcf7km6od7723qln2aw7xlf4xyvx2t2bgwnbf2wum"}}}

The result is:"image":"bafkreifuidzqzsol7lcf7km6od7723qln2aw7xlf4xyvx2t2bgwnbf2wum"}}}

> **Comments:**
> **username_2**: That's not right.. You have something else wrong if that patched your problem as it should not have been required to remove that. If you want to paste the full metadata contents in I can help sort out what's going on.  
> **username_0**: please paste the full metadata which is given above in the question.  

---

### Answer by username_3 on 2022-03-08. Score: 0

I am having a very similar issue although with a different erorr.

> Text string metadata value must consist of at most 64 UTF8 bytes, but
> it consists of 70 bytes.

It makes complete sense why removing the first "ipfs://" from that string allows it to work. It's just a coincidence that the string becomes less than 64 characters, allowing it to work.

I've tested this out with multiple fields in the metadata, and all it always works so long as the string is not greater than 64 characters.

This is obviously an issue as most ipfs links are longer than 64 characters.
Any ideas on a solution?

> **Comments:**
> **username_0**: in pool.pm the image is shown after i removing the ipfs part too but i am wondering will this work correctly in block chain or not in live server?  

---

