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

wallet/getblock axios error when tronWeb.trx.sign #39

Open
BarisZencir opened this issue Jul 20, 2024 · 1 comment
Open

wallet/getblock axios error when tronWeb.trx.sign #39

BarisZencir opened this issue Jul 20, 2024 · 1 comment

Comments

@BarisZencir
Copy link

hi,

this.tronWeb = new TronWeb({
fullHost: this.settings.fullHost,
});
const signedTxn = await this.tronWeb.trx.sign(tradeObj, privateKey);
Running this code cause error:

POST /wallet/getblock HTTP/1.1\r\nAccept: application/json, text/plain, /\r\nContent-Type: application/json\r\nTRON-PRO-API-KEY: 405cc803-c56a-40aa-a158-f7442de337e2\r\nUser-Agent: axios/1.7.2\r\nContent-Length: 16\r\nAccept-Encoding: gzip, compress, deflate, br\r\nHost: localhost:9090\r\nConnection: keep-alive\r\n\r\n"

running docker by : docker run -d -it --rm
-p 9090:9090
-e "defaultBalance=10000000000"
-e "showQueryString=true"
-e "showBody=true"
-e "mnemonic=***"
-e "accounts=1"
-e "formatJson=true"
--name tron
trontools/quickstart

When i just change local tron testnet to https://api.shasta.trongrid.io, my code runs well. Soo the error must be in this repo.

@aegas-io
Copy link

Similar issue for me, I'm running a test from metacoin box based on the tutorial here and this is what I can see in the container logs:

FULL-NODE /wallet/getblock 
[Output] <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 405 HTTP method POST is not supported by this URL</title>
</head>
<body><h2>HTTP ERROR 405</h2>
<p>Problem accessing /wallet/getblock. Reason:
<pre>    HTTP method POST is not supported by this URL</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>

</body>
</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants