You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This one's been in the codebase, practically since its inception. I've tried digging into it, but I can't seem to find out why the execution fails.
What ends up happening: The code will execute up past the .launch() command. The execution gets "buffered", until we terminate/close the StreamDeck Software. Then they will all immediately get executed.
The below CLI commands execute perfectly, it's only when we try to run a shortcut, that it "hangs". The fact that these execute tells me that this is a deep underlying problem… shortcuts list shortcuts list folders shortcuts list YourFolderName
I tried embedding another CLI-Helper tool, that just took the shortcut name & ran the actual shortcut via the CLI command, but that still had the same side effect.
I've tested & it appears that the only other work-arounds are saving to a text file & passively reading that, or implementing a WebSocket connection. This would require the helper app to be implemented, though.
The function below is where most of this happens. In the current codebase I've commented out the function until we find a fix.
If you'd like to test this out for yourself, or know how to fix this, you'll need to do the following:
Uncomment the launchCommand() function.
Under the keyDown() function inside the CounterPlugin class, in the streamdeck-backend.swift file, you'll need to replace that code with the appropriate `launchcommand().
Build & extract the StreamDeck-Shortcuts executable under your Products' folder in your Derived Data. Otherwise, you can build it as a Product & export the built product.
With the executable in hand, head on over to: ~Library/Application Support/com.elgato.StreamDeck/Plugins/com.sentinelite.streamdeckshortcuts.sdPlugin & replace the StreamDeck-Shortcuts file with the new one.
Lastly, open up the Console.app & search for StreamDeck-Shortcuts, start monitoring, & restart the SD Software!
If anyone has any pointers, or can attempt to fix this, I'm all ears!
shortcutCLI.standardOutput = pipe
NSLog("🔳 PT3.5!")
do{
NSLog("🔳 PT4.5!")
try shortcutCLI.launch() //Run doesn't work either. | .launch is deprecated.
NSLog("🚨 Execution hangs here until parent process ends...")
//None of the code below runs after the fact either, which makes sense.
let data = pipe.fileHandleForReading.readDataToEndOfFile()
NSLog("🔳 PT6.5!")
if let output = String(data: data, encoding: String.Encoding.utf8) {
NSLog("🔳 PT7.5!")
NSLog(output)
print("FinisheD Running!")
}
} catch {
// It refuses to throw an error, becuase it's waiting to execute, when the app closes?
NSLog("Failed to run with Error \(error)")
}
}
`
The text was updated successfully, but these errors were encountered:
This one's been in the codebase, practically since its inception. I've tried digging into it, but I can't seem to find out why the execution fails.
What ends up happening: The code will execute up past the
.launch()
command. The execution gets "buffered", until we terminate/close the StreamDeck Software. Then they will all immediately get executed.The below CLI commands execute perfectly, it's only when we try to run a shortcut, that it "hangs". The fact that these execute tells me that this is a deep underlying problem…
shortcuts list shortcuts list folders shortcuts list YourFolderName
I tried embedding another CLI-Helper tool, that just took the shortcut name & ran the actual shortcut via the CLI command, but that still had the same side effect.
I've tested & it appears that the only other work-arounds are saving to a text file & passively reading that, or implementing a WebSocket connection. This would require the helper app to be implemented, though.
The function below is where most of this happens. In the current codebase I've commented out the function until we find a fix.
If you'd like to test this out for yourself, or know how to fix this, you'll need to do the following:
launchCommand()
function.keyDown()
function inside theCounterPlugin
class, in thestreamdeck-backend
.swift file, you'll need to replace that code with the appropriate `launchcommand().~Library/Application Support/com.elgato.StreamDeck/Plugins/com.sentinelite.streamdeckshortcuts.sdPlugin
& replace the StreamDeck-Shortcuts file with the new one.StreamDeck-Shortcuts
, start monitoring, & restart the SD Software!If anyone has any pointers, or can attempt to fix this, I'm all ears!
`swift
func launchCommand (inputShortcut: String) {
let shortcutCLI = Process()
shortcutCLI.executableURL = URL(fileURLWithPath: "/usr/bin/shortcuts")
shortcutCLI.arguments = ["run", "(inputShortcut)"]
var pipe = Pipe()
`
The text was updated successfully, but these errors were encountered: