tronprotocol / trident

148 stars 116 forks source link

Source Build Error #106

Closed Aiden-777 closed 1 year ago

Aiden-777 commented 1 year ago

java version "1.8.0_231"

trident version 0.7.0


> Task :core:compileJava
G:\local-repository\project-source\trident-0.7.0\trident-java\core\src\main\java\org\tron\trident\core\ApiWrapper.java:930: 错误: 编码GBK的不可映射字符
     * Get current API node鈥? info
                            ^
注: 某些输入文件使用了未经检查或不安全的操作。
注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。

> Task :core:test

org.tron.trident.core.ApiWrapperTest > testGenerateAddress() PASSED

org.tron.trident.core.ApiWrapperTest > testSendTrc20Transaction() FAILED
    io.grpc.StatusRuntimeException at ApiWrapperTest.java:56
        Caused by: io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AnnotatedConnectException
            Caused by: java.net.ConnectException

org.tron.trident.core.ApiWrapperTest > testGetNowBlockQuery() PASSED

3 tests completed, 1 failed

> Task :core:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':core:test'.
> There were failing tests. See the report at: file:///G:/local-repository/project-source/trident-0.7.0/trident-java/core/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 37s
19 actionable tasks: 19 executed
endiaoekoe commented 1 year ago

hi, @Aiden-777 I have run the unit tests locally which also throws these build errors. function testSendTrc20Transaction() will invoke Nile-Fullnode-Grpc endpoint, currently the FULLNODE_NILE URL is an IP address configured in the Constant.java file. I Just searched the Java-tron official docs and found that Java-Tron supports the new official grpc-fullnode/grpc-solidity endpoint for Nile testnet, which you can find here https://nileex.io/status/getStatusPage. and the old IP style endpoints are deprecated. image you can replace the two endpoints(FULLNODE_NILE/FULLNODE_NILE_SOLIDITY) with the latest official endpoints mentioned above manually, then the build process may work well.