Compilation of "untitled" failed. (2016R3)

When I try to run again a project, I get a Msgbox :


Compilation of “untitled” failed.
A file system error occurred (#104) for “my Application debug”. If the
application already exists, please make sure that it is not currently running;
otherwise, please make sure that the destination directory is writable.

Obviously, the debug build is not deleted after run. I work on my local disk, and have not noticed that before. Is it due to 2016R3 or to Sierra, I don’t know.

Has anybody noticed the same issue ?

working on your local disk rules out the usual suspect, which is ‘working inside dropbox’ or similar.
I recall some similar posts a few years back where the previous build was being kept open by a Virus checker.
It may also not be quitting properly?

That problem must now be as old as Moses. I have a build script that deletes the old debug app which I surely have posted here a couple of times. PM me if you want the script.

Thank you.

[quote=288178:@Michel Bujardet]When I try to run again a project, I get a Msgbox :


Compilation of “untitled” failed.
A file system error occurred (#104) for “my Application debug”. If the
application already exists, please make sure that it is not currently running;
otherwise, please make sure that the destination directory is writable.

Obviously, the debug build is not deleted after run. I work on my local disk, and have not noticed that before. Is it due to 2016R3 or to Sierra, I don’t know.

Has anybody noticed the same issue ?[/quote]
Make sure the previous version isn’t still running. If it is, the build folder will be locked. Just ran into this myself yesterday.

I did check that of course. And that was not the case. I even checked in Activity Monitor to make sure.

I does seem that somehow Xojo does not succeed deleting the debug build. I saved in Documents, Downloads, same result.

What is strange is that the phenomenon occurs only with Web projects. Desktop does not have the issue.

Gr… why does old code always look embarrassing? I’ve been wondering why I’ve got sometimes problems with deleting the Pro version of my app. Now I know :slight_smile: .Here is the script for desktop as it is:

[code] dim dbg as String
if debugBuild then dbg = “.debug”
dim appNameForShell as string = PropertyValue(“App.MacOSXAppName”) + dbg +".app"
appNameForShell = replaceall(appNameForShell, " ", "\ ")

dim theCommand as String
theCommand = “ps -axwwopid,command | grep ‘Mail Archiver X .app’ | grep -v grep | awk ‘{print $1}’”
dim theResult as String
theResult = DoShellCommand(theCommand)
if theResult <> “” then
theCommand = "kill " + theResult
theResult = DoShellCommand(theCommand)
end if

dim CountSlashes as Integer = CountFields(ProjectShellPath, “/”)
dim ProjectName as string = NthField(ProjectShellPath, “/”, CountSlashes)
dim ProjectPath as String = Left(ProjectShellPath, Len(ProjectShellPath) - Len(ProjectName))

theCommand = "rm -rf " + ProjectPath + appNameForShell
theResult = DoShellCommand(theCommand)
if theResult <> “” then print theResult

function getShellString(theString as String) as string
Return ReplaceAll(theString, " ", "\ ")
end Function[/code]

So, you have a script for Web, and another for desktop, right ?

I picked this from another contribution for my web app but it does not delete the debug build :

[code] dim dbg as String
if debugBuild then dbg = “.debug”
dim appNameForShell as string
appNameForShell = PropertyValue(“App.MacOSXAppName”) + dbg +".app"
appNameForShell = replaceall(appNameForShell, " ", "\ ")

dim CountSlashes as Integer = CountFields(ProjectShellPath, “/”)
dim ProjectName as string = NthField(ProjectShellPath, “/”, CountSlashes)
dim ProjectPath as String = Left(ProjectShellPath, Len(ProjectShellPath) - Len(ProjectName))

dim theCommand as String
theCommand = "rm -rf " + ProjectPath + appNameForShell
dim theResult as String
theResult = DoShellCommand(theCommand)
if theResult <> “” then print theResult

function getShellString(theString as String) as string
Return ReplaceAll(theString, " ", "\ ")
end Function[/code]

My script is for desktop. I saw after posting that your project is for Web.

What is the result of the rm?

It does not delete anything…

But now that you mention it is for Desktop, I understand better. I will have a look at modifying it when I got spare time.

I just bought a used Mac. It was formatted with Sierra (Mac OS extended journaled and case-sensitive). I have the same problem as Michel, with my web projects (even without using Dropbox, and simply run debug on desktop destination). Yet the system has just been installed and I just downloaded the latest version of Xojo Mac R3.

For my part, I have no problem now! I have yet nothing changed I think, not even restart the computer. While yesterday, we had to remove the “debug” folder before each run. Today, it is not necessary, it is overwritten each time, as usual. Strange, I do not know why the behavior has changed.

+1 I’ve been running into this ever since I installed macOS Sierra dev betas. I thought it’d either be fixed by the new Xojo release or when the Sierra GM came out. Nope. I’ll have to look into the scripts above to see if they help. Such a pain.

Yes
We’ve filed a radar with apple about what we’ve found
Theres literally an OS process holding files busy so we cant delete them as we used to

I’ve had this problem as well.

I’m posting now because of something strange. I have two web apps that work together (one is for an administrator and the other for an employee). With the employee app I get this problem, with the admin app I don’t. On Sierra.

still happening in 4.1

And our Radar is still open with Apple
We have no way to force the OS to release them without killing OS level processes
Wish we did