Questions tagged with Mobile

Content language: English

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

How to know if a specific user is verified using the amazon-cognito-identity-js module if the type of the verification message is a link?

I'm building a mobile app with React Native that manages user registration and authentication with AWS Cognito. In order to integrate Cognito with my project I use amazon-cognito-identity-js. In order to verify the email of the recently added user I send a verification link (not verification code) that verifies the user if he clicks on it. After the user clicks the link, the confirmation status of the user changes from Unconfirmed to Confirmed inside the AWS Cognito console, and that's great, but I need to know from the JavaScript code if the user is indeed verified. What i'm supposed to do? I already know that if I send a verification code and not a link there's no problem because inside the app the user inputs the verification code previously received and then I just have to call the `CognitoUser.confirmRegistration(code: string, ...)` method in order to allow the user to continue with the registration process inside my app. If I Use a verification link I can't use that method because it takes a code as an argument. Checking [the only ressource available for amazon-cognito-identity-js](https://www.npmjs.com/package/amazon-cognito-identity-js) I found that there's not an attribute or method that let's you know if an specific user is verified or not, and if I'm not able to know if the user is verified or not I can't let him go to the following screens of the app. Thanks guys and I hope that there's a solution for this problem.
0
answers
0
votes
19
views
asked a month ago

Device Farm iOS Runtime not found

I'm trying to run a project built with Appium and webdriver.IO on iOS devices using Device Farm. The project is based on this boiler template provided by webdriver.IO (https://github.com/webdriverio/appium-boilerplate), but I'm not able to connect with the device. Here is what I have on my test spec yml: ``` version: 0.1 phases: install: commands: - export APPIUM_VERSION=1.19.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 - >- if [ $(echo $APPIUM_VERSION | cut -d "." -f2) -ge 19 ]; then DEVICEFARM_DEVICE_UDID_FOR_APPIUM=$(echo $DEVICEFARM_DEVICE_UDID | tr -d "-"); DEVICEFARM_WDA_DERIVED_DATA_PATH=$DEVICEFARM_WDA_DERIVED_DATA_PATH_V6; elif [ $(echo $APPIUM_VERSION | cut -d "." -f2) -ge 18 ]; then DEVICEFARM_DEVICE_UDID_FOR_APPIUM=$(echo $DEVICEFARM_DEVICE_UDID | tr -d "-"); DEVICEFARM_WDA_DERIVED_DATA_PATH=$DEVICEFARM_WDA_DERIVED_DATA_PATH_V5; elif [ $(echo $APPIUM_VERSION | cut -d "." -f2) -ge 17 ]; then DEVICEFARM_DEVICE_UDID_FOR_APPIUM=$(echo $DEVICEFARM_DEVICE_UDID | tr -d "-"); DEVICEFARM_WDA_DERIVED_DATA_PATH=$DEVICEFARM_WDA_DERIVED_DATA_PATH_V4; elif [ $(echo $APPIUM_VERSION | cut -d "." -f2) -ge 16 ]; then DEVICEFARM_DEVICE_UDID_FOR_APPIUM=$(echo $DEVICEFARM_DEVICE_UDID | tr -d "-"); DEVICEFARM_WDA_DERIVED_DATA_PATH=$DEVICEFARM_WDA_DERIVED_DATA_PATH_V3; elif [ $(echo $APPIUM_VERSION | cut -d "." -f2) -ge 15 ]; then DEVICEFARM_DEVICE_UDID_FOR_APPIUM=$(echo $DEVICEFARM_DEVICE_UDID | tr -d "-"); DEVICEFARM_WDA_DERIVED_DATA_PATH=$DEVICEFARM_WDA_DERIVED_DATA_PATH_V2; else DEVICEFARM_DEVICE_UDID_FOR_APPIUM=$DEVICEFARM_DEVICE_UDID; DEVICEFARM_WDA_DERIVED_DATA_PATH=$DEVICEFARM_WDA_DERIVED_DATA_PATH_V1; fi - nvm install 14.18.3 - echo "Navigate to test package directory" - cd $DEVICEFARM_TEST_PACKAGE_PATH - npm install *.tgz pre_test: commands: - echo "Start appium server" - >- appium --log-timestamp --default-capabilities "{\"usePrebuiltWDA\": true, \"derivedDataPath\":\"$DEVICEFARM_WDA_DERIVED_DATA_PATH\", \"deviceName\": \"$DEVICEFARM_DEVICE_NAME\", \"platformName\":\"$DEVICEFARM_DEVICE_PLATFORM_NAME\", \"app\":\"$DEVICEFARM_APP_PATH\", \"automationName\":\"XCUITest\", \"udid\":\"$DEVICEFARM_DEVICE_UDID_FOR_APPIUM\", \"platformVersion\":\"$DEVICEFARM_DEVICE_OS_VERSION\"}" >> $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: - echo "Navigate to test code directory" - cd $DEVICEFARM_TEST_PACKAGE_PATH/node_modules/my-project - echo "Start Appium Node test" - npm run ios.app post_test: commands: artifacts: - $DEVICEFARM_LOG_DIR ``` When it reaches the test command it fails with this error: ``` [0-0] 2022-10-12T18:40:09.878Z INFO webdriver: [POST] http://localhost:4723/session [0-0] 2022-10-12T18:40:09.878Z INFO webdriver: DATA { [0-0] capabilities: { [0-0] alwaysMatch: { [0-0] platformName: 'iOS', [0-0] 'appium:platformVersion': '15.0', [0-0] 'appium:deviceName': '00008110-000168240242801E', [0-0] 'appium:udid': '00008110000168240242801E', [0-0] 'appium:orientation': 'PORTRAIT', [0-0] 'appium:automationName': 'XCUITest', [0-0] 'appium:autoAcceptAlerts': true, [0-0] 'appium:app': '/tmp/scratchKIhaym.scratch/share-jDiY7x.scratch/app-UNungi.ipa', [0-0] 'appium:newCommandTimeout': 240 [0-0] }, [0-0] firstMatch: [ {} ] [0-0] }, [0-0] desiredCapabilities: { [0-0] platformName: 'iOS', [0-0] 'appium:platformVersion': '15.0', [0-0] 'appium:deviceName': '00008110-000168240242801E', [0-0] 'appium:udid': '00008110000168240242801E', [0-0] 'appium:orientation': 'PORTRAIT', [0-0] 'appium:automationName': 'XCUITest', [0-0] 'appium:autoAcceptAlerts': true, [0-0] 'appium:app': '/tmp/scratchKIhaym.scratch/share-jDiY7x.scratch/app-UNungi.ipa', [0-0] 'appium:newCommandTimeout': 240 [0-0] } [0-0] } [0-0] 2022-10-12T18:45:09.895Z ERROR webdriver: Request failed with status undefined due to TimeoutError: Timeout awaiting 'request' for 300000ms when running "http://localhost:4723/session" with method "POST" and args "{"capabilities":{"alwaysMatch":{"platformName":"iOS","appium:platformVersion":"15.0","appium:deviceName":"00008110-000168240242801E","appium:udid":"00008110000168240242801E","appium:orientation":"PORTRAIT","appium:automationName":"XCUITest","appium:autoAcceptAlerts":true,"appium:app":"/tmp/scratchKIhaym.scratch/share-jDiY7x.scratch/app-UNungi.ipa","appium:newCommandTimeout":240},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"iOS","appium:platformVersion":"15.0","appium:deviceName":"00008110-000168240242801E","appium:udid":"00008110000168240242801E","appium:orientation":"PORTRAIT","appium:automationName":"XCUITest","appium:autoAcceptAlerts":true,"appium:app":"/tmp/scratchKIhaym.scratch/share-jDiY7x.scratch/app-UNungi.ipa","appium:newCommandTimeout":240}}" [0-0] 2022-10-12T18:45:09.895Z ERROR webdriver: TimeoutError: Timeout awaiting 'request' for 300000ms when running "http://localhost:4723/session" with method "POST" and args "{"capabilities":{"alwaysMatch":{"platformName":"iOS","appium:platformVersion":"15.0","appium:deviceName":"00008110-000168240242801E","appium:udid":"00008110000168240242801E","appium:orientation":"PORTRAIT","appium:automationName":"XCUITest","appium:autoAcceptAlerts":true,"appium:app":"/tmp/scratchKIhaym.scratch/share-jDiY7x.scratch/app-UNungi.ipa","appium:newCommandTimeout":240},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"iOS","appium:platformVersion":"15.0","appium:deviceName":"00008110-000168240242801E","appium:udid":"00008110000168240242801E","appium:orientation":"PORTRAIT","appium:automationName":"XCUITest","appium:autoAcceptAlerts":true,"appium:app":"/tmp/scratchKIhaym.scratch/share-jDiY7x.scratch/app-UNungi.ipa","appium:newCommandTimeout":240}}" [0-0] at getTimeoutError (/private/tmp/scratchKIhaym.scratch/test-packageGHSSfw/node_modules/appium-qa-mobile-automation/node_modules/webdriver/build/utils.js:320:24) [0-0] at NodeJSRequest._request (/private/tmp/scratchKIhaym.scratch/test-packageGHSSfw/node_modules/appium-qa-mobile-automation/node_modules/webdriver/build/request/index.js:154:59) [0-0] at processTicksAndRejections (internal/process/task_queues.js:95:5) [0-0] at async startWebDriverSession (/private/tmp/scratchKIhaym.scratch/test-packageGHSSfw/node_modules/appium-qa-mobile-automation/node_modules/webdriver/build/utils.js:67:20) [0-0] at async Function.newSession (/private/tmp/scratchKIhaym.scratch/test-packageGHSSfw/node_modules/appium-qa-mobile-automation/node_modules/webdriver/build/index.js:46:45) [0-0] at async remote (/private/tmp/scratchKIhaym.scratch/test-packageGHSSfw/node_modules/appium-qa-mobile-automation/node_modules/webdriverio/build/index.js:77:22) [0-0] at async Runner._startSession (/private/tmp/scratchKIhaym.scratch/test-packageGHSSfw/node_modules/appium-qa-mobile-automation/node_modules/@wdio/runner/build/index.js:223:56) [0-0] at async Runner._initSession (/private/tmp/scratchKIhaym.scratch/test-packageGHSSfw/node_modules/appium-qa-mobile-automation/node_modules/@wdio/runner/build/index.js:176:25) [0-0] at async Runner.run (/private/tmp/scratchKIhaym.scratch/test-packageGHSSfw/node_modules/appium-qa-mobile-automation/node_modules/@wdio/runner/build/index.js:88:19) [0-0] 2022-10-12T18:45:09.903Z ERROR @wdio/runner: Error: Failed to create session. [0-0] Timeout awaiting 'request' for 300000ms when running "http://localhost:4723/session" with method "POST" and args "{"capabilities":{"alwaysMatch":{"platformName":"iOS","appium:platformVersion":"15.0","appium:deviceName":"00008110-000168240242801E","appium:udid":"00008110000168240242801E","appium:orientation":"PORTRAIT","appium:automationName":"XCUITest","appium:autoAcceptAlerts":true,"appium:app":"/tmp/scratchKIhaym.scratch/share-jDiY7x.scratch/app-UNungi.ipa","appium:newCommandTimeout":240},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"iOS","appium:platformVersion":"15.0","appium:deviceName":"00008110-000168240242801E","appium:udid":"00008110000168240242801E","appium:orientation":"PORTRAIT","appium:automationName":"XCUITest","appium:autoAcceptAlerts":true,"appium:app":"/tmp/scratchKIhaym.scratch/share-jDiY7x.scratch/app-UNungi.ipa","appium:newCommandTimeout":240}}" [0-0] at startWebDriverSession (/private/tmp/scratchKIhaym.scratch/test-packageGHSSfw/node_modules/appium-qa-mobile-automation/node_modules/webdriver/build/utils.js:72:15) [0-0] at processTicksAndRejections (internal/process/task_queues.js:95:5) [0-0] at async Function.newSession (/private/tmp/scratchKIhaym.scratch/test-packageGHSSfw/node_modules/appium-qa-mobile-automation/node_modules/webdriver/build/index.js:46:45) [0-0] at async remote (/private/tmp/scratchKIhaym.scratch/test-packageGHSSfw/node_modules/appium-qa-mobile-automation/node_modules/webdriverio/build/index.js:77:22) [0-0] at async Runner._startSession (/private/tmp/scratchKIhaym.scratch/test-packageGHSSfw/node_modules/appium-qa-mobile-automation/node_modules/@wdio/runner/build/index.js:223:56) [0-0] at async Runner._initSession (/private/tmp/scratchKIhaym.scratch/test-packageGHSSfw/node_modules/appium-qa-mobile-automation/node_modules/@wdio/runner/build/index.js:176:25) [0-0] at async Runner.run (/private/tmp/scratchKIhaym.scratch/test-packageGHSSfw/node_modules/appium-qa-mobile-automation/node_modules/@wdio/runner/build/index.js:88:19) 2022-10-12T18:45:10.037Z DEBUG @wdio/local-runner: Runner 0-0 finished with exit code 1 ```
0
answers
0
votes
18
views
asked 2 months ago