I am wondering if you’ve ever experienced issues with scripts being cleared out / contents deleted.
I have seen it happening randomly but it causes scriptable to crash when trying to launch it, which I’m guessing is because it’s trying to parse the .js files that are blank inside and it doesn’t see the scriptable header
I am on iOS 16.5 beta but I do wonder if this has anything to do with the iCloud syncing issues that I’ve been seeing for some time. Files seem to offload more than they should (even files used frequently are being offloaded)
When the space on my iPhone was quite full, I too experienced aggressive off-loading of files by iCloud. It was so much that I had to write a small script (which was small enough so that it wasn’t off-loaded) to download the other scripts. At this time I only had about 1 GB left of free space.
So maybe try freeing some space? I think you should not have any problems, when you have at least 5-6 GB free.
I have seen that happen as well. The files aren’t being offloaded however, the script’s contents are being wiped out. For example, If I have a script named “Test.js”, I try loading Scriptable and noticed some issue that it wouldn’t open. I go look in the Scriptable folder in iCloud Drive and Test.js has recently been modified but now shows as a blank document.
I can’t find any pattern as to when this happens either.
FWIW my phone storage has a little more than 7 GB free
I too am having the same exact issue. I am running 16.6 and all of my scripts have been offloaded my device. I have tried to airdrop the scripts back from another device and was unsuccessful.
I am unable to even airdrop the Scripts from my back up phone to this phone. When I open the app, there are no script showing. But they are on my iCloud and will not download. I have uninstalled the application and reinstalled it and that did not fix the issue.
If you look at the scripts in iCloud Drive, are they blank files? That is what was causing my issue like that before. Removing those files allowed it to load properly
What happens if you try to open one of the files in another app on the same device? For example a text editor like Runestone or Textastic? Same error? Different error? No error?
That is curious, I would expect Textastic and Documents to be accessing the files in the same way. But the fact it is not just Scriptable having an issue accessing your files does suggest an issue outside of Scriptable.
Any clues in the “Get Info” for a Scriptable File in the files app?
Here’s an example for a file I have for Scriptable. Posting a screenshot of your result to confirm no issues would be useful too.
Okay, your JavaScript file is not on device, it is in the cloud. The cloud and arrow icon indicates that it is available for download, whereas in my screenshot I had the option to open the file because it was on the device.
Try downloading it and then opening it in Scriptable.