I have tried everything. I tried the official TestProgram.java that is shipped with JProfiler, and also tried playing around with all available functions in the Controller class myself. I ensured that the JProfiler GUI was attached at jvm startup by using the agentpath VM parameter. I also tried connecting JProfiler later either with the GUI or with jpenable.
The result is always the same. No error is thrown. The produced .jps file contains telemetry data, cpu recording data (if I enabled CPU recordings) allocation data (if I enabled allocation recording), and even any thread dumps I triggered. But even though I call Controller.triggerHeapDump, and even though that runs without error, the heap dump data is never actually saved into the snapshot file.
The JProfiler version I am using is 13.0.7. I have tested this on both my local mac machine and a remote linux machine, and the result is the same. Heap data is never saved. When I go to the "Heap Walker" in the snapshot, it says "No snapshot has been taken".
I can take heap snapshots manually with the JProfiler GUI just fine. No problems there, and it will always save correctly into the snapshot if I clicked "Take snapshot" manually in the GUI.