Errors when saving and loading XML
-
Hey all, got a weird error just now when trying to save XMl: 'The embedded script files could not be saved (probably because the file is opened somewhere else). Press OK to show the folder and move it manually'
it just takes me to a folder in scripts folder called TempScriptDirectory containing JS files of my scriptnode FX and interface? It's a pretty important project. Does anyone know what this means or how to fix it?
Im also getting errors now when trying to load a project, it says 'Script not found' 'error loading script interface' (and all my script FX). After I click through the errors, I get to my project but the oninit interface is blank and the console says 'interface: onControl could not be parsed! (And again same for all my script FX)
My module tree and UI appears to be intact and all script FX still have correct routing and what not inside scriptnode, just seems to be effecting scripts?
Does anyone know how to fix this?
Any help would be greatly appreciated!
-
@JC This one's come up a few times before but I'm not sure we ever found a solution. Which commit are you using?
-
@David-Healey thanks for replying. I think i sorted it out. After a brief chat with Claude, it said:
This is a known HISE issue related to file locking - something (another program, antivirus, or even HISE itself) is preventing write access to your script files. Here's how to recover:
Immediate Recovery Steps
-
Close HISE completely
-
Check the TempScriptDirectory
Those JS files in Scripts/TempScriptDirectory are actually your current scripts - HISE puts them there when it can't save to the normal location. This is good news - your work exists.
- Manually restore the scripts
Navigate to your project's Scripts folder. You should see:
Your normal script files (possibly corrupted/empty)
TempScriptDirectory/ containing the working versionsCopy the files from TempScriptDirectory back to their correct locations:
ScriptProcessors/YourProject/Interface.js (or wherever your interface script lives)
Same for each ScriptFX- Check what's locking the files
Common culprits:
Cloud sync (Dropbox, OneDrive, iCloud) - if your project is in a synced folder, this is very likely the cause
Antivirus scanning the files
Text editor with the JS files still open
Git or other version control- Restart HISE and reload
Preventing This in Future
Don't keep projects in cloud-synced folders (or pause sync while working)
Close any text editors that have script files open before saving in HISE
Add your HISE projects folder to antivirus exclusionsI then proceeded to leave all my HISE folders and docs out of syncing with OneDrive, copied all the script files from the temp folders of all my projects, and pasted them into their respective 'normal' project script folders. Seems to be working with both saving and loading now.
-
-
@JC Not putting HISE projects in cloud-synced folders is a good tip!
-
@dannytaurus really is a good tip! I don't really understand though why it happened all of a sudden now though. It's been baking up and syncing with OneDrive for ages without mishap. Anyway, local backups and external drives from now on. I never liked the cloud!