Android Emulator plugin not working in Jenkins - java

When I run test on Jenkins with option create emulator I have this problem:
[android] Could not create Android emulator: Failed to run AVD
creation command
When I target existing emulator I have this problem:
FATAL:
C:\Windows\system32\config\systemprofile.android\avd\AVD_2.2.ini (The
system cannot find the path specified) java.io.FileNotFoundException:
C:\Windows\system32\config\systemprofile.android\avd\AVD_2.2.ini (The
system cannot find the path specified) at
java.io.FileInputStream.open(Native Method) at
java.io.FileInputStream.(Unknown Source) at
java.io.FileReader.(Unknown Source) at
hudson.plugins.android_emulator.util.Utils.parseConfigFile(Utils.java:436)
at
hudson.plugins.android_emulator.SdkInstaller$2.call(SdkInstaller.java:331)
at
hudson.plugins.android_emulator.SdkInstaller$2.call(SdkInstaller.java:328)
at hudson.remoting.LocalChannel.call(LocalChannel.java:45) at
hudson.plugins.android_emulator.SdkInstaller.getPlatformFromExistingEmulator(SdkInstaller.java:328)
at
hudson.plugins.android_emulator.SdkInstaller.getPlatformForEmulator(SdkInstaller.java:312)
at
hudson.plugins.android_emulator.SdkInstaller.installDependencies(SdkInstaller.java:174)
at
hudson.plugins.android_emulator.AndroidEmulator.setUp(AndroidEmulator.java:247)
at hudson.model.Build$BuildExecution.doRun(Build.java:154) at
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
at hudson.model.Run.execute(Run.java:1488) at
hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at
hudson.model.ResourceController.execute(ResourceController.java:88) at
hudson.model.Executor.run(Executor.java:236)
I have this file.
When I run manual emulator and tests on jenkins It works.

The path shown in the second case suggests that you may be running Jenkins as a system service.
In which case, you could try the workaround listed under "Known Issues" on the Android Emulator Plugin wiki page:
Running in a Windows service as "Local System"
New AVDs cannot be generated and run if Jenkins is running as a Windows service, using the "Local System" account (see issue #7355).
Workaround: configure the Jenkins service to "run as" a real user
If that doesn't solve the problem, can you tell us in which directory AVDs are placed when you create them manually? You can find out by running emulator with the -verbose flag. Within the first few lines you should see something like:
emulator: Android virtual device file at: c:\users\foo\.android\avd\emu_4.0.3.ini

Related

Update downloader with silent Version check -> Error opening media file

We use the install4j "Update downloader with silent Version check" to periodically update our application installer.
With the introduction of the "Update downloader with silent Version check", we have noticed two problems from the Users.
Error opening media file as can be seen in the screenshot. The Media file is the file that is downloaded in the 1st Step of the updater. Screenshot below
The error log file mentions
[0:918] extracting files
[0:932] Included files: 16
[3:537] ERROR: Could not open FFFFFFFFFFFFFFFF 32 C:\Users\ttttttttt\Downloads\xxxxxxxxxx_7_xxxx_yy_zz_64Bit.exe
[128:104] emptying C:\Users\ttttttttt\AppData\Local\Temp\e4j8A6C.tmp_dir1662356615
The Users have not opened the downloaded file. Normally clickin on OK and a retry generally works.
The second problem some users are facing
[![enter image description here][2]][2]
The 2nd error mentions that the bgupdater.exe is already running. Even here, clicking on "Wiederholen" generally works and the update proceeds.
What we do not understand is that why these errors arise. A retry proceeds without errors in all cases normally.
The application uses install4j version 8 and java 1.8
[2]: https://i.stack.imgur.com/jVl3I.png
The first problem looks like anti-virus software problem where the anti-virus software detects a .exe file that is extracted to the %TEMP% directory and immediately quarantines it.
For the second problem, please locate the log file of the running bgupdater process which is located in the %TEMP% directory. Either you start the bgupdater process too frequently or it is hanging somewhere, you would need to find that out. To install a new version, all executables of the installation must be closed.

Jenkins "Failed to install JDK" Exit code=-1

(Adding this here as I did not find an answer anywhere)
I configured Jenkins to automatically install JDK from the "Global Tools Configuration" > "JDK Installation" menu. The option works across all 14 nodes (various Windows and Linux) but one.
A server Windows Server 2012 R2 (amd64) with 20 executors, which has been running without issue for just under 3 years.
The log file references in the build's console (i.e. ...tools\hudson.model.JDK\install1873722508778839961log) is empty.
The build's console shows the following:
[EnvInject] - Loading node environment variables. Installing
E:\Jenkins_APA_8080\tools\hudson.model.JDK\Oracle_Java_8.0_191\jdk.exe
[Oracle_Java_8.0_191] $
E:\Jenkins_APA_8080\tools\hudson.model.JDK\Oracle_Java_8.0_191\jdk.exe
/s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress
INSTALLDIR=E:\Jenkins_APA_8080\tools\hudson.model.JDK\Oracle_Java_8.0_191
/L
E:\Jenkins_APA_8080\tools\hudson.model.JDK\install1873722508778839961log
Failed to install JDK. Exit code=-1 ERROR: SEVERE ERROR occurs
org.jenkinsci.lib.envinject.EnvInjectException: hudson.AbortException
at
org.jenkinsci.plugins.envinject.util.RunHelper.getBuildVariables(RunHelper.java:137)
at
org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironmentWithoutJobPropertyObject(EnvInjectListener.java:235)
at
org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:51)
at
hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:542)
at
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:462)
at hudson.model.Run.execute(Run.java:1810) at
hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at
hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429) Caused by:
hudson.AbortException at
hudson.tools.JDKInstaller.install(JDKInstaller.java:292) at
hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:157)
at
hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:72)
at
hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
at
hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
at hudson.model.JDK.forNode(JDK.java:148) at
org.jenkinsci.plugins.envinject.util.RunHelper.getJDKVariables(RunHelper.java:111)
at
org.jenkinsci.plugins.envinject.util.RunHelper.getBuildVariables(RunHelper.java:135)
... 8 more
I logged onto the server as a local admin and attempted to run the JDK installation line shown in the build console:
E:\Jenkins_APA_8080\tools\hudson.model.JDK\Oracle_Java_8.0_191\jdk.exe
/s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress
INSTALLDIR=E:\Jenkins_APA_8080\tools\hudson.model.JDK\Oracle_Java_8.0_191
/L E:\Jenkins_APA_8080\tools\hudson.model.JDK
The installation seemed to run and this time the log file contained text. I double checked the owner and permissions on the Jenkins folders and they were owned by a local admin and not a domain admin (this is normal for our Jenkins installation).
However, the login credentials of the Jenkins service on this machine were set to a domain admin (not local admin).
Changing the Jenkins Services Log On credentials resolved the issue. Even though this node has been running for over a couple years without issue, its credentials were not correct.

Java - JMF unable to add a Capture or Video device

I am trying to capture video via JMStudio.
When I try to run jmfinit it not detect my webcam and also the device is not listed in jmfregistry.
When I try to add a device manually it is giving me an error Could not add item
I have tried to run both (jmfinit and jmfregistry) as administrator and even tried to change the security settings but nothing seems to work.
I am using Windows 7
I re-installed OS also..
Please find snap shots of error message.
error popup message as shown in snapshot 1
I'm getting below error when i try to run my application
Exception in thread "VFW Request Thread" java.lang.UnsatisfiedLinkError: JMFSecurityManager: java.lang.UnsatisfiedLinkError: no jmvfw in java.library.path
at com.sun.media.JMFSecurityManager.loadLibrary(JMFSecurityManager.java:206)
at com.sun.media.protocol.vfw.VFWCapture.<clinit>(VFWCapture.java:19)
at com.sun.media.protocol.vfw.VFWSourceStream.doConnect(VFWSourceStream.java:241)
at com.sun.media.protocol.vfw.VFWSourceStream.run(VFWSourceStream.java:763)
at java.lang.Thread.run(Thread.java:745)
solution for above Problem..
JMF Studio is 32 bit supporting software so we must install 32bit supported JDK and also Eclipse then we not get any exceptions and errors.
Once Run your application then Automatically Your system webcam will "On".
JMF Studio is 32 bit it not support to 64bit OS/Eclipse,
and another reason is may be Environment variable not defined.

Android Studio genymotion emulator not running

I'm using Genymotion along with Android Studio using the plug-in and no matter what I do it does not allow me to run the app using the Genymotion emulator.. it gives errors like this:
Waiting for device.
Target device: genymotion-samsung_galaxy_s4___4_4_2___api_19___1080x1920-192.168.56.101:5555
Uploading file
local path: C:\Users\zd\AndroidStudioProjects\funfacts2\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/Taha.funfacts2
Installing Taha.funfacts2
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/Taha.funfacts2"
WARNING: linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.
pkg: /data/local/tmp/Taha.funfacts2
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
This is running on just a test app that outputs Hello World on the screen, with some basic formatting.

VisualVM Profile at JDK 1.7_21 crashes with "Access denied"

May be you can help me with this problem.
Profiler crashes with "Access denied" message, then i start it for any local application. In a logfile I found:
java.io.IOException: Отказано в доступе
at sun.tools.attach.WindowsVirtualMachine.openProcess(Native Method)
at sun.tools.attach.WindowsVirtualMachine.<init>(WindowsVirtualMachine.java:56)
at sun.tools.attach.WindowsAttachProvider.attachVirtualMachine(WindowsAttachProvider.java:69)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
at org.netbeans.modules.profiler.NetBeansProfiler.loadAgentIntoTargetJVM(NetBeansProfiler.java:762)
at org.netbeans.modules.profiler.NetBeansProfiler.attachToApp(NetBeansProfiler.java:734)
at com.sun.tools.visualvm.profiler.ApplicationProfilerView$MasterViewSupport.startProfiling(ApplicationProfilerView.java:309)
at com.sun.tools.visualvm.profiler.ApplicationProfilerView$MasterViewSupport.access$900(ApplicationProfilerView.java:140)
at com.sun.tools.visualvm.profiler.ApplicationProfilerView$MasterViewSupport$3.run(ApplicationProfilerView.java:262)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1372)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1952)
Application runs on the same JVM HotSpot 1.07.0_21 x32 (VisualVM from JDK 1.6 works fine), using just next options:
-client -Xmx1524M
Any suggestions?
UPD: OS is WindowsXP sp3 x32
Have you checked their troubleshooting section?
in particular:
Insufficient permissions for %TMP%\hsperfdata_username folder - make
sure you're able to create a file in the directory and eventually
update the permissions for full folder access. Alternatively you can
just re-create the folder which should automatically set the correct
access rights. See see this forums.sun.com thread for more details.
For me I got below error while creating the heap-dump:
[com.sun.tools.visualvm.attach.AttachModelImpl]: takeHeapDump java.io.IOException: Access is denied
I could manuallya access this folder %TMP%\hsperfdata_username.
Hence I thought of launching the visualVM in Administrator mode,It resolved the issue.
Thanks #Lorenzo for inputs.

Categories

Resources