By using AWS re:Post, you agree to the Terms of Use
/Mobile/

Mobile

Quickly build mobile and web apps. AWS offers a full set of tools and services to support development workflows for native iOS/Android, React Native, and front-end web developers. Easily build, test, and deploy your app, even if you are new to AWS. Scale your app from prototype to millions of users, and quickly drive your business forward.

Recent questions

see all
1/18

Webdriver testcases are failing while setting connection

Trying to deploy a basic webdriver.io + nodejs test on devicefarm but always for ios device test cases are getting stuck at Testcase is failing: job arn: arn:aws:devicefarm:us-west-2:612756076442:job:02bd6c95-640d-43b3-82eb-6f618777ac73/1a6364f3-7528-44b1-afa1-d6c2dc51d881/00000 ``` 2022-05-04T22:40:58.353Z ERROR @wdio/runner: Error: Failed to create session. [0-0] Unable to connect to "http://localhost:4723/", make sure browser driver is running on that address. [0-0] If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver. [0-0] at startWebDriverSession (/private/tmp/scratchY4h2F6.scratch/test-packagex5aknf/node_modules/integration/node_modules/webdriver/build/utils.js:72:15) [0-0] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [0-0] at async Function.newSession (/private/tmp/scratchY4h2F6.scratch/test-packagex5aknf/node_modules/integration/node_modules/webdriver/build/index.js:46:45) [0-0] at async remote (/private/tmp/scratchY4h2F6.scratch/test-packagex5aknf/node_modules/integration/node_modules/webdriverio/build/index.js:77:22) [0-0] at async Runner._startSession (/private/tmp/scratchY4h2F6.scratch/test-packagex5aknf/node_modules/integration/node_modules/@wdio/runner/build/index.js:223:56) ``` and for android testcases is asking for node version greater than 12 (after adding nvm install 18.1.0 in yaml)
0
answers
0
votes
1
views
asked 14 days ago

Access S3 files from Unity for mobile development

I'm trying to configure the AWS S3 service to download the included files in a bucket using Unity for mobile. I downloaded the SDK package and I got it installed. From AWS console I set up a IAM policy and roles for unauth users I created a Cognito IdentityPool and got the relative id I set up the S3 bucket and its policy using the generator, including the **arn:aws:iam::{id}:role/{cognito unauth role}** and the resource **arn:aws:s3:::{bucket name}/***. In code I set credentials and region and create CognitoAWSCredentials (C# used) ```C# _credentials = new CognitoAWSCredentials(IdentityPoolId, _CognitoIdentityRegion); ``` then I create the client: ```C# _s3Client = new AmazonS3Client(_credentials, RegionEndpoint.EUCentral1); // the region is the same in _CognitoIdentityRegion ``` I then try to use the s3Client to get my files (in bucketname subfolders) ``` private void GetAWSObject(string S3BucketName, string folder, string sampleFileName, IAmazonS3 s3Client) { string message = string.Format("fetching {0} from bucket {1}", sampleFileName, S3BucketName); Debug.LogWarning(message); s3Client.GetObjectAsync(S3BucketName, folder + "/" + sampleFileName, (responseObj) => { var response = responseObj.Response; if (response.ResponseStream != null) { string path = Application.persistentDataPath + "/" + folder + "/" + sampleFileName; Debug.LogWarning("\nDownload path AWS: " + path); using (var fs = System.IO.File.Create(path)) { byte[] buffer = new byte[81920]; int count; while ((count = response.ResponseStream.Read(buffer, 0, buffer.Length)) != 0) fs.Write(buffer, 0, count); fs.Flush(); } } else { Debug.LogWarning("-----> response.ResponseStream is null"); } }); } ``` At this point I cannot debug into the Async method, I don't get any kind of error, I don't get any file downloaded and I even cannot check is connection to AWS S3 has worked in some part of the script. What am I doing wrong? Thanks for help a lot!
0
answers
0
votes
3
views
asked a month ago

Appium Java Test NG tests are not running in the AWS Device Farm

Hello Guys, I am trying to run the appium Test NG automated tests using teng.xml file with device farm. However, my tests are not running after unzipping the tests.jar file. There is no error in the log file, so I am unable to find out the reason. Custom environment yaml file: ``` version: 0.1 phases: install: commands: # This test execution environment uses Appium version 1.9.1 by default, however we enable you to change it using the Appium version manager (avm). An - export APPIUM_VERSION=1.18.0 - avm $APPIUM_VERSION - ln -s /usr/local/avm/versions/$APPIUM_VERSION/node_modules/.bin/appium /usr/local/avm/versions/$APPIUM_VERSION/node_modules/appium/bin/appium.js # The pre-test phase includes commands that setup your test environment. pre_test: commands: # Setup environment variables for java - export CLASSPATH=$CLASSPATH:$DEVICEFARM_TESTNG_JAR - export CLASSPATH=$CLASSPATH:$DEVICEFARM_TEST_PACKAGE_PATH/* - export CLASSPATH=$CLASSPATH:$DEVICEFARM_TEST_PACKAGE_PATH/dependency-jars/* - echo "Start appium server" - >- appium --log-timestamp --default-capabilities "{\"deviceName\": \"$DEVICEFARM_DEVICE_NAME\", \"platformName\":\"$DEVICEFARM_DEVICE_PLATFORM_NAME\", \"app\":\"$DEVICEFARM_APP_PATH\", \"udid\":\"$DEVICEFARM_DEVICE_UDID\", \"platformVersion\":\"$DEVICEFARM_DEVICE_OS_VERSION\", \"chromedriverExecutable\":\"$DEVICEFARM_CHROMEDRIVER_EXECUTABLE\"}" >> $DEVICEFARM_LOG_DIR/appiumlog.txt 2>&1 & - >- start_appium_timeout=0; while [ true ]; do if [ $start_appium_timeout -gt 60 ]; then echo "appium server never started in 60 seconds. Exiting"; exit 1; fi; grep -i "Appium REST http interface listener started on 0.0.0.0:4723" $DEVICEFARM_LOG_DIR/appiumlog.txt >> /dev/null 2>&1; if [ $? -eq 0 ]; then echo "Appium REST http interface listener started on 0.0.0.0:4723"; break; else echo "Waiting for appium server to start. Sleeping for 1 second"; sleep 1; start_appium_timeout=$((start_appium_timeout+1)); fi; done; test: commands: # Your test package is downloaded in $DEVICEFARM_TEST_PACKAGE_PATH so we first change directory to that path. - echo "Navigate to test package directory" - cd $DEVICEFARM_TEST_PACKAGE_PATH # 1. Your testng.xml is inside the test jar after packaging step. Unzip it using commands: - echo "Unzipping TestNG tests jar" - unzip *-tests.jar # 2. Run your TestSuite by specifying the unzipped testng.xml using commands: - ls -ltr - which appium - appium -v - pwd - node -v - appium -v - which node - echo $DEVICEFARM_LOG_DIR - echo "Start Appium TestNG test" - java org.testng.TestNG -d $DEVICEFARM_LOG_DIR/test-output testng_android.xml ``` Error Log: ``` [DeviceFarm] echo "Start Appium TestNG test" Start Appium TestNG test [DeviceFarm] java org.testng.TestNG -d $DEVICEFARM_LOG_DIR/test-output testng_android.xml log4j:WARN No appenders could be found for logger (mobile.common.filereader.ConfigFileReaderUtils). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. [TestNG] Running: /tmp/scratchDVpVKr.scratch/test-packagemJj_ph/testng_android.xml =============================================== Android Regression Tests Total tests run: 2, Failures: 0, Skips: 2 Configuration Failures: 2, Skips: 1 =============================================== ``` https://us-west-2.console.aws.amazon.com/devicefarm/home?region=us-east-1#/mobile/projects/e7d85810-369a-443b-ac29-86ab38065b81/runs/6d8ad0d2-394c-4de5-898a-eed8e816745c/jobs/00000 Could someone please help me out ? Regards, Sekar
3
answers
0
votes
6
views
asked 2 months ago
1
answers
0
votes
8
views
asked 5 months ago

Popular users

see all
1/14