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

Troubleshooting the new v4.2.0+ launcher #221

Open
tom-overton opened this issue Jun 16, 2021 · 60 comments
Open

Troubleshooting the new v4.2.0+ launcher #221

tom-overton opened this issue Jun 16, 2021 · 60 comments

Comments

@tom-overton
Copy link
Collaborator

tom-overton commented Jun 16, 2021

Starting with the release of v4.2.0, we now use a new script-based launcher that should hopefully solve the issues people were having with the .jar-based launcher. This issue is meant as a hub for troubleshooting problems with this new script-based launcher.

When I run the launcher, I see an error in the Command Prompt/Terminal that says "'java' is not recognized as an internal or external command"

This indicates that you probably don't have Java installed. If you don't hava Java installed, please install it as per the information on the Java section of our wiki. If you do have Java installed, then for some reason your operating system can't find it; try reinstalling Java to see if that fixes it. If that still doesn't work, try the steps described in this post; please read the "Notes on Step 8" section very carefully.

When I run the launcher, I see an error in the Command Prompt/Terminal that says "Invalid initial heap size: -Xmx4096M"

This error indicates that you have 32-bit Java installed; you need to install 64-bit Java to use the randomizer. For more information, see the Java section of our wiki.

When I run the launcher, I see an error in the Command Prompt/Terminal that says something like "error in opening JAR file rt.jar"

This indicates something is wrong with your installation of Java. Try uninstalling and reinstalling Java to see if that fixes it.

When I double-click on the launcher, I get a pop-up saying the app is unrecognized/insecure

This is expected; Windows and macOS don't like to run scripts from the internet without your permission. Luckily, it's pretty easy to fix.

Windows

On the SmartScreen dialog box that pops up, click on the underlined "More info" text to make the "Run anyway" button appear, then click the "Run anyway" button. After that, Windows will not ask you permission to run the launcher.

macOS

In Finder, hold down Control and click on "launcher_MAC.command" to make a context menu appear. Click on the "Open" option, then click the "Open" button in the dialog that appears asking if you want to override system security.

When I double-click on the launcher, it doesn't run anything

This can be a problem on macOS or other Unix-based systems if the script is not marked as executable. You need to run chmod +x on the script to make it executable; it will then respond to being double-clicked. Below are the steps for doing so on a macOS:

  1. Open Terminal (if you don't know how to do this, press Command + Space to open Spotlight and type "Terminal").
  2. Type the characters cd in the Terminal. This is the "c" key followed by the "d" key followed by Space.
  3. In Finder, locate the randomizer folder; this is the folder containing "launcher_MAC.command" and "PokeRandoZX.jar". Click-and-drag this folder onto your Terminal.
  4. Back in Terminal, you should now have a line that reads something like cd [location of your randomizer folder]. Press the Return key.
  5. In Terminal, type chmod +x launcher_MAC.command and press the Return key. The launcher is now marked as executable, so you should be able to double-click it from Finder to run it.

On Windows, when I double-click on the launcher, it says something like "Can't find bundle for base name"

This happens if "illegal characters" appear in the path to the launcher. We're not 100% sure what all of the illegal characters are, but one such example of an illegal character is the exclamation mark "!". Try renaming some of the folders in the path to the launcher, or try moving the randomizer to another folder.

On Windows/Mac, when I double-click on the launcher, it says something like "Unable to access jarfile"

While the exact specifics of this are unclear, we think this has something to do with file permissions. Try moving the randomizer to a different folder where you have more permissions.

On Unix/Linux, when I double-click on the launcher, it opens a text editor instead

On some Unix systems, your file browser may decide that any time you click on a .sh file, it should open a text editor. While the exact steps you need to take to fix this will vary from system-to-system, an example of how to fix this on Ubuntu 18.04 can be found on this StackOverflow post. You will likely need to do something similar for other non-Ubuntu flavors of Linux or other Unix systems.

I'm running into an issue with the launcher that isn't listed here

In that case, please respond to this issue with the problem that you're seeing. Please include all relevant information, including your operating system, operating system version, randomizer version, and anything that appears in the Command Prompt/Terminal when you run the launcher.

@blunty-e
Copy link

I'm on windows and I double-clicked the .bat file and it's not opening anything

@tom-overton
Copy link
Collaborator Author

@blunty-e Can you open a command prompt (open the Start Menu, type "cmd", and press Enter), type java -version and report what it says?

@WickedPivot95
Copy link

@tom-overton I am having a similar issue as @blunty-e. I'm on windows 10 and I have extracted the files to a folder, but when I double click the .bat file, I get this message that opens for a brief second before disappearing and not opening the randomizer (I was able to grab a screenshot prior to its disappearance):
Screenshot (25)
Here is my java version:
Screenshot (27)

@baitsadasuto
Copy link

Hi, I'm running into a similar issue listed above, running the latest Windows 10 release (Not sure of the version name/ number, but it forced the weather to be visible next to the icons in the bottom right), version of Java (same as @WickedPivot95 ), and UPR. I've somehow gotten into the randomizer proper one time, but every other time, I encounter the following issue, visible for a few seconds before the command prompt closes itself. Help would be greatly appreciated, as I'm not familiar with .bat files in the slightest and, ironically, the randomizer seems to decide when it wants to work at random. Thanks in advance!
UPR-Error

@birgador
Copy link

I am running into the same issue. Whenever I clicked on the "launcher_WINDOWS.bat" it would open and close without doing anything.

I edited the file and added a pause statement. This showed that the java VM was actually not being created due to the memory size.

Invalid maximum heap size: -Xmx4096M The specified size exceeds the maximum representable size. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

Uninstalling java and ensuring that I installed the latest 64-bit version [1] fixed the issue

Hope this helps the others


[1] https://java.com/en/download/windows_manual.jsp

@tom-overton
Copy link
Collaborator Author

@WickedPivot95 I have never seen that error before, and looking around for solutions to it doesn't bring up anything useful. Is the randomizer unzipped?

@baitsadasuto Because of a bug in how we handle retrieving information from Github's API, you need to be able to reach Github to start the randomizer; that error indicates that you can't reach it. I fixed this with commit fc397c5 and it will be in the next release, but for now you'll need to ensure that you are connected.

As for everyone else, if you're struggling to see what the launcher's issue is because it disappears so quickly, open the script file in a text editor like Notepad and remove the exit 0 from the end of it. This will keep the launcher open so you can diagnose the error. This change will also be included in the next release, but this will help you diagnose issues in the near term.

@Ferb583
Copy link

Ferb583 commented Jun 28, 2021

it says that pokemon y isn't supported

@Karlonien
Copy link

I'm unable to load my roms into the randomizor, do they have to be encrypted when i feed them into the randomizor?

Whenever i try to insert my roms i get this error message: "There was an unhandled exception trying to load ypur ROM.

I've included the error report in this post.
error_2021-07-03-18-11-54.txt

@Luminaire555
Copy link

No matter where i put the folder I always get the error "unable to access jarfile".

@cvxsdfsdf
Copy link

No matter where i put the folder I always get the error "unable to access jarfile".

same

@Erez357
Copy link

Erez357 commented Jul 15, 2022

I have a problem. when I open it through the zip file it says it is unable to access the file, even when copied it to anther folder, and when I extracted the zip file, it says it's couldn't create the java virtual machine

@MxZeal
Copy link

MxZeal commented Jul 17, 2022

@tom-overton I am having a similar issue as @blunty-e. I'm on windows 10 and I have extracted the files to a folder, but when I double click the .bat file, I get this message that opens for a brief second before disappearing and not opening the randomizer (I was able to grab a screenshot prior to its disappearance): Screenshot (25) Here is my java version: Screenshot (27)

I had this same problem and managed to fix it by installing the actual java development kit from here https://www.oracle.com/java/technologies/downloads/#jdk18-windows

@NycOtter
Copy link

NycOtter commented Nov 11, 2022

@tom-overton

When i try double clicking the file to open the randomizer software this is what happens help
image_2022-11-10_212410254

@Pokemonefan911
Copy link

Im currently running into a heap size error -Xmx4608 tried to look for a solution nothing came up so last resorted to reporting it.

Invalid maximum heap size: -Xmx4608M
The specified size exceeds the maximum representable size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Press any key to exit...

This being the error and seeing others also report it with no fixes to it.
Everything else that would need to be checked off to use it is well and working I am running off a 64-bit system.
Another thing to note its purely just the launcher not working the other openable Jar file of Pokerando that you keep in the file works, again just not the launcher.

@tom-overton
Copy link
Collaborator Author

@Pokemonefan911 This indicates you have 32-bit Java; you need 64-bit Java to use the launcher. Check out our Java page for more info: https://github.com/Ajarmar/universal-pokemon-randomizer-zx/wiki/About-Java

Also, I'm surprised that nothing came up, because this problem is quite literally in the first post of this issue thread.

@CrashGaming19
Copy link

Help, i cant run this, i just keep getting this error message..
i thought it was similar to the problem of running on a 32bit rate but im running on 64bit which i initially thought anyway
image_2023-09-06_212742308

@RyeonSpeed
Copy link

image When trying to run the batch file i keep getting this error

@Shiuk21
Copy link

Shiuk21 commented Mar 1, 2024

Whenever I download the file and extract there is no .bat file for Windows. Instead, it just says launcher_WINDOWS and when I launch it tells me this
'java' is not recognized as an internal or external command,
operable program or batch file.

@gaaras1
Copy link

gaaras1 commented Apr 21, 2024

I'm using windows and when I open it it says invalid maximum heap size and I'm using the most recent version of the launcher.
sorry if this isn't that clear I'm newer to this scene and just tryna get into it
image_2024-04-21_113313313
windows 10
ver 4.6.0

@DaddyBlade
Copy link

I'm using windows and when I open it it says invalid maximum heap size and I'm using the most recent version of the launcher. sorry if this isn't that clear I'm newer to this scene and just tryna get into it image_2024-04-21_113313313 windows 10 ver 4.6.0

Im also having this same exact issue, I am not able to find a work around yet.

@shumpie13
Copy link

I believe this is a new issue.
OS:
Mac OS 10.15.7 Catalina
JAVA:
java version "22.0.1" 2024-04-16
Java(TM) SE Runtime Environment (build 22.0.1+8-16)
Java HotSpot(TM) 64-Bit Server VM (build 22.0.1+8-16, mixed mode, sharing)

I get this message when executing the Mac launcher:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /Library/Java/JavaVirtualMachines/jdk-22.jdk/Contents/Home/lib/libawt.dylib: dlopen(/Library/Java/JavaVirtualMachines/jdk-22.jdk/Contents/Home/lib/libawt.dylib, 1): Library not loaded: /System/Library/Frameworks/JavaRuntimeSupport.framework/Versions/A/JavaRuntimeSupport
Referenced from: /Library/Java/JavaVirtualMachines/jdk-22.jdk/Contents/Home/lib/libawt.dylib
Reason: image not found
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:259)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:249)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2408)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:916)
at java.base/java.lang.System.loadLibrary(System.java:2068)
at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1384)
at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1382)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1381)
at java.desktop/java.awt.Toolkit.initStatic(Toolkit.java:1419)
at java.desktop/java.awt.Toolkit.(Toolkit.java:1393)
at java.desktop/java.awt.EventQueue.invokeLater(EventQueue.java:1316)
at java.desktop/javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1421)
at com.dabomstew.pkrandom.newgui.NewRandomizerGUI.main(NewRandomizerGUI.java:3993)

I will say that for a while I didn't even get to this point. I had to uninstall and reinstall Java and Java JDK. I then followed the instructions to manually reset the JAVA_HOME parameter. There definitely could be user error on my part.

@MamaSteve21
Copy link

I am running on windows 11 version 23H2, trying to use randomizer v4.6.0. I am getting the following error when trying to run the Windows launcher. Here is another screenshot to show I have the most updated version of Java.

image

image

@BlackMalePolarBear
Copy link

BlackMalePolarBear commented Aug 7, 2024

Randomizer Error
I took a screenshot of the error I got and saved it as a .jpeg file.

Windows 11, version 23H2

v4.6.0 of UPR

@MJ-AOAB
Copy link

MJ-AOAB commented Aug 7, 2024

using version 4.6.0 of randomiser windows 11

when opening the launcher file get a blank black screen and after a few seconds just the phrase "press any key to exit"

when opening the randomiser directly it opens but says it needs to be opened with the launcher

tried turning off antivirus no change

@Naofumy007
Copy link

bullshit habe ein screenshot von dem Fehler gemacht

@MudQuel
Copy link

MudQuel commented Sep 26, 2024

When I try to run the launcher it says "The file “launcher_MAC.command” could not be executed because you do not have appropriate access privileges" Idk what to do about this or fix this pls help

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