Android Question Build fails with source on NAS drive

Acuario

Active Member
Licensed User
Longtime User
I have just installed a NAS drive (asustor) on my home network to hold all my source files.
I have the drive mapped and have full read/write permission to the mapped drive.
I copied my source files to the new drive and checked they all had read/write permission.
When I try and build a project I get an error:
B4A Version: 11.00
Parsing code. (0.00s)
Java Version: 11
Building folders structure. (0.14s)
Compiling code. Error
Error compiling program.
Error description: Cannot create "S:\Android\B4A\Gate\Objects\src\ntp" because a file or directory with the same name already exists.
Error occurred on line: 33
End Sub
I tried deleting the Objects directory (as B4A creates this) but then I get other errors.

B4A Version: 11.00
Parsing code. (0.00s)
Java Version: 11
Building folders structure. (0.08s)
Compiling code. (0.05s)
Compiling layouts code. (0.02s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Compiling resources Error
bin\extra\compiled_resources\ntp.opengate.zip: error: The system cannot find the file specified. (2).

Then..
B4A Version: 11.00
Parsing code. (0.01s)
Java Version: 11
Building folders structure. (0.15s)
Compiling code. (0.05s)
Compiling layouts code. (0.01s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Compiling resources (0.09s)
Linking resources (0.23s)
Compiling generated Java code. Error
The directory name is invalid.
The project builds perfectly and without problem on a local drive.
 

MikeSW17

Active Member
Licensed User
Longtime User
What did you do to solve the second error [bin\extra\compiled_resources\ntp.opengate.zip: error: The system cannot find the file specified. (2).] to get to the 3rd error?
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
First thought that struck me: The NAS is probably some sort of Linux, which means that file names and paths are case sensitive. That could at least explain your second and last quote. Not sure if it would explain the first one though.
 
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
I suggest that the project is copied to somewhere on your computer hard drive and run it from there; use the NAS for backups instead.
 
Upvote 0

Acuario

Active Member
Licensed User
Longtime User
What did you do to solve the second error [bin\extra\compiled_resources\ntp.opengate.zip: error: The system cannot find the file specified. (2).] to get to the 3rd error?
I just ran the build a second time. It seems strange but on the second attempt the directory was created. Each compile seems to throw a different error until it gets stuck on the same error and doesn't progress.
 
Upvote 0

Acuario

Active Member
Licensed User
Longtime User
First thought that struck me: The NAS is probably some sort of Linux, which means that file names and paths are case sensitive. That could at least explain your second and last quote. Not sure if it would explain the first one though.
Certainly looks like it from the ui and some of the apps.
I would have thought that the build process, as it is the process that is creating the directories/files, would know the case that they are being created in and maintain that throughout the process - this is outside of 'our' control...
 
Upvote 0

Acuario

Active Member
Licensed User
Longtime User
I suggest that the project is copied to somewhere on your computer hard drive and run it from there; use the NAS for backups instead.
On my local machine it works perfectly. My objective was not to have multiple copies of source code in different places (I have several machines on my network I use for building/testing).
I use Visual Studio for other projects and that works quite happily with the NAS as a mapped drive.
 
Upvote 0

Acuario

Active Member
Licensed User
Longtime User
I suspect its a timing problem as the IDE deletes and recreates folders as well as files and this happens more slowly over the network, and probably at least partly asynchronously as well, so the IDE leaps ahead and the NAS can't keep up.
Maybe but that doesn't explain why I'm getting the 'The directory name is invalid.' error.
Is there a build log that shows the build progress as the compile window output gives no information?
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
I would give up and accept it won't work. Other people have found the same thing in the past. Here's a couple.
 
Upvote 0

Acuario

Active Member
Licensed User
Longtime User
I saw that but thought, hey, its years ago - maybe it's fixed - but not :-(
I've done all I can to try to find the problem and it seems to come down to the ide. I've tried different versions of Java (Oracle and OpenJDK) but both the same (almost) errors when the source files are on a NAS.
I checked the directory structure both before compiling and after and all the files - no differences. I can't go any further with my diagnosis.
A pity, it would have made life so much easier and also I guess for any team development.
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
It sounds like a very strange problem. I wonder what could be the underlying issue. The theory by agraham (a timing issue) sounds a bit unlikely to me, but on the other hand I can't come up with a better theory.
 
Upvote 0
Top