AWS Device Farm testcases getting failed - appium-android

While running a test cases on AWS Device farm for Samsung Galaxy Note 10,I am getting following error.
P.S: This issue is not because of module.
Failed to start Appium server: uncaughtException: Cannot find module 'internal/util/types'
date=Fri Dec 11 2020 09:09:29 GMT+0000 (Coordinated Universal Time), pid=8265, uid=1001, gid=1001, cwd=/usr/local/avm/versions/1.4.16/node_modules/appium, execPath=/usr/bin/node, version=v10.14.0, argv=[/usr/bin/node, /usr/local/bin/appium, --pre-launch, --log-timestamp, --log-no-colors, --use-keystore, --app, /tmp/scratchHgV3fC.scratch/share-cDnEwS.scratch/app-lHmzCQ.apk, --udid, R58M78B6WRN, --address, 127.0.0.1, --port, 4723, --log-level, debug, --platform-name, Android, --tmp, /tmp/scratchHgV3fC.scratch/appium-CqtB4x, --device-name, R58M78B6WRN, --platform-version, 9, --app-pkg, com.audetemi.trackhelp, --app-activity, com.audetemi.trackhelp.ui.activities.SplashActivity, --chromedriver-executable, /opt/chromedriver/linux/65/chromedriver], rss=89526272, heapTotal=73527296, heapUsed=45065896, external=848015, loadavg=[0.4404296875, 0.4755859375, 0.431640625], uptime=6914, trace=[column=15, file=internal/modules/cjs/loader.js, function=Function.Module._resolveFilename, line=580, method=Module._resolveFilename, native=false, column=25, file=internal/modules/cjs/loader.js, function=Function.Module._load, line=506, method=Module._load, native=false, column=17, file=internal/modules/cjs/loader.js, function=Module.require, line=636, method=require, native=false, column=18, file=internal/modules/cjs/helpers.js, function=require, line=20, method=null, native=false, column=31, file=evalmachine.<anonymous>, function=null, line=44, method=null, native=false, column=1, file=/usr/local/avm/versions/1.4.16/node_modules/appium/node_modules/md5calculator/node_modules/unzip/node_modules/fstream/node_modules/graceful-fs/fs.js, function=, line=11, method=null, native=false, column=30, file=internal/modules/cjs/loader.js, function=Module._compile, line=688, method=_compile, native=false, column=10,

Your test code is using Appium server version 1.4.16, and this older version is no longer supported by AWS Device Farm. The minimum required Appium version on AWS Device Farm is 1.9.1, and using the custom test environment mode feature, you can use much more recent versions like 1.16.0.
To change your Appium version, standard mode users would change their version through the API's test parameter options (test -> parameters -> appium_version) in the ScheduleRun API (if using the CLI/SDK). Custom environment users would modify the beginning lines of the install phase of their test spec file (see https://docs.aws.amazon.com/devicefarm/latest/developerguide/custom-test-environments.html) to use a different version of appium node.
When scheduling a run from the AWS Device Farm console, there will be test spec examples for changing your Appium version using avm. I recommend taking a look at that sample file for an idea of how to use / configure the custom test environment mode.
If you are still having issues, you can typically get more specific help on the AWS Device Farm Forums or through the support email: aws-devicefarm-support#amazon.com

Related

Apache Ignite crash on startup

I'm using Apache Ignite entity framework Nuget as a second level cache in an ApsNetCore 2.0 web application under IIS(as reverse proxy).
On my development machine (VS2017 Windows 8.1) everything works well. Wen i deploy to WindowsServer 2012 the Ignite crash at startup with :
An error occurred while starting the application.
IgniteException: Failed to load jvm.dll (Please specify IgniteConfiguration.JvmDllPath or JAVA_HOME.)
Apache.Ignite.Core.Impl.Unmanaged.Jni.JvmDll.Load(string configJvmDllPath, ILogger log)
TargetInvocationException: Exception has been thrown by the target of an invocation.
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, bool publicOnly, bool noCheck, ref bool canBeCached, ref RuntimeMethodHandleInternal ctor, ref bool bNeedSecurityCheck)
IgniteException: Failed to load jvm.dll (Please specify IgniteConfiguration.JvmDllPath or JAVA_HOME.)
Apache.Ignite.Core.Impl.Unmanaged.Jni.JvmDll.Load(string configJvmDllPath, ILogger log)
Apache.Ignite.Core.Ignition.Start(IgniteConfiguration cfg)
Apache.Ignite.EntityFramework.IgniteDbConfiguration.GetOrStartIgnite(IgniteConfiguration cfg)
Apache.Ignite.EntityFramework.IgniteDbConfiguration..ctor()
I checked and re-chewed, installed the JDK , correct system variables....everything. The error don't goes away. What is interesting is the application run ok as console. When it runs under IIS(reverse proxy) it crashes at startup with the above error.
Any suggestions ?
Thank you
I managed to start the website. How ? Only with JDK 11 and explicit path to jvm.dll on app.config file:
If is not explicit in config then crashes.
The JAVA_HOME from system variable is correct set. Also the Path variable is
%JAVA_HOME%;%JAVA_HOME%\bin;%JAVA_HOME%\bin\server;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\dotnet;C:\Program Files (x86)\dotnet;C:\ProgramData\chocolatey\bin;C:\Program Files\Memurai;C:\Program Files\Java\jdk-15.0.1\bin\
Maybe is a conflict with C:\Program Files\Java\jdk-15.0.1\bin\ ? It carsh with jvm 15. But it works with jvm 11
Looks like the IIS worker process is running in 32-bit mode, so Ignite looks for a 32-bit JDK, which is not present.
And the console app runs in 64-bit mode, using 64-bit JDK, so it works.
Please check the app pool settings in IIS Manager -> Application Pools -> select the app pool you want and -> Advanced Settings.
Additionally, you can enable detailed logging to a file (since you can't see console logs in IIS) - Ignite logs all attempts to resolve the JDK path. For example, with Apache.Ignite.NLog package:
var nlogConfig = new LoggingConfiguration();
var fileTarget = new FileTarget
{
FileName = "/home/pavel/w/ignite_nlog.log"
};
nlogConfig.AddTarget("logfile", fileTarget);
nlogConfig.LoggingRules.Add(new LoggingRule("*", LogLevel.Trace, fileTarget));
LogManager.Configuration = nlogConfig;
var igniteConfig = new IgniteConfiguration
{
Logger = new IgniteNLogLogger()
};
Ignition.Start(igniteConfig);
I've checked the suggested points by Pavel Tupitsyn:
App pool aplication is 64bits (emable 32bits=false)
I've installed apache.Ignite.NLog
I'tested it on my machine and it logs well all java resolves.
I've deployed to windows server 2012 and under IIS i'm getting 'Process Failure'.
The log file looks like:
2020-12-07 19:39:38.3304|DEBUG||Starting Ignite.NET 2.9.0.50002
2020-12-07 19:39:38.3834|WARN||GC server mode is not enabled, this could lead to less than optimal performance on multi-core machines (to enable see http://msdn.microsoft.com/en-us/library/ms229357(v=vs.110).aspx).
2020-12-07 19:39:46.2534|DEBUG||Starting Ignite.NET 2.9.0.50002
so...just a warning (present on my machine too).
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info:
Apache.Ignite.Core.Common.IgniteException
at Apache.Ignite.Core.Impl.Unmanaged.Jni.JvmDll.Load(System.String, Apache.Ignite.Core.Log.ILogger)
at Apache.Ignite.Core.Ignition.Start(Apache.Ignite.Core.IgniteConfiguration)
at Nop.Web.Program.Main(System.String[])
well...adding apache.ingite.nlog throws PROCESS FAILURE
Hosting is virtual machine with Windows Server 2012 64bits
Any other ideas please....

Protractor - log type 'performance' not found error

webdriver-manager 12.1.5
protractor Version 5.4.2
Chrome version 75.0.3770.100
browser.manage().logs().get('performance');
This used to work fine before upgrading my webdriver-manager and protractor version.
(node:27715) UnhandledPromiseRejectionWarning: WebDriverError: invalid argument: log type 'performance' not found
(Session info: chrome=75.0.3770.100)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info:, os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.4', java.version: '1.8.0_191'
Driver info: driver.version: unknown
at Object.checkLegacyResponse (node_modules/selenium-webdriver/lib/error.js:546:15)
If I comment the browser.manage().logs().get('performance'); and other performance related code, then the test runs fine.
webdriver-manager logs show:
Starting ChromeDriver 75.0.3770.90 on port 12268
I came across a potential solution on this github issue thead. Apparently recently chromedriver has started to more strictly adhere to W3C standards and this has affected how webdriver activates logs.
We can get around this issue by setting the w3c: false flag in chromeoptions like so.
capabilities: {
browserName: 'chrome',
loggingPrefs: {
browser: 'ALL',
driver: 'ALL',
performance: 'ALL',
},
'goog:chromeOptions': {
perfLoggingPrefs: {
enableNetwork: true,
},
w3c: false,
},
},
New version might not support performance log type. You can always use getAvailableLogTypes function to check supported log types. I tried following code
var supportedLogTypes = await browser.manage().logs().getAvailableLogTypes();
received ouptput :
It means you can only use either of two supported log types.
I tried out the same thing with chrome 75.* and protractor 5.4.2 version. Following are my findings.
loggingPrefs object is one of the recognized capabilities like chromeOptions. This object allow us to decide preferences on logging part. Refer link for more details about capabilities.
In protractor context we have to pass loggingPrefs object to capabilities to enable it.
Once we pass it then we can use browser.manage().logs().get('performance'); to get all performance logs.
If you want to change perfLoggingPrefs then it is part of chromeOptions object and it has to be updated there. If we want to use default then no need to mention.
chrome use more strictly rule for w3c, when I test chrome driver 96, set w3c to false, I can get network log, but find_element failed and return dict value which is not WebElement

Appium - setting Desired Capabilities in both terminal and test code

I am trying to set some appium desired capabilities in the terminal window so that I can, for example, run my tests against different simulator devices:
Terminal: $ appium --device-name 'iPhone 6'
However, I am have to setup desired capabilities in my actual code, so I have a valid instance of IOSDriver. I use this code:
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("platformVersion", "8.3");
capabilities.setCapability("app","../Build/Products/Debug-iphonesimulator/LightAlarm.app");
driver = new IOSDriver(new URL("http://0.0.0.0:4723/wd/hub"),capabilities);
When I run my tests I get an error that deviceName is not being set:
The following desired capabilities are required, but were not provided: deviceName
However, my terminal appium server is all setup correctly:
info: Welcome to Appium v1.4.0 (REV dc30dae9e8fe8c85eeea707dbdbd60350fdff55b)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {"deviceName":"iPhone 6"}
info: Console LogLevel: debug
Any ideas what might be going wrong?

How to configure the Genymotion emulator to the appium?

Through eclipse I have configured the Genymotion path & also I have downloaded the virtual devices in the Genymotion.
In Appium, those downloaded virtual devices are visible in the"Launch Device" dropdown menu. Then I set the apk path & try to start the Appium 1.3.4.1.
By that time I am getting an error message like
Starting Node Server
usage: main.js [-h] [-v] [--shell]
main.js: error: Unrecognized arguments: Nexus 5 - 4.4.4 - API 19 - 1080x1920.
[--localizable-strings-dir LOCALIZABLESTRINGSDIR] [--app APP]
[--ipa IPA] [-U UDID] [-a ADDRESS] [-p PORT]
[-ca CALLBACKADDRESS] [-cp CALLBACKPORT] [-bp BOOTSTRAPPORT]
[-k] [-r BACKENDRETRIES] [--session-override] [--full-reset]
[--no-reset] [-l] [-lt LAUNCHTIMEOUT] [-g LOG]
[--log-level {info,info:debug,info:info,info:warn,info:error,warn,warn:debug,warn:info,warn:warn,warn:error,error,error:debug,error:info,error:warn,error:error,debug,debug:debug,debug:info,debug:warn,debug:error}]
[--log-timestamp] [--local-timezone] [--log-no-colors]
[-G WEBHOOK] [--native-instruments-lib]
[--app-pkg ANDROIDPACKAGE] [--app-activity ANDROIDACTIVITY]
[--app-wait-package ANDROIDWAITPACKAGE]
[--app-wait-activity ANDROIDWAITACTIVITY]
[--android-coverage ANDROIDCOVERAGE] [--avd AVD]
[--avd-args AVDARGS]
[--device-ready-timeout ANDROIDDEVICEREADYTIMEOUT] [--safari]
[--device-name DEVICENAME] [--platform-name PLATFORMNAME]
[--platform-version PLATFORMVERSION]
[--automation-name AUTOMATIONNAME] [--browser-name BROWSERNAME]
[--default-device] [--force-iphone] [--force-ipad]
[--language LANGUAGE] [--locale LOCALE]
[--calendar-format CALENDARFORMAT] [--orientation ORIENTATION]
[--tracetemplate AUTOMATIONTRACETEMPLATEPATH] [--show-sim-log]
[--show-ios-log] [--nodeconfig NODECONFIG] [-ra ROBOTADDRESS]
[-rp ROBOTPORT] [--selendroid-port SELENDROIDPORT]
[--chromedriver-port CHROMEDRIVERPORT]
[--chromedriver-executable CHROMEDRIVEREXECUTABLE]
[--use-keystore] [--keystore-path KEYSTOREPATH]
[--keystore-password KEYSTOREPASSWORD] [--key-alias KEYALIAS]
[--key-password KEYPASSWORD] [--show-config] [--no-perms-check]
[--command-timeout DEFAULTCOMMANDTIMEOUT] [--keep-keychains]
[--strict-caps] [--isolate-sim-device] [--tmp TMPDIR]
[--trace-dir TRACEDIR] [--intent-action INTENTACTION]
[--intent-category INTENTCATEGORY] [--intent-flags INTENTFLAGS]
[--intent-args OPTIONALINTENTARGUMENTS]
Node Server Process Ended
When I try to run with normal emulator in Android SDK it works well.
But I want to run it with Genymotion emulator. How to do? I'm stuck up here.
My questions are:
Whether the additional emulator will work in appium windows or not?
What I need to give in the "Argument" field under appium?
The following code works for the above question.
static String deviceName = "Google Nexus 5 - 4.4.4 - API 19 - 1080x1920";
public static void main(String[] args) throws InterruptedException, ExecuteException, IOException {
DesiredCapabilities capabilities = new DesiredCapabilities();
DefaultExecutor executor = new DefaultExecutor();
DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();
CommandLine launchEmul = new CommandLine("C:/Program Files/Genymobile/Genymotion/player");
launchEmul.addArgument("--vm-name");
launchEmul.addArgument("\""+deviceName+"\"");
executor.setExitValue(1);
executor.execute(launchEmul, resultHandler);
Thread.sleep(40);
capabilities.setCapability("deviceName","Google Nexus 5 - 4.4.4 API 19 - 1080x1920");
capabilities.setCapability("platformVersion", "4.3");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("app","D:/SOFTWARES/Apks/GOA.apk");
driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
System.out.println("SetUp is successful and Appium Driver is launched successfully");
}
Recently i i've used genymotion and appium and worked fine
1-i've installed appium(i've tried windows and console version succesfully)
2-i've installed genymotion and created a virtual device in it
3-launched virtual device from genymotion
4-in my test, when i defined driver capabilities, i didnt identified a specific virtual device, so, appium try to identify any active device(virtual or not)
try that and let me know if worked to help in anything i could

ATG Commerce v11 CRS install Error:

I have installed Oracle ATG v11 with the commerce reference store, when I startup the production server and go to the url domain/crs/storeus I see the blank white page, and have the following error in the console:
Oct 13, 2014 1:56:37 PM com.endeca.infront.site.SiteManager getSite
SEVERE: Unable to retrieve site definition for site id: /storeSiteUS
com.endeca.store.exceptions.PathNotFoundException: No node found at
path: [pages].
at com.endeca.store.configuration.InternalNode.getNode(InternalNode.java:153)
at com.endeca.store.configuration.InternalNode.getNodeInfo(InternalNode.java:221)
at com.endeca.store.configuration.InternalNode.getNode(InternalNode.java:150)
at com.endeca.store.configuration.InternalNode.getNode(InternalNode.java:61)
........................................
**** Error Mon Oct 13 13:00:47 +00:00 2014 1413205247448 /atg/endeca/assembler/droplet/InvokeAssembler A problem occurred
assembling the content for content item /content/Web/Home Pages. The
response received was {#type=ContentSlot,
atg:currentSiteProductionURL=/crs/storeus,
canonicalLink=com.endeca.infront.cartridge.model.NavigationAction#2b35e9c6,
ruleLimit=1, #error=com.endeca.infront.content.ContentException:
com.endeca.navigation.ENEConnectionException: Error establishing
connection to retrieve Navigation Engine request
http://localhost:15000/graph?node=0&profiles=sitegroup.siteGroupUS|NoPriceRange|site.storeSiteUS&offset=0&nbins=0&irversion=640'.
Tried all: '2' addresses, but could not connect over HTTP to server:
'localhost', port: '15000' Check MDEX Logs and specified query
parameters. , contentCollection=/content/Web/Home Pages}. Servicing
the error open parameter.
I am assuming this error is related to endeca? I have downloaded CAS, Tools And Frameworks with experience manager and MDX, and Platform Services. Do I need to start these or have I missed a part of the endeca install?
The value of the configurationPath attribute in the DefaultFileStoreFactory.properties located at \localconfig\atg\endeca\assembler\cartridge\manager may be incorrect.
In OOTB CRS, we normally provide the following value for configurationPath attribute :
/ToolsAndFrameworks/11.1.0/server/workspace/state/repository/CRS
Could you please verify the .zip is present at path provided in DefaultFileStoreFactory.properties.
Just check if you are able to connect the below url:
host:15000/admin?op=stats
If you are able to connect this URL, then MDEX is running. Also, you can login to the experience manager and check if the dgraphs and dgidx are running.
If you are not able to connect then check all the services are(tools and http) running and accessible. You can check the endeca logs to debug further.
Your DGraph is not (yet) started.
(Hit this URL in your browser and verify: http://localhost:15000/graph?node=0&profiles=sitegroup.siteGroupUS|NoPriceRange|site.storeSiteUS&offset=0&nbins=0&irversion=640&format=xml)
Possible reasons are:
You did not run baseline update from ATG (from
ProductCatalogSimpleIndexingAdmin dyn/admin component).
You did not run promote content (from your Endeca App's control folder).
Your Services are not working properly (or not started at all). Check that Platform Services and Tools And Frameworks are started.
The solution is to properly define the value for the property configurationPath=E:/Endeca/Apps/CRS/data/workbench/application_export_archive/CRS in "DefaultFileStoreFactory.properties"
If you are using the OS as Windows then define this path as Unix style as shown above.