Appcelerator liveview build fails for "development" deployment with appc CLI - appcelerator

I'm using the latest tooling (as below) to build my project with the command
appc ti build -p ios -T device -D development --liveview
All generally works as expected until I quit the liveview session and attempt to build with the same command again.
Failed Output:
[INFO] App thinning disabled, skipping asset image sets
[INFO] Processing JavaScript files
An uncaught exception was thrown!
ENOTDIR: not a directory, open '/Users/gb/Documents/Work/Project/workspaces/appcelerator/Project/build/iphone/build/Products/Debug-iphoneos/Project.app/project/controller.js'
ENOTDIR: not a directory, open '/Users/gb/Documents/Work/Project/workspaces/appcelerator/Project/build/iphone/build/Products/Debug-iphoneos/Project.app/project/controller.js'
If I then attempt to build again I get this output...
[INFO] Processing JavaScript files
[INFO] Writing app properties
[INFO] Writing i18n files
[INFO] Processing Titanium symbols
[INFO] Removing files
[INFO] Optimizing .plist and .png files
[INFO] Invoking xcodebuild
[ERROR] ** BUILD FAILED **
[ERROR] The following build commands failed:
[ERROR] GenerateDSYMFile build/Products/Debug-iphoneos/Project.app.dSYM build/Products/Debug-iphoneos/Project.app/Project
[ERROR] (1 failure)
This output will be the same on each subsequent attempt to build
By chance, I found that if I reboot my machine I can build again, so I attempted all sorts of workarounds (cleaning build folders, derived data in xcode, restarting appc studio, building in studio....) to no avail, but eventually found a best case undesirable workaround to this issue in the form of:
appc logout
appc login
If I then attempt to build again it will succeed!
I can only assume therefore that the build issue has something to do with perhaps cached files associated with my dev cert as I understand this is regenerated on each login logout... Appc folks - any ideas?
The tooling seems to have become terribly unreliable over the last number of releases and needs some attention from the folks at Appcelerator IMO. Liveview is meant to speedup development time and it's great when it works (still probably lagging behind the awesome TiShadow of old), however in this instance it is breaking the build process and sucking up endless hours with indeterminate build behaviour. Am I doing something wrong???
Has anyone else discovered a better workaround or is this a known issue?
For reference, if I've built as above for development and then try to build for a "test" deployment with the command
appc ti build -p ios -T device -D test --liveview
I get the error (even after logging in and out and cleaning the project with appc ti clean)
[INFO] : Invoking xcodebuild
[ERROR] : ** BUILD FAILED **
[ERROR] : The following build commands failed:
[ERROR] : CompileC build/Intermediates/Project.build/Debug-iphoneos/Project.build/Objects-normal/armv7/TiUIiOSProxy.o Classes/TiUIiOSProxy.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
[ERROR] : (1 failure)
This cannot be fixed until I do a reboot AFAICT!!!
Then, finally, the test deployment builds as expected and can usually be repeated (unlike development deployments).
All help greatly appreciated :)
Environment:
Operating System
Name = Mac OS X
Version = 10.11.6
Architecture = 64bit
# CPUs = 8
Memory = 8.0GB
Node.js
Node.js Version = 4.2.6
npm Version = 2.14.12
Appcelerator CLI
Installer = 4.2.7
Core Package = 5.4.0
Titanium CLI
CLI Version = 5.0.9
node-appc Version = 0.2.31
Titanium SDKs
5.4.0.GA
Version = 5.4.0
Install Location = /Users/gb/Library/Application Support/Titanium/mobilesdk/osx/5.4.0.GA
Platforms = android, mobileweb, iphone
git Hash = 4ba4c0a
git Timestamp = 08/10/16 05:43
node-appc Version = 0.2.35
...
Xcode
7.3.1 (build 7D1014) - Xcode default
Install Location = /Applications/Xcode.app/Contents/Developer/
iOS SDKs = 9.3
iOS Simulators = 9.3
Watch SDKs = 2.2
Watch Simulators = 2.2
Supported by TiSDK 5.4.0.GA = yes
EULA Accepted = yes
Teams = ********* (active)

Try this process:
Copy your entire project at some different location other than the current Studio workspace.
Now, after copying your project to some other folder, delete the project folder from workspace.
Create a new project with same name and same app id.
Note down the guid tag value from new tiapp.xml file.
Replace the content of new project with the original copied project.
Now finally replace the new guid with the original guid which you noted down in Step 4.
Run your project without LiveView mode.

Related

flutter 3.3 ShaderCompilerException ink_sparkle.frag failed with exit code -1073740791

Since updating my flutter to 3.3+ everytime I try to build my project there is this error on the console:
Target web_release_bundle failed: ShaderCompilerException: Shader compilation of
"C:\flutter\packages\flutter\lib\src\material\shaders\ink_sparkle.frag" to "build\web\assets\shaders/ink_sparkle.frag"
failed with exit code -1073740791.
Compiling lib\main.dart for the Web... 52,1s
Exception: Failed to compile application for the Web.
I've tried running flutter clean, deleting the project and downloading it again from github, clearing pub-cache from c:\flutter folder and also deleting flutter and installing it again but nothing worked
If you are using a mac try to open 'Security & Privacy' and give permission to the app that requests it.
It may seem out of context. But it worked for me!
This error is present since 3.3.0 and until today (3.3.2), it wasn't fixed... but there are some workarounds:
1- Downgrade flutter to 3.0.5 (some updates to the libs you use won't be avaliable as they are migrating to 3.3+)
2- They are currently tracking the issue on github and the 'temp fix' is checking if your project is in a folder with a utf8 character (like 'â', 'Á' and maybe some chinese or japanese characters) and moving it to a folder only with ASCII characters.
Ex:
from -> C:\Users\user\Área de Trabalho\
to -> C:\Users\user\

XCode 13.2.1 Executable Not Found

I am trying to build my react-native ios application on an iPhone 12 (ios 14.3) simulator. After the build succeeds, I am getting an error dialog at the end reading:
"Executable Not Found
/userFolder/Library/Developer/Xcode/DerivedData/eMobility-fzupihuygopdozakomhycmxkpemd/Build/Products/Debug-iphonesimulator/eMobility.app is not a valid path to an executable file. Please rebuild the project to ensure that all required executables are created. Check your project settings to ensure that a valid executable will be built
"
Error details:
"
Executable Not Found
Domain: DVTMachOErrorDomain
Code: 5
Recovery Suggestion: /userFolder/Library/Developer/Xcode/DerivedData/eMobility-fzupihuygopdozakomhycmxkpemd/Build/Products/Debug-iphonesimulator/eMobility.app is not a valid path to an executable file. Please rebuild the project to ensure that all required executables are created. Check your project settings to ensure that a valid executable will be built.
User Info: {
DVTErrorCreationDateKey = "2022-01-12 14:26:52 +0000";
}
I am using the latest XCode version : 13.2.1.
I want to say that the build was working before without changing anything (same simulator). So I am guessing it comes from the latest XCode update
run npm install before run the project from XCode

Xcode - Command PhaseScriptExecution failed with a nonzero exit code - Mac M1

This is the error I get when I try to build my Flutter app with Xcode 12.5.1. I can run the app on the Simulator without any problem, my friend with an Intel MacBook Pro can build it but I can't with my M1 processor.
After trying many things on my main project, I've decided to build an empty project in order to know where the problem was. And I still have the same error when I try to build a just created project.
I have noticed this line in the build target runner logs : export arch\=undefined_arch
Of course I have followed several topics about excluded architectures without success.
I once saw a topic that told to change the Build System to Legacy in the Workspace Settings. After doing that, I have an other error I can't resolve :
Command /bin/sh failed with exit code 1, but the export arch is now set to armv7.
I absolutely don't know why I can't build even a new Flutter project on my M1 Mac. Is it a problem with this undefined architecture ?
Here is more information about my configuration :
Flutter doctor
New Build System logs
Legacy Build System logs
I had the same error, you need to reinstall flutter on your device. Just remove the sdk folder or if you want to clean correctly you need to do that in you Flutter install directory :
git clean -xfd
git stash save --keep-index
git stash drop
git pull
flutter doctor

Nativescript building android errors

I have a nativescript (3.0) application which I am developing on mac (ElCapitan). I am able to run the iOS emulator without a problem, but I cannot find a way to build the app for Android. I am getting the following error:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'MyApp'.
> Flavor 'nativescript-telerik-ui' has unknown dimension 'nativescript-telerik-ui'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.004 secs
Command ./gradlew failed with exit code 1
I followed the nativescript documentation strictly, removed the android platform and added it again, reinstalled the Android SDK and tools, but without any success.
At this point I am out of ideas. Any help would be greatly appreciated.
Thank you.
did you try nuke it?
tns plugin remove nativescript-telerik-ui
tns plugin add nativescript-telerik-ui
my be you have an older version
It seems you have changed something on the "AndroidManifest.xml" file and which is not correct. Please fix the "AndroidManifest.xml" file.
If not, you can try this
tns platform remove android
tns platform add android
if only these two lines are not enough for the solution, you may run the android platform on Android Studio.
app/platforms/android
This is the directory, you have to open on Android Studio. After opening this, Android Studio will suggest to you what you have to do.

Trouble packaging and signing iOS apps built with Cordova CLI

Until now, all of my experience compiling PhoneGap apps has been via the excellent PhoneGap:Build service. However, I now find myself in a situation where I need to compile locally, because I need to use a plugin that includes a binary file, which precludes it from being included for use with PG:B.
So for these reasons, I need to compile locally. "Great!" I thought, I'll just use the new CLI...
I have developed my app, and I can test it on-device via deploy over USB from Xcode, but trying to get a release build, and sign it, with the provisioning profile embedded, has been a nightmare.
For completeness, this is the basic outline of everything I've done, aside from the app development itself.
$ pwd
/users/adam/dev/myapp/mobile/
$ cordova create build_local com.foo.bar MyApp
Creating a new cordova project with name "MyApp" and id "com.foo.bar" at location "/Users/adam/DEV/myapp/build_local"
$ cd build_local
$ cordova platform add ios
Creating ios project...
$ cordova platform add android
Creating android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.foo.bar
Name: MyApp
Android target: android-19
Copying template files...
<snip>
Project successfully created.
$ cordova plugin add https://github.com/hazemhagrass/BackgroundJS
Fetching plugin "https://github.com/hazemhagrass/BackgroundJS" via git clone
Installing com.badrit.BackgroundJS (android)
Fetching plugin "https://github.com/apache/cordova-plugin-device.git" via git clone
Installing org.apache.cordova.device (android)
Installing com.badrit.BackgroundJS (ios)
Installing org.apache.cordova.device (ios)
$ cordova plugin add de.appplant.cordova.plugin.local-notification
Fetching plugin "de.appplant.cordova.plugin.local-notification" via plugin registry
Installing de.appplant.cordova.plugin.local-notification (android)
Installing de.appplant.cordova.plugin.local-notification (ios)
$ cordova plugin add https://github.com/kdzwinel/phonegap-estimotebeacons
Fetching plugin "https://github.com/kdzwinel/phonegap-estimotebeacons" via git clone
Installing pl.makingwaves.estimotebeacons (android)
Installing pl.makingwaves.estimotebeacons (ios)
For what it's worth, this last plugin is the reason that I have to compile locally.
Now, here's one other potential monkey wrench: This app is actually two apps. It's the same core codebase, merged into two different deployment branches of the repo, one for each client. So each app will have its own id, name, and config stuff. Because of this, I actually have more than one cordova project folder (1 for each final app) and after creating each project through the steps above, I remove the generated www folder and replace it with a symlink to the shared www folder that exists outside of these phonegap project directories.
This is supported behavior; the CLI allows you to generate your app with a symlink via the --link-to flag (see cordova help create for details). However, doing so seems to have issues; so I've resorted to doing all of the app config up front and then replacing the generated www folder with a symlink after everything is ready to compile.
At this point, I can deploy to either the iOS simulator or Android emulator, and I can deploy to devices over USB, and everything works just fine; all of my plugins are available and function as expected. So I'm ready to compile a release build. Android is easy. iOS, not so much.
$ cordova build ios
<snip>
** BUILD SUCCEEDED **
However, this is a DEV build. The generated file is in the build/emulator/ folder, and when I attempt to sign it, I'm told that it's not signed because of the I386 architecture (which indicates that it's a development build).
$ xcrun -sdk iphoneos PackageApplication -v "platforms/ios/build/emulator/MyApp.app" -o "/users/adam/dev/myapp/MyApp.ipa" --sign "iPhone Distribution: {our cert name} ({our cert id})"
<snip>
Codesign check fails : platforms/ios/build/emulator/MyApp.app: code object is not signed at all
In architecture: i386
<snip>
I've attempted to generate a release build from the cordova CLI. I haven't been able to find the --release flag documented anywhere, but the CLI doesn't complain, and it usually does if it doesn't recognize a flag.
$ cordova build ios --release
<same result as previously>
Attempting to sign this build results in the same problem.
At this point, I started attempting to work directly in Xcode. I've set the .mobileprovision file and the signing credentials up appropriately, to the best of my knowledge:
With these values set, Xcode no longer allows me to build:
So I'm stuck: I have no choice but to build locally, and I can't figure out how to get it to build for release and sign! Please help!
Additionally, if I attempt to embed a provisioning profile, that fails because of an issue with entitlements. I'm not exactly sure what this means, but I'm hopeful that it's a result of working with a dev build, and resolving that will resolve this as well.
$ test -e ~/.ios/DEV.mobileprovision && echo exists
exists
$ xcrun -sdk iphoneos PackageApplication -v "platforms/ios/build/emulator/MyApp.app" -o "/users/adam/dev/myapp/MyApp.ipa" --embed "~/.ios/DEV.mobileprovision"
<snip>
error: Failed to read entitlements from '/var/folders/zs/j2hmt69n12sbjm6gyn0m_q4c0000gn/T/tyYvYPQKf3/Payload/MyApp.app'
Update 1:
This SO question helped in one regard. I don't know how the active scheme (I'm not really sure what that means, but that's the tooltip when I hover over the control) got changed as part of specifying keys/etc, but clearly it did. Changing this back to an iOS Device, like iPhone, allows me to build my project, and even Archive (which, to the best of my understanding, means it's creating the .ipa file I need to submit to the app store), but I can't find the archived file. Where should it be? Can I define this in a setting somewhere in Xcode?
Update 2:
By fiddling with certificates and provisioning profiles I've finally been able to create an archive from Xcode, which I've been told is a release build (is it?). Ideally I would like to be able to build from the command line so that I can automate it as much as possible, so that's where I'll be picking up in the morning. Any advice on that front would be quite welcome!
If you managed to create an archive in Xcode, then your signing certificate and provisioning profiles are known to Xcode, so cordova build ios --release --device should make it.
The steps are:
1) Import your iOS developer certificate for production to the keychain by downloading and double clicking on it in Finder (or get it via Xcode)
2) Download your provisioning profile (with the App ID set to the id attribute of the widget element in config.xml) and double click it on Finder so it goes to the Xcode provisioning profile store
3) cordova build ios --release --device
it looks like you're trying to sign the app with a wildcard provisioning profile (the XCode screenshot). Can you try creating and downloading a distribution certificate and provprofile to your Mac? Then import the .cer file in the keychain access app (doubleclicking should suffice) and doubleclick the provprofile as well.
Now you should be able to select the appropriate values from the release dropdowns in the XCode build settings.
Hope this helps somewhat...
Eddy
One other issue I am seeing from your screenshot is I don't think you can Build an Archive (Release) version using the Developer Signing Idenetity, you would need to create a Distribution certificate and use that one for the Release (Archive) version.

Resources