Change the colon to a dot in LrTasks.startAsyncTask.
Same error message.
How do I determine when to use a colon and when to use a dot? I've programmed quite a bit in Lua, but not with "classes."
Short version: If you're accessing the namespace directly (i.e LrTasks.startAsyncTask), use a period.
If you're accessing an object that was created for you by some part of the SDK (i.e. exportSession:removePhoto), use a colon.
Ok, thanks. Any thoughts to the original error, though? Where is "startAsyncTaskWithContext" even being called that I'm not specifying a "name" parameter? It seems like something I'm using is calling it, but I can't figure out what and/or where/how to fix it.
Sure. In Lua, using the : operator has the effect of repeating the value to the left of the colon as a hidden first argument to the function.
So when you were calling LrTasks:startAsyncTask( function() ... end), what you were essentially doing was calling LrTasks.startAsyncTask( LrTasks, function() ... end ).
I don't have the docs in front of me at the moment, but I believe startAsyncTask accepts an extra argument, which, in this case, turned out to be of the wrong type. The error message could perhaps be better.