diff --git a/src/pages/docs/FAQs/web-apps/why-cloud-devices-cannot-access-local-apps.md b/src/pages/docs/FAQs/web-apps/why-cloud-devices-cannot-access-local-apps.md index 54fb5e8e..132e843b 100644 --- a/src/pages/docs/FAQs/web-apps/why-cloud-devices-cannot-access-local-apps.md +++ b/src/pages/docs/FAQs/web-apps/why-cloud-devices-cannot-access-local-apps.md @@ -1,5 +1,5 @@ --- -title: "Cloud based test machines unable to access locally hosted applications" +title: "Cloud Based Test Machines Unable to Access Locally Hosted Applications" metadesc: "During dev the apps are usually hosted on the local Development servers. This article explains why test machines on cloud are unable to access locally hosted apps." noindex: false order: 24.12 @@ -22,13 +22,19 @@ Perform the following check to confirm that your application under test is not a 1. Open your application URL in a workstation outside your company network. 2. If you can access the application from outside your company network (without VPN), you can run tests in our cloud devices. -
--- -##**Cloud based Test Labs** + +## **Cloud based Test Labs** Platforms like Testsigma, Sauce Labs, BrowserStack, etc. provide you with a fully-maintained lab of test machines for cross-browser and device testing. These test machines are hosted on their cloud networks. If your application under test is not publicly available you will not be able to run tests on these machines. Follow the below steps to test locally hosted applications on our cloud: -1. If your application is deployed only on your local machine and is not publicly accessible, for example, http://localhost:8080 -> This is a locally hosted application. No one else can access it via the internet. See [how to run your tests for locally hosted applications](https://testsigma.com/docs/runs/test-locally-hosted-applications/). -2. If your application is behind a firewall, you still have an option to use tunneling mechanisms to connect your application to Testsigma. To do this, first, contact your IT team and then contact Testsigma Support. For any more details on how to access local URLs via Testsigma, please contact Testsigma Support at [support@testsigma.com](mailto:support@testsigma.com) \ No newline at end of file +1. If your application is deployed only on your local machine and is not publicly accessible, for example, ```http://localhost:8080``` + - This is a locally hosted application. No one else can access it via the internet. + - For more information, see [how to run your tests for locally hosted applications](https://testsigma.com/docs/runs/test-locally-hosted-applications/). +2. If your application is behind a firewall, you still have an option to use tunneling mechanisms to connect your application to Testsigma. + - To do this, first, contact your IT team and then contact Testsigma Support. + - For any more details on how to access local URLs via Testsigma, please contact Testsigma Support at [support@testsigma.com](mailto:support@testsigma.com) + +--- \ No newline at end of file diff --git a/src/pages/docs/agent/troubleshooting/setup-issues.md b/src/pages/docs/agent/troubleshooting/setup-issues.md index ec3f564a..41bbcaf6 100644 --- a/src/pages/docs/agent/troubleshooting/setup-issues.md +++ b/src/pages/docs/agent/troubleshooting/setup-issues.md @@ -1,5 +1,5 @@ --- -title: "Troubleshooting Agent startup and registration errors" +title: "Troubleshooting Agent Startup & Registration Errors" metadesc: "Common Agent startup or registration issues and how to troubleshoot them. Learn how to resolve issue if the Agent stops working, or is starts and terminating immediately" noindex: false order: 11.91 @@ -92,8 +92,8 @@ You will see the following output:![process id](https://s3.amazonaws.com/static- Once the Testsigma Agent is started, Testsigma Agent web UI is accessible at -- (HTTP) OR -- (HTTPS). +- ```http://localhost:8383/agent``` (HTTP) OR +- ```https://local.testsigmaagent.com:8484/agent/``` (HTTPS). Try accessing the above localhost URLs after starting the agent. @@ -102,7 +102,7 @@ The reason behind doing so is to understand if the agent is accessible and has a If the above pages are accessible, proceed to the next step. -But if https://local.testsigmaagent.com:8484/agent/ is unreachable but http://127.0.0.1:8383/agent/ is reachable, the following entry needs to be added to hosts file: +But if ```https://local.testsigmaagent.com:8484/agent/``` is unreachable but ```http://127.0.0.1:8383/agent/``` is reachable, the following entry needs to be added to hosts file: `127.0.0.1 local.testsigmaagent.com` diff --git a/src/pages/docs/getting-started/setup/downloadable-package.md b/src/pages/docs/getting-started/setup/downloadable-package.md index 05cf7e08..84481948 100644 --- a/src/pages/docs/getting-started/setup/downloadable-package.md +++ b/src/pages/docs/getting-started/setup/downloadable-package.md @@ -91,9 +91,9 @@ Since we have UI components and API server separately we need a single applicati Testsigma follows API first approach, all APIs are served from this service. This service contains all APIs and business logic to support the Testsigma UI and all other backend processes. Testsigma Server is a Spring Boot application that runs on port 9090 by default. Make sure that 9090 is free. If you want to change the port follow the steps below.
- Before changing the ports, stop Nginx, Testsigma Server and Testsigma Agent.
-- Navigate to the Nginx folder from the downloaded Testsigma zip and open nginx.conf. In the text http://localhost:9090 replace the port you would like to use and save it.
+- Navigate to the Nginx folder from the downloaded Testsigma zip and open nginx.conf. In the text ```http://localhost:9090``` replace the port you would like to use and save it.
- Before starting the Testsigma server set the environment variable TESTSIGMA\_SERVER\_PORT to the port you want
-- Before starting the Testsigma agent, set the environment variable LOCAL\_SERVER\_URL to http://localhost: here you can replace with the port you would like to use.
+- Before starting the Testsigma agent, set the environment variable LOCAL\_SERVER\_URL to ```http://localhost:``` here you can replace with the port you would like to use.
--- @@ -101,7 +101,7 @@ Testsigma follows API first approach, all APIs are served from this service. Thi Testsigma Agent is a microservice that processes test case data and runs tests on browsers and mobile devices. The Testsigma agent runs on ports 9393 (HTTP) and 9494 (HTTPS) by default. If you want to change these ports, follow the steps below:
- Before changing the ports, stop Nginx, Testsigma Server, and Testsigma Agent.
-- Before starting the Testsigma server you need to set the environment variable LOCAL\_AGENT\_URL= https://localhost:, here you can replace the with the port you want to use for the agent.
+- Before starting the Testsigma server you need to set the environment variable LOCAL\_AGENT\_URL= ```https://localhost:```, here you can replace the with the port you want to use for the agent.
- Before starting the Testsigma agent you need to set the environment variables TESTSIGMA\_AGENT\_HTTP\_PORT for HTTP port and TESTSIGMA\_AGENT\_HTTPS\_PORT for HTTPS port.
--- @@ -155,7 +155,7 @@ Testsigma Agent is a microservice that processes test case data and runs tests o ## **Verifying the installation** -Your Testsigma server should be up and running now. Testsigma server will be accessible at https://local.testsigmaos.com/ui +Your Testsigma server should be up and running now. Testsigma server will be accessible at ```https://local.testsigmaos.com/ui``` --- @@ -165,7 +165,7 @@ Your Testsigma server should be up and running now. Testsigma server will be acc 2. Delete the Testsigma Installation folder 3. Download the latest version from here https://github.com/testsigmahq/testsigma/releases/latest/ 4. Repeat the steps explained in “Step2: Run Services” section - 5. Now login to check the updated version of Testsigma Server here https://local.testsigmaos.com/ui + 5. Now login to check the updated version of Testsigma Server here ```https://local.testsigmaos.com/ui``` --- diff --git a/src/pages/docs/runs/executing-tests-in-private-grid.md b/src/pages/docs/runs/executing-tests-in-private-grid.md index 3d1d5970..161ddfff 100644 --- a/src/pages/docs/runs/executing-tests-in-private-grid.md +++ b/src/pages/docs/runs/executing-tests-in-private-grid.md @@ -102,7 +102,7 @@ To start the **Private Grid Hub**, open the **Terminal** at **Private Grid** fol
java -jar selenium-server-4.13.0.jar hub
-Once the **Private Grid** starts, open http://localhost:4444 +Once the **Private Grid** starts, open ```http://localhost:4444``` To start the Web Nodes, open the new tab on the same Terminal and use the following command: diff --git a/src/pages/docs/troubleshooting/mobile-apps/handling-ios-app-compatibility-issues.md b/src/pages/docs/troubleshooting/mobile-apps/handling-ios-app-compatibility-issues.md index 2654250b..52dd9d76 100644 --- a/src/pages/docs/troubleshooting/mobile-apps/handling-ios-app-compatibility-issues.md +++ b/src/pages/docs/troubleshooting/mobile-apps/handling-ios-app-compatibility-issues.md @@ -34,7 +34,101 @@ To prevent issues during testing, ensure the app accesses these entitlements pro ### **2. Handling Keychain Access Groups** -Resigning the app changes the Team ID, which can cause issues if keychain access groups are hardcoded. To avoid this, ensure that the Team ID is retrieved programmatically during runtime instead of relying on fixed values. +While resigning the app, Testsigma uses a wildcard Team ID, which may conflict with the access group expected by the app, resulting in a keychain access error. + +![Error](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/errormsgipa.gif) + +### **Generic Error Message:** + +``` +: [App Name][PID]/1#4 LF=0 copy_matching Error +Domain=NSOSStatusErrorDomain Code=-34018 +"Client explicitly specifies access group [App-Specific-Access-Group] but is only entitled for ( + "[Testsigma-TeamId].*", + "com.apple.token" +)" +UserInfo={numberOfErrorsDeep=0, NSDescription=Client explicitly specifies access group +[App-Specific-Access-Group] but is only entitled for ( + "[Testsigma-TeamId].*", + "com.apple.token" +)} +: ERROR ::: KeyChainTokenStore ::: getUser Failed: The operation couldn't be completed. (OSStatus error -34018.) + +``` + +### **How to Avoid this Error?** +Modify the app in such a way that it dynamically retrieves the Team ID from its entitlements instead of hardcoding it. This flexibility ensures compatibility with Testsigma’s resigning process. + +### **Examples for Dynamic Retrieval** + +**Example 1:** +``` +import Foundation + +func getTeamIDFromEntitlements() -> String? { + guard let entitlements = Bundle.main.infoDictionary else { + return nil + } + if let teamID = entitlements["AppIdentifierPrefix"] as? [String] { + return teamID.first?.trimmingCharacters(in: .whitespaces) + } + return nil +} + +// Usage +if let teamID = getTeamIDFromEntitlements() { + print("Team ID: \(teamID)") +} else { + print("Failed to retrieve Team ID") +} + +``` + +**Example 2:** + +``` +import Foundation +import Security + +class KeychainHelper { + static let shared = KeychainHelper() + + enum KeyChainAccessError: Error { + case accessGroupNotFound + } + + func getAccessGroup() throws -> String { + guard let path = Bundle.main.path(forResource: "sample_keychain_access", ofType: "entitlements") else { + print("Entitlements file path not found.") + throw KeyChainAccessError.accessGroupNotFound + } + + print("Entitlements file path: \(path)") + + guard let dict = NSDictionary(contentsOfFile: path) as? [String: Any] else { + print("Failed to read contents of the entitlements file.") + throw KeyChainAccessError.accessGroupNotFound + } + + print("Entitlements contents: \(dict)") + + guard let accessGroups = dict["keychain-access-groups"] as? [String], + let accessGroup = accessGroups.first else { + print("No access groups found.") + throw KeyChainAccessError.accessGroupNotFound + } + + return accessGroup + } +} +``` + +### **Dynamic Prefix for App Identifier** +In the example below, **Item 1** provides explicit app identifier prefixes, minimizing risks, while **Item 2** leads to ambiguity. It is recommended that you follow **Item 1** to avoid the error. +![Dynamic Prefix](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ipafiledynamicprefix.png) + + +Using a flexible approach to access group verification like retrieving the Team ID programmatically and applying a wildcard format, the app can be made compatible with Testsigma's resigning process. This approach reduces errors like `OSStatus error -34018` and ensures a smoother testing experience across various environments. --- \ No newline at end of file diff --git a/src/pages/docs/troubleshooting/web-apps/url-not-accessible.md b/src/pages/docs/troubleshooting/web-apps/url-not-accessible.md index 8c259435..0e33326f 100644 --- a/src/pages/docs/troubleshooting/web-apps/url-not-accessible.md +++ b/src/pages/docs/troubleshooting/web-apps/url-not-accessible.md @@ -31,7 +31,7 @@ In the above scenarios, Testsigma's cloud servers will not be able to access the ### **Follow these steps to automate locally hosted applications:** -1. If your application is deployed only on your local machine and is not publicly accessible, for example, **http://localhost:8080**. This is a locally hosted application. No one else can access it via the internet. For more information, refer the following: +1. If your application is deployed only on your local machine and is not publicly accessible, for example, ```http://localhost:8080```. This is a locally hosted application. No one else can access it via the internet. For more information, refer the following: - [Dry Runs on Local Devices](https://testsigma.com/docs/runs/dry-runs-on-local-devices/) - [Test Plans on Local Devices](https://testsigma.com/docs/runs/test-plans-on-local-devices/) @@ -44,17 +44,17 @@ In the above scenarios, Testsigma's cloud servers will not be able to access the If you are not able to access URL's from using the extension, you may have one of the below issues: -**What to do for chrome extension error "Not able to record as third-party cookies are blocked by the browser"?** +1. **What to do for chrome extension error "Not able to record as third-party cookies are blocked by the browser"?** -Go to this URL in Chrome **chrome://settings/cookies** and select **Allow all cookies** or **Block third-party cookies incognito**, you should not see this error post this. + **Sol:** Go to this URL in Chrome **chrome://settings/cookies** and select **Allow all cookies** or **Block third-party cookies incognito**, you should not see this error post this. - + -**What to do for chrome extensions error "Not able to access local files and urls"?** +2. **What to do for chrome extensions error "Not able to access local files and urls"?** -Please go to the following Extensions icon in **Chrome > Manage Extenstion > Testsigma Extension > Details** and Toggle on **Allow access to File URL’s** + **Sol:** Go to the following Extensions icon in **Chrome > Manage Extenstion > Testsigma Extension > Details** and Toggle on **Allow access to File URL’s** - + --- \ No newline at end of file