The 9164 line is the require line that indicates it is looking for the library file in the Scripts
directory for Drafts.
require(tadLib.cryptoLibName + ".js");
In the TAD-Setup/Refresh
action’s script step (the only step), there are some lines that set up some information about the crypt library.
const CRYPTO_URL = "https://tadpole.thoughtasylum.com/assets/library/crypto-js.js";
const CRYPTO_NAME = "crypto-js";
That first line specifies the URL where you can download the file.
Can you check that these lines are in the action and that you are therefore running the refresh action from the right version of the action group?
Towards the end of the code there’ a line that makes a call to download the file.
objHTTP.TA_updateCryptoLibrary();
This utilises the following function which uses the same code as the tad
and beautifier
libraries
// Save a copy of the minified crypto-js library file to the Drafts library scripts folder.
HTTP.prototype.TA_updateCryptoLibrary = function()
{
return this.TA_downloadLibrary(CRYPTO_URL, CRYPTO_NAME);
}
That hasn't changed in months and I can see the crypto file at the URL specified.
Everything I can see indicates that it should be copying it down into the folder.
But, I have a few suggestions you can try:
1. Local Refresh
If you have refreshed on a different device, sometimes, but certainly not every time, iCloud sync gets lazy and does not keep things in sync as much as it should. I’ve had it open a few times with files in the Drafts folder structure when I’ve been testing across devices. To rectify that, you can run the refresh on any device any time and it should force a refresh of the local copy; which should then propagate out to other devices vi iCloud sync.
Give the obfuscate action a try again.
2. Check the File and Open It
Another iCloud issue is that sometimes the files it has are really just placeholders. I’ve only seen it as part of the sync issue above, but, there may be other occasions on which it occurs.
If you navigate to the scripts folder in iCloud, and open the file in an app to view it, that forces iCloud to get a copy from cloud storage if it has not already done so.
Give the obfuscate action a try again.
3. Manually Copy the File
If the file isn’t being copied I would like to understand why, but we can manually put the file in place. Copy the file content from https://tadpole.thoughtasylum.com/assets/library/crypto-js.js and paste them into a new file in your Drafts Scripts folder called crypto-js.js
.
Give the obfuscate action a try again.
Hopefully something like that will help, but if this fundamentally isn’t an iCloud sync issue, I would like to get to the bottom of what’ going on. The download functionality is common to all of the library files the refresh action retrieves and they are all stored in the same directory on GitHub, so I’m struggling to think of why it wouldn’t be getting copied or the refresh action is out of date even though the rest of the action groups are in date unless you haven’t updated the core action group and thus the refresh action.
Hope that helps, and do let me know how you get on.