XCode: The file “[APP NAME].app” couldn’t be opened because there is no such file - objective-c

For context, I am encountering this immediately after resolving this issue:
Xcode error: unable to create directory '/[PATH_TO_APP]/[APP_NAME].app' (in target '[TARGET]' from project '[PROJECT]')
Here is the full error details text (with redactions in [] for privacy):
Details
The file “[APP NAME].app” couldn’t be opened because there is no such file.
Domain: NSCocoaErrorDomain
Code: 260
Failure Reason: The file doesn’t exist.
User Info: {
NSFilePath = "/[APP NAME].app";
}
--
The operation couldn’t be completed. No such file or directory
Domain: NSPOSIXErrorDomain
Code: 2
Failure Reason: No such file or directory
--
System Information
macOS Version 10.15.5 (Build 19F101)
Xcode 11.5 (16139)
Running ls -l in the project folder shows the [APP NAME].app now present, but navigating to the same location and selecting the file in Finder shows a "crossed out circle" over the app's icon. Removing the file and building again results in the same thing. I've also tried renaming the project and restarting, etc, to no avail.

NSFilePath = "/[APP NAME].app" feels like a missing or misspelled environment variable.
If the build expects custom environment variable like $(MyBuildDir) to be defined, when it's not, then running a command with $(MyBuildDir)/[APP NAME].app would result in "/[APP NAME].app"
The same is true for if the environment variable misspelled. For example, using $(UBILD_DIR)/[APP NAME].app instead of BUILD_DIR would result in "/[APP NAME].app"

Related

Xcode GoogleCast problem with CFBundleExecutable at Archieve App

Hello I'm Making a Sound App integrated with ChromeCast in Obj-C. I use ChromeCast 4.4.7 dynamic SDK.
I use the manual method adding the SDK, and everything works fine. The app Connects with Chromecast and sends info.
The problem is what I want to Achieve the Project, using the strip_unused_archs.sh joined with the SDK. I've got 6 errors.
I Paste them
The domain/default pair of (/Users/juanjocontreras/Library/Developer/Xcode/DerivedData/WMYA_Radio-fzjavmckasiwebglravdbxefwoel/Build/Intermediates.noindex/ArchiveIntermediates/WMYA/Info.plist, CFBundleExecutable) does not exist
Removing unused architectures from framework:
fatal error: lipo: can't open input file: /Users/juanjocontreras/Library/Developer/Xcode/DerivedData/WMYA_Radio-fzjavmckasiwebglravdbxefwoel/Build/Intermediates.noindex/ArchiveIntermediates/WMYA/ (No such file or directory)
fatal error: lipo: can't open input file: /Users/juanjocontreras/Library/Developer/Xcode/DerivedData/WMYA_Radio-fzjavmckasiwebglravdbxefwoel/Build/Intermediates.noindex/ArchiveIntermediates/WMYA/_armv7 (No such file or directory)
mv: rename /Users/juanjocontreras/Library/Developer/Xcode/DerivedData/WMYA_Radio-fzjavmckasiwebglravdbxefwoel/Build/Intermediates.noindex/ArchiveIntermediates/WMYA/_thinned to /Users/juanjocontreras/Library/Developer/Xcode/DerivedData/WMYA_Radio-fzjavmckasiwebglravdbxefwoel/Build/Intermediates.noindex/ArchiveIntermediates/WMYA/: No such file or directory
2020-05-18 16:11:30.130 defaults[10081:96863]
The domain/default pair of (Radio/InstallationBuildProductsLocation/Applications//Ibiza1Radio.app/Frameworks/GoogleCast.framework/Info.plist, CFBundleExecutable) does not exist
Removing unused architectures from framework:
fatal error: lipo: can't open input file: Radio/InstallationBuildProductsLocation/Applications//Ibiza1Radio.app/Frameworks/GoogleCast.framework/ (No such file or directory)
fatal error: lipo: can't open input file: Radio/InstallationBuildProductsLocation/Applications//Ibiza1Radio.app/Frameworks/GoogleCast.framework/_armv7 (No such file or directory)
mv: rename Radio/InstallationBuildProductsLocation/Applications//Ibiza1Radio.app/Frameworks/GoogleCast.framework/_thinned to Radio/InstallationBuildProductsLocation/Applications//Ibiza1Radio.app/Frameworks/GoogleCast.framework/: No such file or directory
Any idea of what can I do to Archive and publish the app?
Thnx to all of U

Errors Creating App Package (UWP, Appx) - fatal error CMF1106: failed to open input PDB file for reading

I'm getting errors when Creating App Packages for a UWP Win 10 application.
On my machine the error is:
C:\Users\Developer\.nuget\packages\nodatime\2.4.0\lib\netstandard2.0\NodaTime.pdb : fatal error CMF1106: failed to open input PDB file for reading (PDB error code = 11)3 input PDB file is not generated by /DEBUG:fastlinkW must read and agree to the Data Collection Policy at MSPDBCMF : fatal error CMF1000: internal error
The pdb file exists in the mentioned directory: C:\Users\Developer\.nuget\packages\nodatime\2.4.0\lib\netstandard2.0
On a hosted VSTS build the error message is even more cryptic:
C:\Users\VssAdministrator\.nuget\packages\nodatime\2.4.0\lib\netstandard2.0\NodaTime.pdb : fatal error CMF1106: failed to open input PDB file for reading (PDB error code = 11)3 input PDB file is not generated by /DEBUG:fastlinkW must read and agree to the Data Collection Policy at ??? before using /errorreport:send1 warning treated as error; the PDB file is intact# specified output filename is too long (exceeding 0 characters)
Note 1: On my machine the package is actaully successfully created but on the VSTS build the step fails as it detects the error in logs and stops.
Note 2: I'm pretty sure this is not NodaTime specific. This is about something else...
My msbuild switches are:
/p:AppxBundlePlatforms="$(BuildPlatform)"
/p:AppxPackageDir="$(Build.ArtifactStagingDirectory)\AppxPackages\"
/p:AppxBundle=Never
/p:UapAppxPackageBuildMode=StoreUpload
I am now trying with extra /p:DebugSymbols=false /p:DebugType=None, but even if it fails, I would like to understand and eliminate the 'fastlink' errors.
Explicitly setting DebugType to pdbonly worked in my case, but not sure if you need portable debug symbols or not, so this might not be an option for you.
<PropertyGroup>
<DebugType>pdbonly</DebugType>
</PropertyGroup>

facing this error while building a project in xcode

facing this error while building a project in xcode
warning: unable to merge a subprocess's serialized diagnostics
error: unable to open output file '/Users/s-09/Library/Developer/Xcode/DerivedData/ls-cujvtldtpxrezhdhbujnmfcrntjl/Build/Intermediates/CordovaLib.build/Debug-iphoneos/CordovaLib.build/Objects-normal/armv7/CDVPluginResult.o': 'Error opening output file '/Users/s-09/Library/Developer/Xcode/DerivedData/ls-cujvtldtpxrezhdhbujnmfcrntjl/Build/Intermediates/CordovaLib.build/Debug-iphoneos/CordovaLib.build/Objects-normal/armv7/CDVPluginResult.o': Input/output error'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
Cleaning the /DerivedData made it work
Can I safely delete contents of Xcode Derived data folder?
I have also faced that problem. I have closed, restarted Xcode; deleted the application from device and reinstalled it again, then the problem has gone.
Make sure the library and project files is truly included if it is not include it shows in red color in this type of case some time it is in original folder and not in project so delete it and add it again.

F4 IDE gives "Invalid Uri scheme for local file" when running Fantom app

I started a very simple project using Xored's F4 IDE for Fantom. The first few times I ran it there was no error, but I started adding dependencies (fanbatis) and at some point the error below starting showing up every time I run a test or a dummy Hello World app.
[23:44:18 22-Nov-13] [err] [pathenv] Cannot parse path: C:\dev\f4workspace\auth\bin\fan
sys::ArgErr: Invalid Uri scheme for local file: c:\dev\f4workspace\auth\bin\fan/
fan.sys.LocalFile.uriToFile (LocalFile.java:64)
fan.sys.File.make (File.java:26)
util::PathEnv.parsePath (PathEnv.fan:47)
fan.sys.List.each (List.java:555)
util::PathEnv.parsePath (PathEnv.fan:43)
util::PathEnv.make$ (PathEnv.fan:22)
util::PathEnv.make (PathEnv.fan:20)
java.lang.reflect.Method.invoke (Unknown)
fan.sys.Method.invoke (Method.java:559)
fan.sys.Method$MethodFunc.callList (Method.java:198)
fan.sys.Type.make (Type.java:246)
fan.sys.ClassType.make (ClassType.java:110)
fan.sys.Type.make (Type.java:236)
fan.sys.Sys.initEnv (Sys.java:447)
fan.sys.Sys. (Sys.java:224)
fanx.tools.Fan.execute (Fan.java:28)
fanx.tools.Fan.run (Fan.java:298)
fanx.tools.Fan.main (Fan.java:336)
Hello, World!
It is more a nuisance at the moment because the tests and the dummy app still run. I created another project, copying all the source code adding class by class and testing after each change and the error never occurred. Any ideas please?
That's an interesting issue!
tl/dr: you have an empty project 'auth' in your workspace, either create some dummy class inside it or go to Run -> Run configurations, find your launch config and uncheck project without sources on 'Projects' tab.
In order to keep your Fantom installation clean from projects in a workspace, F4 puts built pods into project/bin/fan/lib/fan. When F4 launches projects from workspace, it uses PathEnv and builds FAN_ENV_PATH by joining paths to Fantom installation and bin/ folders in projects in workspace.
When Fantom runtime analyzes FAN_ENV_PATH, at first it interprets a path as native OS path, but if dir does not exist, it attempts to interpret it as file URI, here's relevant part of PathEnv source:
path.split(File.pathSep[0]).each |item|
{
if (item.isEmpty) return
dir := File.os(item).normalize
if (!dir.exists) dir = File(item.toUri.plusSlash, false).normalize
if (!dir.exists) { log.warn("Dir not found: $dir"); return }
The problem code is item.toUri – On Mac OS X and Linux this is parsed as an URI without scheme with path only, so if directory does not exist, this code just prints a warning in a console.
But on Windows, because of disk name in path, disk name is interpreted as scheme:
fansh> "C:\\Users".toUri { echo(path); echo(scheme) }
[\Users]
c
fansh> "/Users".toUri { echo(path); echo(scheme) }
[Users]
null
And then File constructor fails, because expects either 'file' scheme, or null scheme:
public static java.io.File uriToFile(Uri uri)
{
if (uri.scheme() != null && !uri.scheme().equals("file"))
throw ArgErr.make("Invalid Uri scheme for local file: " + uri);
return new java.io.File(uriToPath(uri));
}
I've created an issue here, so that F4 would automatically skip empty projects when building FAN_ENV_PATH – https://github.com/xored/f4/issues/25.
I thought the problem had something to do with the forward slash at the end of path as shown in this line of the error message
Invalid Uri scheme for local file: c:\dev\f4workspace\auth\bin\fan/
However, I found that such path didn't exist. I manually created both the bin and the fan folders and the error disappeared. To be honest I don't really know why F4 needs and checks for that folder because so far it hasn't written any file in it.

arm-none-symbianelf-ld throwing "No Such File or Directory" error looking for file [...].GCCE.UREL.objects.via when building project

Im using Carbide C++ 2.3.0 to build a Flash Stub project with S60)5th_Edition_SDK-v1.0 Phone Release (GCCE) set as build configuration. I have installed Perl and JRE and the CSL toolchain (GCCE), and Ive manually updated the Windows PATH variable to point to GCCE/bin.
When I create my project according to - this article and click build I get only the following error message -
#\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\Symbian\Carbide\workspace\*[name]\*group\*[NAME]*\GCCE\*[name]*_0xECB9C23A.GCCE.UREL.objects.via: No such file: No such file or directory
The console output is -
arm-none-symbianelf-ld: #\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\Symbian\Carbide\workspace\name\group\NAME\GCCE\name_0xECB9C23A.GCCE.UREL.objects.via: No such file: No such file or directory
make[1]: *** [\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\release\gcce\urel\name_0xECB9C23A.exe] Error 1
make: *** [TARGETCUEMEMMOB] Error 2
My errors log panel shows that Perlv5.6.1 was not detected (i installed strawberry perl 5.10.1) should this matter?
I have checked that the EPOCROOT is set correctly and navigated in windows explorer to the file that cannot be found and I can see it there.
I cannot find any help with this on the nokia forums.
Yes, it matters.
The recommended perl implementation is ActivePerl 5.6.1, available from activestate.com