Make sure the correct deployment target has been selected for its compilation in Xcode - selenium

I am using the following desiredCapabilities in my codeceptconf.js file.
Appium: { // IOS local Simulator iPhone 13
app: "./ipa/arvApp.app",
platform: "iOS",
desiredCapabilities: {
deviceName: "iPhone 13",
//os_version: "15.5",
"automationName": "XCUITest",
autoAcceptAlerts: 'true' ,
autoDissmissAlerts: 'true',
},
}
Facing the below error -
App Launch And Login options. --
Navigate to just browse in app and Login with Gmail
2022-10-04T17:44:00.627Z ERROR webdriver: Request failed with status 500 due to
unknown error: An unknown server-side error occurred while processing the command.
Original error: Simulator architecture is unsupported by the
'/Users/jule/Desktop/arive/automation/ipa/ariveApp.app' application. Make sure the
correct deployment target has been selected for its compilation in Xcode.
2022-10-04T17:44:00.628Z ERROR webdriver: unknown error: An unknown server-side
error occurred while processing the command. Original error: Simulator architecture is unsupported by the '/Users/jule/Desktop/arive/automation/ipa/ariveApp.app' application. Make sure the correct deployment target has been selected for its compilation in Xcode.
at getErrorFromResponseBody (/Users/jule/Desktop/arive/automation/node_modules/webdriver/build/utils.js:197:12)
at NodeJSRequest._request (/Users/jule/Desktop/arive/automation/node_modules/webdriver/build/request/index.js:166:60)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async startWebDriverSession (/Users/jule/Desktop/arive/automation/node_modules/webdriver/build/utils.js:67:20)
at async Function.newSession (/Users/jule/Desktop/arive/automation/node_modules/webdriver/build/index.js:46:45)
at async Object.remote (/Users/jule/Desktop/arive/automation/node_modules/webdriverio/build/index.js:77:22)
at async Appium._startBrowser (/Users/jule/Desktop/arive/automation/node_modules/codeceptjs/lib/helper/Appium.js:232:24)
Error: Can't connect to WebDriver.
Error: Failed to create session.
An unknown server-side error occurred while processing the command. Original error: Simulator architecture is unsupported by the '/Users/jule/Desktop/arive/automation/ipa/ariveApp.app' application. Make sure the correct deployment target has been selected for its compilation in Xcode.
Please make sure Selenium Server is running and accessible
I wait for element 30
✖ FAILED in 13ms
Please help to resolve this error.
Thanks

Related

Unable to Switch Appium Context

We have different WebView workflows for our App. I'm able to switch context for the Workflows which has contexts NATIVE_APP, WEBVIEW_com.bluebird.mobile and WEBVIEW_Terrace (3 contexts),
And not able to switch context for the workflows which has only two context NATIVE_APP and WEBVIEW_Terrace. While switching the context I get the following error:
Appium error: An unknown server-side error occurred while processing the command.
Original error: An unknown server-side error occurred while processing the command.
Original error: unknown error: Failed to get sockets matching: #weblayer_devtools_remote_.*14722
(make sure the app has its WebView/WebLayer configured for debugging)
(Driver info: chromedriver=105.0.5195.52 (412c95e518836d8a7d97250d62b29c2ae6a26a85-refs/branch-heads/5195#{#853}), platform=Linux 5.16.7-200.fc35.x86_64 x86_64)
When I look on the internet for the error "make sure the app has its WebView/WebLayer configured for debugging", I see solution to set setWebContentsDebuggingEnabled to true and we already set this configuration because some of the workflows are working.
Please let me know what I need to do here? OR what can I ask my DEV team to fix this.

How to cache data on react-native-webview?

I want to create a simple webview app that shows the data of a website in an app. Is there a way to cache data in React Native Webview so that if there is no internet it shows cached screens.
I have tried react-native-offline-cache-webview but it does not work anymore. The app does not build and it shows the following error.
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/<user_name>/Projects/<app_name>/node_modules/react-native-offline-cache-webview/android/build.gradle' line: 43
* What went wrong:
A problem occurred evaluating project ':react-native-offline-cache-webview'.
> Could not find method compile() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Is there any other way to cache web pages in webview ?

React-Native "Could no connect to development server" in createReactContext()

My Android react-native app is crashing with an ExecutionException.
"Could not connect to development server."
The method that is crashing is ReactInstanceManagerImpl.createReactContext().
But this is not the normal error as this screenshot shows:
Logcat shows me this stacktrace:
Exception in native call from JS
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException:
Could not connect to development server.
at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:860)
at com.facebook.react.ReactInstanceManagerImpl.access$700(ReactInstanceManagerImpl.java:98)
at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:194)
...
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException:
at com.facebook.react.common.futures.SimpleSettableFuture.get(SimpleSettableFuture.java:68)
at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:831)
... 9 more
Caused by: java.lang.RuntimeException:
at com.facebook.react.bridge.ReactBridge.loadScriptFromFile(Native Method)
at com.facebook.react.bridge.JSBundleLoader$2.loadScript(JSBundleLoader.java:58)
at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:148)
at com.facebook.react.ReactInstanceManagerImpl$4.call(ReactInstanceManagerImpl.java:851)
...
This suggests that the server has sent the javascript code back to the device and the ReactBridge.loadScriptFromFile() somehow can't handle the bundle.
Points to clarify:
this happens on emulator & device (connected via USB)
this happens on Linux (Mint) & Windows (8.1)
I did run adb reverse tcp:8081 tcp:8081 as per the normal advice
I have run react-native start and the packager/server is running
the device DOES connect to the development server, as this is logged in the packager window
the URL that the device hits does return data, as can be seen if copied into the browser address bar
How is this different from the normal "Could not connect..." message?
Here is a screenshot of what happens when the server is legitimately not running:
The differences include:
no ExecutionException or RuntimeException before the error message
further clarity providing the URL that was called on the server
error comes from DevServerHelper.onFailure()
Logcat shows the stacktrace to be quite different in this normal expected case:
Unable to download JS bundle
com.facebook.react.devsupport.DebugServerException:
Could not connect to development server.
at com.facebook.react.devsupport.DevServerHelper$1.onFailure(DevServerHelper.java:196)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:140)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
This seems to have been caused by not having Windows Build Tools correctly installed. This broke the node-gyp commands required by my project.
Following the steps on the node-gyp page got my machine set up correctly.
After a new build I got this error once, and then it disappeared with the project building and running correctly.

Openui5 application in chrome app

Is it possible to build a chrome app of openui5 application.
I'm trying to do it but getting following errors while loading openui5 resources.
Uncaught Error: found in negative cache: 'sap/ui/core/Core.js' from
undefined/sap/ui/core/Core.js: Error: found in negative cache:
'jquery.sap.events.js' from undefined/jquery.sap.events.js: Error:
failed to load 'sap/ui/thirdparty/jquery-mobile-custom.js' from
resources/sap/ui/thirdparty/jquery-mobile-custom.js: 0 -
InvalidAccessError: Failed to execute 'open' on 'XMLHttpRequest':
Synchronous requests are disabled for this page.

Selenium CaptureEntireScreenShot throws error in IE

How to resolve this below issues while capture screen in IE?
I have registered the snapsie.dll in C:\Windows
Error Detail:
"Error: Snapsie failed: Is it installed? Does it have permission to run as an add-on? See http://snapsie.sourceforge.net/"