Couldn't build release version of iOS project with hosted mac agent Azure pipeline - xamarin.ios

Getting these two errors when I try to build the iOS project with hosted mac agent.
lipo : error : unable to find utility "lipo", not a developer tool or in PATH [/Users/runner/runners/2.158.0/work/1/s/src/LOT/iOS/LOT.iOS.csproj]
MTOUCH : error MT5306: Failed to create the a fat library. Please review the build log. [/Users/runner/runners/2.158.0/work/1/s/src/LOT/iOS/LOT.iOS.csproj]
Have selected the xcode version 10.2.1
I changed this based on the solution given in this reference,
https://forums.xamarin.com/discussion/31493/mtouchtask-error-mt5206-failed-to-create-the-a-fat-library-please-review-the-build-log-mt5206
Some other links suggest this could be due to the license and tried sudo xcodebuild -license accept Still it doesn't work. Any leads?
Update:
After selecting the xcode 11.1, lipo : error : unable to find utility "lipo", not a developer tool or in PATH [/Users/runner/runners/2.158.0/work/1/s/src/LOT/iOS/LOT.iOS.csproj] error is resolved.

Running the command in a bash script task resolved my problem.
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
Basically it selects the xcode version 10.3.

Related

"Cannot find plugin.xml for plugin kapsel-plugin-i18n. Please try adding it again." when I'm trying to install kapsel-plugin-i18n for iOS 15 (local)

Do you know which version of kapsel-plugin-i18n might work with iOS 15 ?
Which version of npm and node might fit with Cordova 9.0.0 ?
Indeed, I had to upgrade the Kapsel plugins for my application to fit with iOS 15 but there is an error when I try to install the kapsel-plugin-i18n. (which comes from the SDK 3.2 SP04 PL1).
"Cannot find plugin.xml for plugin kapsel-plugin-i18n. Please try adding it again."
But the plugin.xml is here, in the local directory.
For information, I'm using :
Cordova 9.0.0
npm 6.14.15
node : 14.18.0
Mac OS Big Sur (11.6)
The command line I'm using is :
sudo cordova plugin add kapsel-plugin-i18n --searchpath /Absolute path to plugin local directory/.
Thank you for your answer.
Kat
As per the git repo :
Security holding package
This package contained malicious code and was
removed from the registry by the npm security team. A placeholder was
published to ensure users are not affected in the future.

vscode crashes on Arch linux when opening file/folder

Installation vscode
I'm running Arch Linux (Manjaro) and installed vscode with:
sudo pacman -S code
but then a simple .NET core program resulted in
--------------------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (clrdbg) with Visual Studio
Code, Visual Studio or Visual Studio for Mac software to help you develop and
test your applications.
--------------------------------------------------------------------------------
It seems like the official Microsoft build should be obtained via the snap store:
sudo snap install code --classic
And the program looks normal. I can install plug-ins, create a new file et cetera.
Problem
However, I cannot open any files or projects. Doing so results in vscode crashing. I read that code --disable-gpu could solve this problem, but doesn't do so for me.
Any ideas
what may cause this crash?
or how to get the pacman vscode working?
Logs
$ code --verbose
Gtk-Message: 22:59:19.805: Failed to load module "canberra-gtk-module"
Gtk-Message: 22:59:19.805: Failed to load module "canberra-gtk-module"
(code:33833): GdkPixbuf-WARNING **: 22:59:19.817: Cannot open pixbuf loader module file '/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory
This likely means that your installation is broken.
Try running the command
gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again for the time being.
[33863:1104/225919.911481:ERROR:appcenter_api.cc(52)] expecting appcenter url prefix
[main 2020-11-04T21:59:19.960Z] Sending env to running instance...
[main 2020-11-04T21:59:20.041Z] Sent env to running instance. Terminating...
[main 2020-11-04T21:59:20.041Z] Lifecycle#kill()
where the recommended gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache results in bash: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache: No such file or directory
I'm running Arch Linux (Manjaro) and installed vscode with:
sudo pacman -S code
but then a simple .NET core program resulted in
--------------------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (clrdbg) with Visual Studio
Code, Visual Studio or Visual Studio for Mac software to help you develop and
test your applications.
--------------------------------------------------------------------------------
I had the same issue trying to get the debugger to work and I spent hours on finding the reason for this. What I found out is that the debugger only works with officially signed Microsoft binaries of VSCode. So you have to make a distinction here:
The package code contains the open source version of visual studio code, a build wich anyone can make using the provided sources by Microsoft. The program which you get here is therefore not signed by MS!
The package visual-studio-code-bin provided by the AUR contains a officially signed version by MS. If you use this package, the debugger works as expected.
I do not know wether snap - which I personally never used at all - provides this kind of package, so I can not tell anything about that, but using the said package from the user repository solved the problem for me reliably.
Try this one (which I installed just yesterday under the recent manjaro distribution and it worked fine) and see if this solves your problem with opening files and folders.

Update TFS2017 task to latest version

I am working on a build to run a powershell script on a remote machine, using the VSTS task :
I currently am using TFS2017 on premise, and this is version 1 of that task.
There is a version 3 available on github here :
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/PowerShellOnTargetMachinesV3
I am having an issue with this task failing, and I have read elsewhere that this version has a fix for my issue, so I want to update it if possible.
I tried a few ways to do this, but I cannot work out what I am supposed to be doing. You would think there would be an update button in TFS!
Well, there is, but it requests that you provide a .VISX file. Which the repo in GIT does not have.
I've tried running the steps in this other post:
How to update the built-in Microsoft task library in TFS 2017?
But running the command "npm run package -- --version " doesn't generate the VISX.
I tried running :
npm run package --PowerShellOnTargetMachinesV3 --version 3.1.3
That responds with the output:
5.6.0
Which I am not sure what to do with!
I have seen another post that says I need to use the tfs-cli?
I'm very confused.
Any help is appreciated!
Since you are working on TFS on-premise, the task version will not auto update. You need to manually install "PowerShell on Target Machines" task version 3.0
You just need to download the source code and package it as an extension, finally upload and install your extension. There are some steps updated:
Get the package tool (tfx-cli)
You can install or update the TFS Cross Platform Command Line Interface (tfx-cli) using npm, a component of Node.js, from your command line.
npm i -g tfx-cli
Package your extension in a .vsix file
tfx extension create --manifest-globs vss-extension.json
More details please refer this official tutorial: Package, publish extensions.

Intellij IDEA 2017.2 can't add openjk 9 on Linux Mint 18

I am using Intellij IDEA 2017.2.5 on Linux Mint 18.2 and trying to add new openjdk-9 SDK but IDEA does not accept openjdk 9 as valid JDK:
I have installed all of my SDKs using apt-get from ppa standard repositories.
This is my update-alternatives --config java/javac output:
Although Intellij declared it would support JDK 9 here, but it seems it is not yet fully compatible with at least opensdk-9.
Maybe refactoring SDK directory and removing 'jre' folder misleads the IDEA to find the SDK 9 home folder.
Any idea why Intellij IDEA claims 'The selected directory is not a valid home for JDK' ?
“ Ubuntu PPA for OpenJDK” currently has very old build of openjdk-9(9~b115-1ubuntu1).
So the IDEA does not recognize it as a valid SDK.
I removed current installed version:
sudo apt-get remove '^openjdk-9.*'
Then I have downloaded newer .deb build(9~b181) files including jre,jre-headless,... from launchpad build archive.
sudo dpkg -i openjdk-9-jre-headless_9_b181-4_amd64.deb
openjdk-9-jre_9_b181-4_amd64.deb
openjdk-9-jdk-headless_9_b181-4_amd64.deb
openjdk-9-jdk_9_b181-4_amd64.deb
Just Execute the above command at a single line, line breaks are for better readability.
Ignore any error complaining about:
"Package libpng16-16 is not installed."
Next execute the following:
sudo apt-get install -f
Now after installing this build of openjdk-9 the IDEA is happy with SDK home.
Thanks #y.bedrov for his useful comment.
Update:
However this solution enables you to declare openjdk-9 in the mentioned IDEA version(2017-2) but you are not able to compile any class within the IDEA itself.
You can only compile your application with elder jdk and run it with openjdk-9. There is an other issue which indicates this here.
In the newer IDEA versions(I have tested 2017.3) this build of openjdk is not allowed to be used as new SDK any more, see this issue.
The short reason is an issue in Debian package which contains incorrectly compiled lib/jrt-fs.jar file.
See this Answer for more information

Can't find Git or Cordova on your path (Windows/Netbeans), Can't find GitHub under AppData/Local, FIX 2015

Error: NetBeans cannot find git or cordova on your path.
When trying to create a new Cordova Application in Netbeans.
How to fix? > THE ANSWER CAN BE FOUND BELOW :)
If anyone wants to know how to get Cordova working in Netbeans anno 2015/2016 here is the fix:
I have installed:
Git version: 2.5.1 for Windows 64 bit
Cordova version: 4.3.1 for Windows 64 bit
Node.js version: 0.12.0 for Windows 64 bit
Netbeans version: 8.0.2 x86
In Netbeans when I start a new project and select HTML5>Cordova Application then I will get this error:NetBeans cannot find git or cordova on your path.
After some searching on the good old internet, I found some pieces of information hither and thither which was correct but which didn't solve my problem. The reason for this was that it was old or slightly different than my problem. So I did the following to fix this problem:
I checked where my Cordova/npm files where and I happily found them in: C:\Users\\AppData\Roaming\npm
Next I had to find my Git.exe which FOR ME is located in: C:\Program Files\Git\bin (FOR SOME PEOPLE IT CAN BE FOUND IN: C:\Users\\AppData\Local\GitHub\PortableGit_)
Now I found out that Netbeans is using the windows PATH VARIABLES to locate git and cordova. For those who don't where to find or set the system Path Variables this website will help you find or set it: https://java.com/en/download/help/path.xml
I use windows 7 so I did this to change my path variables:"
-Select Computer from the Start menu
-Choose System Properties from the context menu
-Click Advanced system settings > Advanced tab
-Click on Environment Variables, under System Variables, find PATH, and click on it.
-In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
SO edit path and then you see like C:/apath;C:/asdas; < enter here your git path;<enter here your cordova path and save it by clicking the OK button.
Restart Netbeans and now it has to work.
:)
For those getting here and the solution from #bboni did not work - as it did for me:
Make sure everything is installed correctly by opening a command prompt (open start-menu and type cmd).
Type the following commands git --version, cordova -v and node -v.
For me it looked like this:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.
C:\Users\JohnDoe>git --version
git version 2.8.4.windows.1
C:\Users\JohnDoe>cordova -v
6.2.0
C:\Users\JohnDoe>node -v
v4.4.5
That makes sure everything is installed correctly. If one or more commands result in an error, then it's either not installed or not added to PATH as described by #bboni.
Now open your Netbeans and go to Tools → Options → HTML/JS → Mobile Platforms and check if you can see somethink like Installed Cordova version: 6.2.0. This is to make sure Netbeans is basically able to detect Cordova.
At that point all the tutorials I found online ended. I came up with the idea to check if Netbeans' own Terminal would be able to execute the command above as well: Tools → Open in Terminal
I got an error telling me I'd need Cygwin to use the Terminal. So I installed it, restarted Netbeans, opened the Terminal, checked the commands above and they worked.
I checked Configure Cordova again - the error was gone and I could finally ran my app directly from Netbeans as I wanted to.   :)

Resources