mozq/dencode-web

Unable to build project help please.

Closed this issue · 13 comments

First I love your dencode, it's what I really needed badly to convert UTF-16LE to Hex to work on some tables in Cheat Engine. and works perfectly and quickly. I was trying to build it but I keep getting this error. I'm not an advanced user and never used "Grandle" before, but I have built applications in Github with no issues. I'm really curious how I can get dencode working offline because I want to learn the trick to building it without getting this error:

dencode-web>gradlew appRunStage
> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> error: invalid source release: 17

* 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.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.4/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 1s
1 actionable task: 1 executed

I have Java SDK 17 and 21 installed on my computer so I have no idea what I'm doing wrong. I set my Java bin directory path in Environmental Variables too. Any help so I can get your awesome dencode working for me locally?

mozq commented

Thank you for loving DenCode.
I've pushed new build scripts for Gradle. (Commit; d4220e5)
Could you clone the latest one and try the command ./gradlew appRunStage again?

mozq commented

If it does not resolve, please check the Java version. java --version

I also found the following information about OVERRIDE_JAVA_VERSION environment variable, but I'm not sure if it will work.
https://ionic.zendesk.com/hc/en-us/articles/14973678137111-error-invalid-source-release-17

Is Google Cloud required to use dencode locally?

If it does not resolve, please check the Java version. java --version

I also found the following information about OVERRIDE_JAVA_VERSION environment variable, but I'm not sure if it will work. https://ionic.zendesk.com/hc/en-us/articles/14973678137111-error-invalid-source-release-17

Thank you for your reply. I still wasn't able to build it unfortunately with the new clone. This was the result:

dencode-web> ./gradlew appRunStage
Downloading https://services.gradle.org/distributions/gradle-8.4-bin.zip
............10%............20%.............30%............40%.............50%............60%.............70%............80%.............90%............100%

Welcome to Gradle 8.4!

Here are the highlights of this release:
 - Compiling and testing with Java 21
 - Faster Java compilation on Windows
 - Role focused dependency configurations creation

For more details see https://docs.gradle.org/8.4/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> error: invalid source release: 17

* 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 29s
1 actionable task: 1 executed

My Java seems to be reporting as 21.

dencode-web> java --version
java 21.0.1 2023-10-17 LTS
Java(TM) SE Runtime Environment (build 21.0.1+12-LTS-29)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.1+12-LTS-29, mixed mode, sharing)

I am on Windows 10 so I couldn't try the Android guide. I'll look into how to do so on Windows 10 and see if it will work this time.

EDIT: I completely removed 21 and am 17 now on correct version

java 17.0.9 2023-10-17 LTS
Java(TM) SE Runtime Environment (build 17.0.9+11-LTS-201)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.9+11-LTS-201, mixed mode, sharing)

but after compliling I get 100s of errors that go on for a long time like:

dencode-web\src\main\java\com\dencode\logic\dencoder\CipherAffineDencoder.java:72: error: unmappable character (0x81) for encoding windows-31j
dencode-web\src\main\java\com\dencode\logic\dencoder\CipherAffineDencoder.java:72: error: unmappable character (0xEF) for encoding windows-31j
dencode-web\src\main\java\com\dencode\logic\dencoder\CipherJisKeyboardDencoder.java:87: error: unmappable character (0x9B) for encoding windows-31j
                case 'p': sb.append('縺?'); break;

and it goes on and on like this until it halts.

only showing the first 100 errors, of 2817 total; use -Xmaxerrs if you would like to see more

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
Compilation failed; see the compiler error output for details.
mozq commented

On macOS, it worked with both Java17 and Java21 versions.
Is it possible to run it with Java17?

set JAVA_HOME
java —version
set JAVA_HOME= PLEASE SET YOUR JAVA17 HOME
java —version
./gradlew appRunStage

mozq commented

I can build with Oracle Java21 on Windows10. I used the following JDK.

Windows - x64 Compressed Archive
https://download.oracle.com/java/21/latest/jdk-21_windows-x64_bin.zip

mozq commented

unmappable character (0x81) for encoding windows-31j
Are you using Japanese Windows? It seems that the JDK reads the source codes as Windows-31j (Shift_JIS) encoding.
Let me check the encoding configuration.

Yes I am using Japanese system locale.

I tried to compile with Java sdk 17 and 21 they both failed.

mozq commented

I've pushed latest build.gradle file (Commit; 19e9514). Please try.

Thanks again, it seemed to not get errors this time. It is locked at this part now:

gradlew appRunStage

> Task :appRunStage
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
<===========--> 91% EXECUTING [1m 35s]
> :appRunStage

It also gave this notice before stopping after the Google Cloud was done updating:

dencode-web\src\main\java\com\dencode\web\servlet\pages\DencodeServlet.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Welcome to the Google Cloud CLI!
Beginning update. This process may take several minutes.

Is there something else I must do?

mozq commented

どういたしまして。
Please ignore the notice. You just access to http://localhost:8080/ . That's it ;)

If you want to stop the local server, please use [CTRL+C] key.

Oh yes, thank you. I didn't know I had to run the localhost on port 8080! It seems to be working now, but the alignment seems off. When I try to click on the decoded address for example it hides the entire line, but on your main website it opens a nice wide box.

Mine:
2023-10-23_031427

Yours:
2023-10-23_031608

I have tried this in Firefox and Chrome.

mozq commented

Pushed a fixed JavaScript code for the issue of hidden decoding line. Please pull it.

It is working perfectly now thank you for the help!