Error: TokenService Error: ChainId 0x539 is not supported

Greetings, there is a weird error after the latest update of MM!
There is no more option to use custom tokens in the network with chainId: 1337.

Error: TokenService Error: ChainId 0x539 is not supported
at common-0.js:1:248643 - sentry-install.js:1

We use the Hyperldeger Besu network in our dev environment with chainId: 1337
before all worked great
there was no issue with adding it as a custom network in MM
there was no issue with showing the current ETH balance in that network.

now, when trying to import a custom ERC20 token deployed in that network, MM acts weirdly:

after entering the custom token’s address - MM shows a Symbol and Decimals according to the contract.
after pressing the “Add custom token” button - it correctly indicates the current balance in the next window.
then after pressing the “Import tokens” button window closes and just nothing happens…

The error appears only in the browser dev console
Error: TokenService Error: ChainId 0x539 is not supported at common-0.js:1:248643

reopening the same issue as [Not able to import custom tokens on MM from Ganache]
and can’t understand why it was closed a few weeks ago without any reason.

What’s the point of not supporting a 1337 network, despite MM clearly can interact with it?
Guys, you have to fix it asap or at least do a statement that custom networks are no longer supported.


Same issue as above. I am surprised there are not more people reporting this. Everything was fine until that update. Right after the update I experienced the issue and just today I have been trying again and it still does not work. I tried on Chrome and FireFox. Same error. This is going to keep people from testing tokens.

I am using Ganache CLI by the way.

@ElliottA ,

Can you post your issue here too?


+1 I get the same error

Does somebody have the solution ?


Hello ! Welcome to MetaMask community !)
Are you using ganache-cli or ganache library?
Try updating it to the latest up-to-date version from npm


ok I will try thanks for the advice


@cypersnap not sure if related, but thought I’d share in case.

1 Like

I’m using MetaMask 10.23.2 and Hardhat 2.12.5. My Hardhat chain ID is 1337. When I import my custom ERC20 token into MetaMask it shows the token name/decimals and the correct balance. When I confirm the dialog to add the token it doesn’t appear in the token list or anywhere else. If I then click on “import account” I see a red error message:

“TokenService Error: ChainId 0x539 is not supported”

Given that chain 0x539 (1337) is only being used in the first place because of a MetaMask bug (see “MetaMask chainId issue” above) it seems beyond belief that the MetaMask devs would inexplicably remove support for this chain. What on earth was the thinking behind this decision?

Hello @rick121212 !
Welcome to MetaMask community )

I advise you to use Truffle to solve this problem.
Truffle is a development environment, testing framework and asset pipeline for Ethereum, aiming to make life as an Ethereum developer easier.

1 Like


Thanks for the advice but this is a MetaMask problem, not a Hardhat problem. I fixed the issue by using the standard Hardhat chain ID 31337 which now works with MetaMask.


@rick121212 would you be willing to open a GitHub issue with the info containing your experience?


Created issue 17414 on the MM board because I’m facing the same problem


I had to do a downgrade to make it work, i didn’t tried all versions one by one, i just made random jumps to past versions and it worked for me on [Version 10.18.3]

Hope it help you

This worked for me thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.