Scriptable randomly deleting script contents

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

1 Like

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.

Are the script files there, just empty? That was the case for me. Thankfully I have a backup script I use from time to time so I could restore them.

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

The files are listed in iCloud but when I click on them I get this error message

Oh my. That seems like a slightly different issue, but definitely a problem none the less. Are all script files doing this?

All scripts are still missing and I’m not able to add any scripts

Are you able to open the app? And all the scripts in iCloud Drive are gone?

I am able to open the app.
All of the scripts on iCloud are there.
They just do not load back onto the app on this device.

I just updated the iOS to 16.6 beta 2 and it did not fix the issue.

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?

Interesting. I can not see them in textastic either.
But… I can see them all in the app DOCUMENTS and can edit there.

Nothing will import to Scriptable.

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.

This does seem strange. I wonder if Runestone has the same issue with opening the file?

Hello Everyone!
I am including a screenshot of the get info button for 1 of the files.

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.

Thank you. However I am not able to download to device? Does that mean there’s not enough room on my device? I get the message that is attacjed

The scripts are also downloaded to my backup device and work perfectly fine.

Is your device full on storage?