TFS task "Run Code Analysis" displays ERROR: Browserslist: caniuse-lite is outdated. Please run: npx browserslist#latest --update-db - tfs

This error started appearing in the build task "Run Code Analysis" for a web project build. I have performed the command npx browserslist#latest --update-db, but it did not resolve the issue.
The "Run Code Analysis" appears to complete. Any suggestions on how I can get rid of the message concerning "caniuse-lite is outdated"?
##[error]ERROR: Browserslist: caniuse-lite is outdated. Please run:
ERROR: Browserslist: caniuse-lite is outdated. Please run:
##[error]ERROR: npx browserslist#latest --update-db
ERROR: npx browserslist#latest --update-db
ERROR:
ERROR: Why you should do it regularly:
ERROR: https://github.com/browserslist/browserslist#browsers-data-updating

I don't know how I can fix that with a good approach, but for now I suppressed this warning by adding the variable to AzureDevops
BROWSERSLIST_IGNORE_OLD_DATA=true.
variables:
...
- name: 'BROWSERSLIST_IGNORE_OLD_DATA'
value: true
...

This is an issue with the CSS and JS analyzers of SonarQube. It has already been fixed. The CSS analyzer has been merged into the JS analyzer since then.
The fix has been released as part of SonarJS 8.9.0.17411, which was released as part of SonarQube 9.4.
As a workaround, you can set the environment variable BROWSERSLIST_IGNORE_OLD_DATA to true. This is what the analyzer fix does, anyway, just very locally. The easiest way to set an environment variable is to create a pipeline variable of the same name. Just keep in mind that if you use NPM package browserlist in your own code, the warning will be suppressed there too.

Related

Kotlin Multiplatform Mobile unable to run on iOS: Execution failed for task ':shared:compileKotlinIosX64'

I have created fresh project(Hello World) in KMM followed by their official website. In android it works smooth but when I am trying to run in XCode it's giving errors because of which I am unable to build / run the xcode project. I have attached screenshots and logs for my errors. Somehow xcode scheme is not getting generated in the KMM platform that's what I am guessing.
Can anyone please help me understand what am I missing?
Any help would be appriciated.
Following is my dev env:
Xcode 11.4.1
Android 4.1.2
Kotling Plugin version 1.4.30 (stable)
KMM 0.2.0```
XCode Logs:
> Task :shared:compileKotlinIosX64
Downloading native dependencies (LLVM, sysroot etc). This is a one-time action performed only on the first run of the compiler.
Extracting dependency: /Users/fatin/.konan/cache/clang-llvm-apple-8.0.0-darwin-macos.tar.gz into /Users/fatin/.konan/dependencies
e: java.lang.RuntimeException: Cannot extract archive with dependency: /Users/fatin/.konan/cache/clang-llvm-apple-8.0.0-darwin-macos.tar.gz.
> Task :shared:compileKotlinIosX64 FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':shared:compileKotlinIosX64'.
> Compilation finished with errors
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 7s
1 actionable task: 1 executed
Command PhaseScriptExecution failed with a nonzero exit code ```
[![enter image description here][3]][3]
I reached out to community for this and finally found the solution. Here is the link to that issue which I raised and solved this problem.
If anyone else is going through this same issue it mostly cause of corrupted kotlin file.
Also try checking your cmd line tools in XCode as per comments.
Hope this helps someone. Cheers.
If the project doesn't run right away even on opening it from Xcode and shows the shared framework is missing, Then try generating the shared framework for iOS platform using terminal. Navigate to the project folder and execute
Command: ./gradlew packForXcode Now the shared framework should have a xcode-frameworks product and you should be able to build and run the project through Xcode.
This could happen if there are two libraries, where one library was compiled against the different version of the other library than the one currently used in the project. Please check that the project configuration is correct and has consistent versions of dependencies.

Can't build todo_ddc project

I want to try polymerize so I have found and use that post. But I met issues when try command
pub run polymerize:polymerize build
It works some time and then return bazel's error:
2017.35.08 16:35:06.015 polymerize [INFO]: Running bazel ...
____Loading package:
ERROR: while parsing ':all': error loading package '': Encountered error while reading extension file 'BUILD.test_app.bzl': no such package '#build_files//': No WORKSPACE file found in /private/var/tmp/_bazel_kelegorm/df7a1dbca8a607bc3485e726bb483b2b/external/build_files.
How can I solve that problem? Why it happens? Why I can't find any mention about that error? What have I missed?
Thanks!
There was a problem with newest bazel versions. Just upgrade to latest polymerize (v. 0.8.6+1) and it should work again.
To start from a clean workspace just do a :
git clone git#github.com:polymer-dart/todo_ddc.git
cd todo_ddc
pub get
pub run polymerize:polymerize build

CMAKE_MAKE_PROGRAM value cannot be retrieved from CMakeCache.txt

I have a project that I'm running through the Jenkins CI server and is being built using the Cmake plugin, and I am consistently getting the same error:
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/580152/Celero/build/64
ERROR:Failed to get CMAKE_MAKE_PROGRAM value from C:\Users\580152\Celero\build\64\CMakeCache.txt
I am using Visual Studio 2012, and I can build and run the .sln file in Visual Studio using the files generated by the Cmake plugin. However, it never builds or finishes whenever I use the Cmake plugin. I've worked with Jenkins a bit in the previous weeks, but I'm still a noob when it comes to some of the plugins and settings, and the same goes to Cmake.
Is this a Jenkins plugin problem, a Cmake error, or am I just not setting something up right/missing the problem entirely?
Any and all help is much appreciated.
Update:
I have found that this error is caused by Cmakebuilder plugin, and was updated to fix this issue in version 2.1, and though I'm currently using that version of the plugin the error is still occurring. Could something have happened that my version was not updated properly (though it says that no updates are available) or is this an issue with the plugin that must be resolved?
Thanks again for any help.
Perhaps my experience is old, but I have had trouble with the Jenkins cmake plugin. So I prefer to do my Jenkins cmake builds with a command shell batch script. This also makes the Jenkins build job more closely match my development build. I try to have my Jenkins build jobs be little more than
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=../exports ..
cmake --build . --config Release --target test
cmake --build . --config Release --target install

Teamcity Step tests (Command Line) failed when testing an iOS app

I am trying to run tests automatically using Teamcity, but it seems that when the agent is compiling the project, it is not done correctly because when I run the command like for running test, I am getting the following error:
fatal error: 'Pushwoosh/PushNotificationManager.h' file not found
#import <Pushwoosh/PushNotificationManager.h>
[16:48:51][Step 2/2] ^
[16:48:51][Step 2/2] 1 error generated.
However, when I run manually the same commands I get no errors, but my test running. The application that I want to run was written in objective-c, and the command lines I am using are the following:
$ git clone REPOSITORY_URL (runs sucessfully)
$ pod install (runs sucessfully)
$ xctool -workspace Supermaxi.xcworkspace -scheme Supermaxi test -only FunctionalTests:TestCase000_Registration/test00_WrongEmail -sdk iphonesimulator (fails and I get the previous described error)
After being helped by I friend of mine, we found the solution to this issue in this link.
It turns out that the main problem was, as the link states, that CocoaPods uses symbolic links in it’s directory structure, and TeamCity can have trouble copying symbolic links in the VCS checkout to build agent, so I had to set the Version Control Settings of Teamcity as it is explained in the previous link.
Therefore, I have just changed the VCS checkout mode from Automatically on server to Automatically on agent (if supported by VCS roots). After that I run the agent again, and it worked properly.

Jenkins not downloading Android SDK automatically

I'm running Jenkins locally on my mac and I can't seem to get Jenkins to download the Android SDK automatically. I'm not defining a path, and according to the documentation, Jenkins will auto download it. What am I missing here?
"The plugin will automatically download and install the Android SDK, if it's not already installed when a build starts."
Jenkin Log
[Gradle] - Launching build.
[workspace] $ /var/root/.jenkins/jobs/TestingBuild/workspace/gradlew clean
FAILURE: Build failed with an exception.
* Where:
Build file '/private/var/root/.jenkins/jobs/TestingBuild/workspace/app/build.gradle' line: 17
* What went wrong:
A problem occurred evaluating project ':app'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
* 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: 19.418 secs
Build step 'Invoke Gradle script' changed build result to FAILURE
Build step 'Invoke Gradle script' marked build as failure
Finished: FAILURE
So two days later... problem solved. I had to place an instance of the android sdk at this location. /Users/Shared/Jenkins/Home/tools/android-sdk. I also set an Environment variable ANDROID_HOME with the same path. Here's a screenshot.

Resources