[Solved] Error when opening KoLmafia

Edgelord77

New member
So i can open kolmafia just fine but when i try to login in it says it couldnt acquire a file lock.
Any ideas on how to fix this?
Java and kolmafia versions are up to date
 

matt.chugg

Moderator
Make sure there are no other instances of KoLmafia running (possibly minimised to system tray if on windows?)
 

fronobulax

Developer
Staff member
Also make sure there are no instances of KoLmafia running and then delete any file in /sessions with a name that begins with "active_session".
 

Edgelord77

New member
Well ok so there were files to the wrong build and i got rid of that but i cant seem to get new files for the new build>
I can download and open the jar files but there isnt a folder that automatically appears
Any suggestions?
 

fronobulax

Developer
Staff member
I can download and open the jar files but there isnt a folder that automatically appears
I don't understand what you are expecting or saying.

What operating system are you running on?

What directory is the jar file in when you try and run it?

KoLmafia will create what it needs or use what it finds and that depends upon where it is when you try and open it.

On Windows systems there are some places where KoLmafia cannot create or run files.

It is possible that we mean different things by "folder".
 

Edgelord77

New member
1. Windows 10
2. Download folder
3. I dont think KoLmafia is creating what it needs, which is the problem for me
Here is the full error screen
Screenshot (7).png
 

fronobulax

Developer
Staff member
Downloads is sometimes overprotected and KoLmafia is not allowed to make files there because Windows thinks the jar file came from the internet and cannot be trusted.

Running as a Windows Administrator might help but I'd consider making and using another directory. You could try making a subdirectory under Documents or make something elsewhere, for example C:\KoLmafia. In either case move the jar file there and try again.
 

Edgelord77

New member
Well, I moved everything to Documents, i downloaded the source code, and then i deleted every single mafia related file i could find
still the exact same
any other suggestions?
 

fronobulax

Developer
Staff member
Your screenshot suggests that the jar file was in C:\Windows or below. It should not be there and that explains the the failure. Sorry I missed that.

Your downloads folder should be C:\Users\<username>\Downloads. Is that what you mean when you said Downloads? Many browsers can be misconfigured so that the "downloads" directory in not C:\Users\<username>\Downloads.

There is no need to download the source code.

Where are you downloading from?

The process should be:
  • Download the jar file to your local drive. Note where it is on your local drive.
  • Create a directory to contain mafia. C:\Users\<username>\Documents\KoLmafia is one suggestion that should work.
  • Move the jar file from where it was downloaded to, to the new location.
  • Double click on the jar file.
Feel free to share exactly what you are doing as well as your skill level with Windows directories. I don't want to sound condescending but we are wasting time if you don't understand what I am saying. I'd like to adjust if needed.
 

Edgelord77

New member
Yep I've done exactly as you asked, still the exact same error screen
I'm downloading from Jenkins
Has there been anyone else with this sort of error screen? If so how did they solve it
 

fronobulax

Developer
Staff member
Yep I've done exactly as you asked, still the exact same error screen
I'm downloading from Jenkins
Has there been anyone else with this sort of error screen? If so how did they solve it

Everyone else who has had it had some kind of permission problem where mafia could not write a directory or a file. They solved it by changing directories to one where they had permissions or by running as a Windows Administrator.

Two things to try.

Start up mafia. Before you login use the General Menu option to open the gCLI. Switch back to the login screen and log in. After the failure let us know what, if anything is in the gCLI window.

AND

Open a command prompt and change the current directory to be the directory with the jar file.
Use the following command to run kolmafia, using the file name of your jar.

Code:
java -jar KoLmafia-xxxxx.jar

You want to notice messages that are written to the command console before you login. After capturing those you can try and log in and see what new messages occur.

I am trying to get more information than was in the screenshot. The part circled in red means you are not in a writeable directory but I can't figure out why.


Screenshot (7).png
 

Edgelord77

New member
Ok cool so the problem was that Microsoft settings had a setting where the creation of files by "unreliable apps" or something like was restricted that so I turned it off and it worked
Thanks for helping
 
Top