run "clean-up": Job failed: exit status 1 - ionic-framework

I have Ionic pro, packaging for Android keeps failing with the following output:
$ run "clean-up"
Running Stage clean-up for Job: 5444336
ERROR: Job failed: exit status 1
The APK seems to generate correctly, but after the APK is generated this clean up command is attempted and fails.

Response from Ionic support:
I see you're using cordova-android 7.0.0. Unfortunately v7 isn't yet supported for package builds. You'll need to revert to v6.4.0 to complete the build. Have a look at this article for more details.

Related

VSTFS build failed at Publish step

I am using the VSTFS CI/CD pipeline to automate my .NET Core 5.0 with Angular 12 web application.
It failing the build at Publish step (see below screenshot) with error:
'npm' is not recognized as an internal or external command,
2021-12-13T20:19:46.9855025Z operable program or batch file.
2021-12-13T20:19:46.9917349Z D:\TFSBuildAgent\_work\58\s\src\WebUI\WebUI.csproj(85,5): error MSB3073: The command "npm install" exited with code 9009.
2021-12-13T20:19:47.0482106Z ##[error]Error: C:\Program Files\dotnet\dotnet.exe failed with return code: 1
2021-12-13T20:19:47.0496257Z ##[error]Dotnet command failed with non-zero exit code on the following projects :
What could be the issue?
Thanks
It looks like npm is not found by the agent. Make sure Node is installed globally on the machine and npm has been added to the system wide path environment variable.
Or add the Node Tool Installer task to your workflows.
I fixed the issue by deleting the npm publish tag in WebUI project file.

2.170.1\Modules\DTAExecutionHost.exe' failed with exit code 1

I am trying to run my automation pipeline on Private hosted agent and getting error as Test Run Failed.
Error: The process 'C:\agent_work_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.170.1\Modules\DTAExecutionHost.exe' failed with exit code 1
Vstest failed with error. Check logs for failures. There might be failed tests.
Error: The process 'C:\agent_work_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.170.1\Modules\DTAExecutionHost.exe' failed with exit code 1 Vstest failed with error. Check logs for failures. There might be failed tests.
Based on the error message, the reason for this issue should be that the VSTest task supported .Net Framework 4.6.2 from version 2.170.1.
You need to check the .NET framework version installed on the build agent machine. If the .NET framework version installed on the machine is 4.6.1 or less than that then can you please try upgrading the .Net framework version to 4.6.2.
Here is a doc about the requirement about the Visual Studio test task:
If you're using a Windows self-hosted agent, be sure that your machine
has this prerequisite installed:
.NET Framework 4.6.2 or a later version
In addition, you can try to use the Visual Studio test task version 1.

Cordova-camera plugin

When adding cordova camera plugin into my project then i am facing cordova build problem as follows:
Step 1: Adding ionic cordova camera plugins
Step 2: try to build the native app using ionic cordova build android --debug
then the following error is displaying
Task :app:transformClassesWithMultidexlistForDebug FAILED
D8: Program type already present: android.support.v4.app.ActionBarDrawerToggle$Delegate
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
com.android.build.api.transform.TransformException: Error while generating the main dex list:
Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.app.ActionBarDrawerToggle$Delegate
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android --debug exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
This problem may be from your AndroidManifest.xml. Open your AndroidManifest.xml file and find android.support.v4.app.ActionBarDrawerToggle, you will find two line for this. Comment one of them and keep only one android.support.v4.app.ActionBarDrawerToggle. Then try to run again.
This will may help you.
I change cordova-camera plugin version from 4.3.0 to 4.1.0 and now it works well this may be ionic v4 plugin issue
install the latest cordova platform[
]1

Flutter sample build issue

I am getting this error when trying to run the sample first_app in flutter after opening it in VS CODE.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
/Users/ts/Documents/Dev/first_app/build/ios/Debug-iphonesimulator/Runner.app: resource fork, Finder information, or similar
detritus not allowed
Command /usr/bin/codesign failed with exit code 1
Could not build the application for the simulator.
Error launching application on iPhone 8.
Does anyone know what could be causing this? Thanks!

Ionic Android Build Error

I'm seeing these errors after fresh ionic, cordova, and JDK update installations when I do android build:
BUILD FAILED
Total time: 6.254 secs
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'c:\Android\sdk\build-tools\24.0.2\aapt.exe'' finished with non-zero exit value 1
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'c:\Android\sdk\build-tools\24.0.2\aapt.exe'' finished with non-zero exit value 1
You have to update to JDK 8. Looks like you have the older version 7.
Try JDK 8
and see if it helps.
I had the same problem reinstalled SDK didn't work
removed old sdk and reinstalled SDK did't work
You need to delete the android folder form the platform folder and execute
ionic run android this will reinstall the platform automatically and build from scratch. I think the cache files are the problem so that is why I think this worked.
I hope it will also work for others.