For once, the location is in the temp folder and not in Dropbox. The files have a random file name because it’s the first step when creating PDF files.
The macOS thinks that this file is an Alias and is treating it at such, but appears to be crashing when trying to resolve the alias. Are you expecting aliases in this folder?
If not, then use folderitem.child( name, false ) so you get the Alias file and not the resolved alias. If you are expecting Aliases (App Wrapper uses Aliases for all kinds of things), then you really need more information about this file as I would hazard a guess in that either Xojo is building the NSURL incorrectly (file name issues) or there is a fundamental issue with that file to which the OS can not handle.
To validate this, you’re going need a copy of the Alias file, and even then you may not be able to reproduce it on your system, but if you can, hopefully you can trap the error.
Like the last time there is no alias involved. I create all the files.
Private Function getFile(parentFolderItem as FolderItem, theName as string, doFolder as Boolean) As Folderitem
'get a folderitem to be used for the print report
theName = theName.Trim
'dim theFileNo as integer
dim theFolderitem as folderitem
dim theFileNo as Integer
if parentFolderItem = nil then
'nothing to do
elseif not doFolder or PDFStructure = 0 then
theFolderitem = parentFolderItem.Child(theName + ".pdf")
while theFolderitem <> nil and theFolderitem.exists
theFileNo = theFileNo + 1
theFolderitem = parentFolderItem.Child(theName + " " + str(theFileNo) + ".pdf")
wend
ElseIf doFolder then
theFolderitem = parentFolderItem.Child(theName)
while theFolderitem <> nil and theFolderitem.exists
theFileNo = theFileNo + 1
theFolderitem = parentFolderItem.Child(theName + " " + str(theFileNo))
wend
end if
exception exc
theException = new ErrorException(exc, currentMethodName)
finally
return theFolderitem
End Function