> For the complete documentation index, see [llms.txt](https://help.autify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.autify.com/nocode-web/en/when-the-test-doesnt-work/common-errors/autify-connect-common-errors.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# Autify Connect Tips and Common Errors

## I am not able to use Autify Connect to test websites running on localhost <a href="#i-am-not-able-to-use-autify-connect-to-test-websites" id="i-am-not-able-to-use-autify-connect-to-test-websites"></a>

localhost tests will not work correctly if the target URL of the scenario links directly to a local host or local network, such as `http://localhost` and `http://127.0.0.1`.

Instead, please use one of the following methods to run tests:

1. Use `localhost.autify.com`.

   We have an FQDN pointing to `127.0.0.1`. You can use this FQDN instead of `localhost` or `127.0.0.1`.

   If you have already recorded a test scenario with a hostname such as `localhost`, you can use the URL Replacement feature in the test plan.
2. Use another IP address, such as `192.168.86.92`.
3. Edit the `hosts` file and set an application alias as follows:

   ```
   127.0.0.1       local.your-application.com
   ::1             local.your-application.com

   ```

   The `hosts` file is usually located at the following path:

   | OS           | Path                                  |
   | ------------ | ------------------------------------- |
   | Linux, macOS | /etc/hosts                            |
   | Windows      | c:\Windows\System32\Drivers\etc\hosts |

Note that the following hostnames are not supported (this is not an exhaustive list).

```
localhost
*.localhost
[::1]
127.0.0.1/8
169.254/16
[FE80::]/10
```

If you record a scenario using these hostnames, you will need to implement one of the methods described above.

{% hint style="warning" %}
Tests using Windows OS, for example, will also recognize `loopback`
{% endhint %}

## I get a “ERR\_SSL\_PROTOCOL\_ERROR” error when executing a test against a website that uses a HTTPS scheme

Try to use 443 for the port of the application under test (e.g <https://local.autify.com:443>), or use http instead of https.

## Why did my test fail with an error of “The site can’t be reached” ERR\_TUNNEL\_CONNECTION\_FAILED. “

This error can be caused by a number of reasons listed below:

* Poor network performance in the environment (this is the most frequent cause of this error)
* The Autify Connect client was shut down during test execution
* Poor application performance under high traffic (e.g. when running lots of test scenarios to a localhost application with \~10 parallel)
* The Autify Connect server has a problem and isn’t able to handle test connections.

## How to write logs in JSON format

To help troubleshoot an issue, our Customer Support team will sometimes request Autify Connect client logs in JSON format.

To do so, run `autifyconnect` with the `--log-format=json` option.

```
$ autifyconnect --log-format=json

{
  "level": "info",
  "ts": "2022-09-07T19:56:07.862+0900",
  "msg": "Starting to establish a secure connection with the Autify connect server. Your session ID is \"{sessionID}\"."
}
```

{% hint style="info" %}
**Log level information**

More details about log levels are provided in the [log level](#log-level) section below
{% endhint %}

## How to save Autify Connect client logs

**Linux / macOS / Windows Powershell users** The built-in `tee` command can be used to write Autify Connect logs to a file as follows:

```
autifyconnect -V --log-format=json  | tee your-log-filename.log
```

## Log level <a href="#log-level" id="log-level"></a>

The `level` field represents the log level. There are four log levels.

| Log level | Description                                                                                                                                                                                                                                  |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| error     | Application error. Something is wrong with the Autify Connect client.                                                                                                                                                                        |
| warn      | Warning logs when there is something notable to know clues of failures. For instance, if the destination is not accessible from your Autify Connect client, the client will log a warn level message.                                        |
| info      | Used for normal events, such as establishing a connection with the Autify Connect server.                                                                                                                                                    |
| debug     | Debug information that is written only when the Autify Connect client launches with the `—-verbose` option. It includes all transferred messages over the secure connection between the Autify Connect client and the Autify Connect server. |

## How to continously check the status of the Autify Connect client's connection <a href="#how-to-continously-check-the-status-of-the-autify-connect" id="how-to-continously-check-the-status-of-the-autify-connect"></a>

To continuously verify that `autifyconnect` is connected to the Autify Connect server and ready to use for test executions, use the `--debug-server-port` option that was added in v0.5.8 (see [Autify Connect client Release Notes (autifyconnect command)](https://help.autify.com/nocode-web/en/autify-university/advanced/tests-on-private-environments/autify-connect-release-notes.md) for more details).

Using this option, a server for debugging and monitoring launches on your local machine on the specified port.

For example, the command below runs the `autifyconnect` application which serves the debug server endpoint on port 9191.

```bash
$ autifyconnect --debug-server-port 9191
```

Once the debug server is running, the status of the Autify Connect client can be checked using the `/status` endpoint. When the Autify Connect client is ready, the response after checking that endpoint will be like this:

```bash
$ curl http://localhost:9191/status

{
  "status": "ready",
  "message": "(description)..."
}
```

For more detailed information about other statuses and their meaning, please refer to the table below:

| Status       | Description                                                                                                  |
| ------------ | ------------------------------------------------------------------------------------------------------------ |
| Ready        | The Autify Connect client is connected to the Autify Connect server and is ready to use for test executions. |
| Starting     | The Autify Connect client is starting but has not successfully connected to the Autify Connect server yet.   |
| Reconnecting | The Autify Connect client is disconnected from the Autify Connect server and is trying to reconnect.         |

## Tests using Autify Connect that were previously successful have now started failing

If a test that was previously successful starts to fail, please try the following methods:

### 1. Confirm that the application under test is accessible locally

On the machine running Autify Connect, open a browser and confirm the following:

1. The application under test can be accessed using the *exact same URL* specified in the test scenario
2. The steps in the failing test scenario can be performed manually without any problems

### 2. Restart Autify Connect Client

Please try restarting the Autify Connect Client to see if the issue is resolved.

***

## If the methods above do not resolve the issue, please provide the following information to Autify Support

### 1. Autify Connect Client version

Check the version you are using by executing the command below:

```
./autifyconnect --version
```

### 2. Autify Connect Client log

Detailed startup logs can be created by launching the Autify Connect Client with the -V option.

Please refer to the "**How to write logs in JSON format**" and "**How to save Autify Connect client logs**" section for how to get the log.

{% hint style="info" %}
**Notes:**

* When sharing logs, please include all output. If there are concerns regarding sensitive information such as proxy server details, you may replace them as necessary.
* Using the above command to start the Autify Connect Client will output logs at all levels in JSON format. This document may also serve as a useful reference.
  {% endhint %}

### 3. Information about the device on which the Autify Connect Client Is installed

Please provide OS version information for the device that the Autify Connect Client is installed on.

### 4. Proxy Server details (if applicable)

If a proxy server is being used, please provide the name of the proxy software and the purpose.

{% hint style="info" %}
**Note:**

If you are not using a proxy server, please indicate that no proxy is being used.
{% endhint %}

### 4-1. Purpose

Please let us know which of the following applies to the communication expected to be routed via the proxy server:

* **A:** Between the Autify Connect Client and the Autify Connect server
* **B:** Between the Autify Connect Client and the target application under test
* **C:** Both A and B

### 4-2. Proxy Software Name

If possible, please provide the name of the proxy software used for the above communications.

### 5. Regarding the CLI Environment Being Used

Please let us know which CLI environment you are using, such as Terminal or PowerShell.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.autify.com/nocode-web/en/when-the-test-doesnt-work/common-errors/autify-connect-common-errors.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
