Have not been able to find a detailed description of error 316. Spawn failed suggest that this isn’t something wacky related to disk images but that it can’t even start the process. scanning the DMG? Are there security issues? My only guess is there are nuances to macOS I do not know yet. That is why diagnosing this has been particularly difficult.The entire updater process works when executed locally in a debugger (IntelliJ) executing the commands one line at a time.The open command line works when executed by hand.That error is incorrect, the file and directory exist.app with an error=2 No such file or directory. The hdiutil attach command line works when executed by hand.Also happens if the updater is executed manually. Three attempts are made separated by 1.5 seconds.Then it attempts to attach the update DMG.The thread waits 2.5 seconds for the download to settle.This is happening in the updater that was just downloaded and attached, after it downloads the update.Both programs are launched using a binary Java launcher from DMG Canvas.app and updater have an embedded OpenJDK JRE. The process uses the system temp directory retrieved with Java System.getProperty("java.io.tmpdir").Have not been able to find a detailed description of error 316.Java.io.IOException: Cannot run program "/usr/bin/hdiutil": error=316, spawn failed Or is there something basic that I'm missing?įor taking your time to read this.Is this all because the DMG images are not signed (yet), so hdiutil is failing?.Odd point - the initial download, mount and execution of the updater works.Have been unsure whether I would support macOS. When the Main program is restarted the unmount of the updater DMG failsĪlso - these are unsigned images at this point.The mounting of the downloaded update DMG fails.The initial download, mount, and execution of the updater works.The problems encountered are the mounting and unmounting of the DMG images executing hdiutil with Java Runtime.getRuntime().exec(). Main program receives special argument indicating success or failure of update.Either deletes back-up directories or restores them based on success or failure.Copies the new Java and Plugins directories to existing Main program locations.Makes back-ups of the Java and Plugins directories of existing program. The DMG image is the same one used for initial installations.Mounts new program DMG image in the system temp directory.Updater program downloads new Main program.Mounts updater DMG image with -mountroot in that directory.Main program downloads updater program into a system temp directory.Deliberately supporting older hardware due to the nature of the application. this is on a Macbook Pro 13" Retina Late 2013 2.8Ghz running macOS Big Sur 11.7.10 (fully updated). It has conditional logic based on the operating system.īut I'm stuck. Have my cross-platform self-contained Java application looking great on macOS with all the cool Mac conventions and a DMG "installer".Īm attempting to get the existing self-updater working for macOS. Have been using a Mac for about a month, but am a 48-year engineer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |