Bug - Won't Fix macOS 10.12.5 won't run r18124 - "unidentified developer"

Running macOS Sierra 10.12.5, when I try to open KoLmafia-18124.jar, I get "KoLmafia-18124.jar" can't be opened because it is from an unidentified developer."

I realize that I can circumvent the warning, but I'm wondering what changed to cause it.
 
Last edited:

fronobulax

Developer
Staff member
Change is a relative term so "change compared to what"? If you are comparing to "recent" builds, perhaps something happened on the build server?

This thread notes some issues with the build server which were resolved June 30.
 
Change is a relative term so "change compared to what"? If you are comparing to "recent" builds, perhaps something happened on the build server?
Yes, sorry - I should have been more explicit. I had not seen this behavior with other builds over the last 2 days or so.

My question is why you are only just now seeing this, instead of having it show up about 3(?) years ago.
I don't follow. What am I missing?
 

Veracity

Developer
Staff member
Nothing has changed in the code or build.xml.

How are you getting the .jar file?

- from builds.kolmafia.us?
- making it yourself?
- somewhere else?

If you are downloading from somewhere, what is the last revision you downloaded that works, such that revision+1 no longer works?

Builds on this site were broken for a few days. Fewyn fixed them recently. Hard to imagine how the newly fixed build process is making a .jar file which suddenly starts failing on OS X Sierra 10.12.5.

(That's the version I run, by the way, and I have no problem running my own .jar files. Never tried downloading somebody else's.)
 

Veracity

Developer
Staff member
I just went and downloaded 3 random .jar files from the builds here.
When I double clicked on them in the Finder, every single one gave the error message you reported.
When I ran them from the Terminal via "java -jax xxx", all worked, as expected.

This is going to be a "won't fix". I'm not interested in getting a Developer ID for $100/year (or whatever) and changing the build process to somehow tag the .jar file with that ID.
 
On further investigation, this does appear to be a local issue... I'm still hoping that someone here, with more expertise, can help me debug. But maybe this would be more appropriately moved to Community Support. Thanks for your help so far.

How are you getting the .jar file?
From builds.kolmafia.us.

If you are downloading from somewhere, what is the last revision you downloaded that works, such that revision+1 no longer works?
I ran r18117 multiple times yesterday, with no issue. Today, that same revision doesn't work. When double-clicking it in Finder, the typical Mafia window opens (with my username and password) and the status line reads "Sending login request..." for a few seconds. Then the status changes to "Requests complete." The typical interface with the gCLI, etc never opens. This is the same behavior that I see when using r18124 and bypassing the "unidentified developer" message by reopening the .jar in System Preferences > Security & Privacy > General tab. Running from the Terminal with "java -jax filename" also produces the same behavior.

Is there a way I can get a debug log, or similar, that would give more information about what Mafia's doing/not doing/trying and failing to do during this time?

I have not often run Mafia on my MacBook in the past - typically, I play on a Windows machine. I'm running from a Dropbox folder, with a symlink from ~username/Library/Application Support/KoLmafia -> /path/to/dropbox/directory, to keep things synchronized between the two. This all worked as expected, as of yesterday. Downloading the .jar to a location outside of my Dropbox folder didn't make any difference, so I don't think that Dropbox is causing the issue.

I tried uninstalling Java, per the instructions at java.com, and reinstalling, but that didn't make any difference.
 

xKiv

Active member
If the only thing that changed is "today's date" ... maybe validity of something used (like a signing certificate [1]) expired?

[1] If so, I have no idea how to find which certificate (or even what certificates are involved) or how to replace it, of course.
 
Any chance that Apple pushed a stealth update that flipped your Gatekeeper settings back to the default?

Possibly. But in one of the threads you linked, Veracity posted that "Your solution is, as Theraze pointed out, is to simply use the .jar file rather than the .app file." I'm already using the .jar, so I shouldn't run into that issue - right? Or am I misunderstanding?

As I outlined in my more-recent post in this thread, I think there's something going on that's deeper than Gatekeeper blocking the app from running in the first place. When I authorize the app in System Settings, I'm able to get it to open, but I'm not actually able to log in. Mafia moves directly from "Sending login request..." to "Requests complete."
 

lostcalpolydude

Developer
Staff member
Is there a way I can get a debug log, or similar, that would give more information about what Mafia's doing/not doing/trying and failing to do during this time?

You might get more information from using Terminal to open it, using "java -jar KoLmafia-whatever.jar", and seeing if anything else is printed.
 

Veracity

Developer
Staff member
I'll take a look at that, but I (feel) certain that nothing has changed in KoLmafia recently.
I'll try exactly what you did, at least, and see if I can understand it.
 

xKiv

Active member
When I authorize the app in System Settings, I'm able to get it to open, but I'm not actually able to log in. Mafia moves directly from "Sending login request..." to "Requests complete."

Another diagnostic to try: backup your .kolmafia folder, and try running with a clean one
(in other words, *rename* the .kolmafia folder, so mafia has to create a new one).

(and as an example wild guess, one of many possible problems is that the GUI window *did* open, but offscreen)
 

fronobulax

Developer
Staff member
I ran r18117 multiple times yesterday, with no issue. Today, that same revision doesn't work. When double-clicking it in Finder, the typical Mafia window opens (with my username and password) and the status line reads "Sending login request..." for a few seconds. Then the status changes to "Requests complete." The typical interface with the gCLI, etc never opens. This is the same behavior that I see when using r18124 and bypassing the "unidentified developer" message by reopening the .jar in System Preferences > Security & Privacy > General tab. Running from the Terminal with "java -jax filename" also produces the same behavior.

I don't know if this is a red herring or whether it points in another direction. Windows 10 using a jar file built locally.

I double click to launch, enter name and password, they are accepted, the login screen displays "Requests Complete" and I wait and wait for the other tabs to open. Nothing indicates the Java process is consuming any resources.

I end KoLmafia by pressing the X in the upper right, relaunch and things behave as expected.

I have seen this enough times before to believe it is not a recent mafia thing. I have not seen it enough to try and report it before.

I need to remember thread monitors and other debugging tools that can be deployed after Java is running because that is what I should have done and didn't. Next time.
 

fronobulax

Developer
Staff member
Happened again. Generated the following trace but I'm late for an appointment so have not looked at it yet.

Code:
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\CafeBabe>jps
7392 KoLmafia-18126.jar
636 Jps

C:\Users\CafeBabe>jstack 7393
2017-07-03 09:32:43
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode):

"LocalRelayCombatThread" #21 daemon prio=5 os_prio=0 tid=0x000000001f0c1000 nid=0x287c in Object.wait() [0x0000000025b5f000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000006c3125640> (a net.sourceforge.kolmafia.utilities.PauseObject)
        at java.lang.Object.wait(Unknown Source)
        at net.sourceforge.kolmafia.utilities.PauseObject.pause(PauseObject.java:57)
        - locked <0x00000006c3125640> (a net.sourceforge.kolmafia.utilities.PauseObject)
        at net.sourceforge.kolmafia.webui.RelayAutoCombatThread.run(RelayAutoCombatThread.java:70)

"DestroyJavaVM" #20 prio=5 os_prio=0 tid=0x0000000002500800 nid=0x1850 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"TimerQueue" #18 daemon prio=5 os_prio=0 tid=0x0000000022de0000 nid=0xe20 waiting on condition [0x00000000235af000]
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000006c30ab8b0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(Unknown Source)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
        at java.util.concurrent.DelayQueue.take(Unknown Source)
        at javax.swing.TimerQueue.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

"AWT-EventQueue-0" #17 prio=6 os_prio=0 tid=0x000000001f4c1800 nid=0x2b64 waiting on condition [0x00000000234ae000]
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000006c3115b38> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(Unknown Source)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
        at java.awt.EventQueue.getNextEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

"AWT-Windows" #13 daemon prio=6 os_prio=0 tid=0x000000001f0e1800 nid=0x126c runnable [0x000000001fa8f000]
   java.lang.Thread.State: RUNNABLE
        at sun.awt.windows.WToolkit.eventLoop(Native Method)
        at sun.awt.windows.WToolkit.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

"AWT-Shutdown" #12 prio=5 os_prio=0 tid=0x000000001f2f8800 nid=0x23b4 in Object.wait() [0x000000001f98f000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000006c310c810> (a java.lang.Object)
        at java.lang.Object.wait(Unknown Source)
        at sun.awt.AWTAutoShutdown.run(Unknown Source)
        - locked <0x00000006c310c810> (a java.lang.Object)
        at java.lang.Thread.run(Unknown Source)

"Java2D Disposer" #11 daemon prio=10 os_prio=2 tid=0x000000001f2f5800 nid=0x2974 in Object.wait() [0x000000001f88e000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000006c30ce4e8> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        - locked <0x00000006c30ce4e8> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        at sun.java2d.Disposer.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

"Service Thread" #10 daemon prio=9 os_prio=0 tid=0x000000001e027000 nid=0x2be8 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread3" #9 daemon prio=9 os_prio=2 tid=0x000000001df9d000 nid=0x1efc waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread2" #8 daemon prio=9 os_prio=2 tid=0x000000001df8e000 nid=0x2134 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x000000001df8b800 nid=0x28b0 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x000000001df88800 nid=0x2c98 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x000000001df86800 nid=0x1e4c waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x000000001c08e800 nid=0x2520 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=1 tid=0x000000001df80800 nid=0x1b60 in Object.wait() [0x000000001e45f000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000006c2e6fd00> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        - locked <0x00000006c2e6fd00> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

"Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x000000001c07d000 nid=0xf0c in Object.wait() [0x000000001df5e000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000006c3253a60> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Unknown Source)
        at java.lang.ref.Reference.tryHandlePending(Unknown Source)
        - locked <0x00000006c3253a60> (a java.lang.ref.Reference$Lock)
        at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)

"VM Thread" os_prio=2 tid=0x000000001c079000 nid=0x26f0 runnable

"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x0000000002516800 nid=0x33dc runnable

"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x0000000002518000 nid=0x27c0 runnable

"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x0000000002519800 nid=0x2798 runnable

"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x000000000251c000 nid=0x20 runnable

"GC task thread#4 (ParallelGC)" os_prio=0 tid=0x000000000251d800 nid=0x2fa4 runnable

"GC task thread#5 (ParallelGC)" os_prio=0 tid=0x000000000251e800 nid=0x3358 runnable

"GC task thread#6 (ParallelGC)" os_prio=0 tid=0x0000000002522800 nid=0x27dc runnable

"GC task thread#7 (ParallelGC)" os_prio=0 tid=0x0000000002524000 nid=0x500 runnable

"VM Periodic Task Thread" os_prio=2 tid=0x000000001e048800 nid=0x25ac waiting on condition

JNI global references: 521


C:\Users\CafeBabe>
 

Veracity

Developer
Staff member
I control-clicked on the name of the jar file in a Finder window
I selected "Open With" and selected "Jar Launcher (default)"
It displayed the "your security settings don't allow this" dialog, but it had an "Open" button
I clicked Open and KoLmafia started up and gave me the Login frame
I used the Menu to get the gCLI frame
I typed "debug on" and closed that frame
I logged in with no problem from the Login frame.

Had I had a problem, the DEBUG log would have told me something.
Perhaps you can do the same thing and get a DEBUG log.
 

fronobulax

Developer
Staff member
Did not see the freeze after requests completed since the suggestion to turn debug on.

I try logging in with Debug On just because. I may have gotten a different freeze. I have a script that iterates through items and gets data from the Wiki for some of them. It has frozen or taken lots of time often enough that the script emits a progress line. It stayed at the same line for five minutes wall clock time so I aborted. The debug log was about 300 MB of char requests. It appeared to alternate between two sets of parameters but there was no sign of a request going to the wiki after the last one nites in progress.

This character had the Chat Tab open on startup because I am using Faxbot daily and like.want/need the feedback that the request was successful. I removed Chat from Start Up and have yet to see anything I would describe as a freeze or too long for my patience since.

I doubt that Chat is related to the freeze after Requests Complete because I got that one on a characters who has never visited the Altar of Literacy and thus cannot chat.
 
Alright, I have to offer a big apology for all the confusion I generated here.

It turns out that my bug on login ("Sending login request..." for a few seconds, then "Requests complete" with no transition to the main interface) was caused by my antimalware software (Kaspersky Internet Security). Some recent update caused it to start blocking Mafia, and apparently some components of it keep running even when it looks like it's shut down, which is what caused me not to consider it in the first place. (Disabling Kaspersky was one of my first troubleshooting steps). I've been mostly away from the game for the last week, and only now had time to dig in further. With Kaspersky totally turned off, Mafia runs as expected.

I don't know exactly how that relates to the other issues reported by fronobulax and anyone else, but this seems to be the root cause of my original report. Not A (Mafia) Bug.
 
Top