---
title: "Dex app troubleshooting and FAQ"
description: "Common problems when you import, build, test, and publish a Managed Dex App, with the cause and the fix of each."
canonical_url: "https://docs.superdurable.io/zh-Hans/reference/dex-app/troubleshooting/"
source: "docs/reference/dex-app/troubleshooting.mdx"
locale: "en"
site_locale: "zh-Hans"
---

> 供 AI Agent 使用的全部页面索引：https://docs.superdurable.io/zh-Hans/llms.txt

> 本页内容是英文原文，中文译文还在准备中。

<a id="dex-app-troubleshooting-and-faq"></a>

# Dex app troubleshooting and FAQ

This page lists common problems of a [Managed Dex App](https://docs.superdurable.io/zh-Hans/components/managed-dex-app.md), with the cause and the fix of each. For a finding of the import check, start with its section in [Read an import report](https://docs.superdurable.io/zh-Hans/reference/dex-app/manifest.md#import-report).

<a id="old-manifest-location"></a>

## Import refused with `template_manifest_missing` and `app_manifest_invalid` on an older repository

**Cause.** The repository uses the earlier manifest location and schema. It keeps the template manifest at `.superverse/template.json`, and `dex-app.yaml` has `schemaVersion: superverse.dev/dex-app/v1`. Dex Cloud reads `.dex/template.json` ([S1](https://docs.superdurable.io/zh-Hans/reference/dex-app/manifest.md#s1)) and accepts only `schemaVersion: dex.superdurable.io/dex-app/v1` ([S2](https://docs.superdurable.io/zh-Hans/reference/dex-app/manifest.md#top-level-fields)).

**Fix.** Move the template manifest and set the new schema version:

```bash
mkdir -p .dex && git mv .superverse/template.json .dex/template.json
```

```yaml
# dex-app.yaml
schemaVersion: dex.superdurable.io/dex-app/v1
```

Push to `main` and check again. In an existing project, the agent's commits fail until the rename lands, and the running workspace installs dependencies only after `make bootstrap` or when it is recreated.

<a id="connector-package-not-published"></a>

## The Live build fails to install a connector package

**Cause.** The connector package is a local tarball in the repository, such as one under `.local-packages/`, or its name is wrong. The dependency stage of the Live build runs `npm ci` with only `package.json` and `package-lock.json`, so a tarball from the repository is missing there. Preview may still run. Dex Cloud uses only `@superdurable/connector-*` packages that the connector library has released, at the exact version that `dex-app.yaml` and `package-lock.json` pin. **Setup** resolves them from the connector library's catalog.

**Fix.** Use a released package and pin that release in `package.json`, `package-lock.json`, and the [`connectors`](https://docs.superdurable.io/zh-Hans/reference/dex-app/manifest.md#connectors) entry. A quick check of the name and version is npm. For example, the Hacker News connector is `@superdurable/connector-hackernews`:

```bash
npm view @superdurable/connector-hackernews versions
```

<a id="connector-steps-must-be-static"></a>

## "Building processes failed … Fix the process definitions" on a TypeScript process with connector Steps

Each connector Step of the Flow is reported as "must be static", or the failure gives the reason `CONNECTOR_PACKAGE`.

**Cause.** The build accepts a connector package that `dex-app.yaml` declares and `package-lock.json` locks at that version with a `sha512-` integrity. Here one of these is missing: the [`connectors`](https://docs.superdurable.io/zh-Hans/reference/dex-app/manifest.md#connectors) entry, the install at the declared version, or the lockfile entry with its integrity.

**Fix.** Install the package at the exact version, then make the `package` and `version` of its `dex-app.yaml` entry match:

```bash
npm install --save-exact <package>@<version>
```

Commit `package.json`, `package-lock.json`, and `dex-app.yaml` together.

<a id="duplicate-sdk-packages"></a>

## Two copies of `@superdurable/dex` or `@superdurable/connectors-sdk` after adding a connector

**Cause.** The connector needs a newer `@superdurable/dex` or `@superdurable/connectors-sdk` than the application pins. npm then installs a second copy for the connector.

**Fix.** Raise the application's pins to the versions the connector needs, run `npm install`, and check that each package appears in one version:

```bash
npm ls @superdurable/dex @superdurable/connectors-sdk
```

<a id="strict-yaml"></a>

## `dex-app.yaml` is refused for a YAML value

**Cause.** `dex-app.yaml` is strict YAML. The decoder refuses plain values that YAML libraries read differently, such as a version `0.6.0`, `yes` and `no`, and a number with a leading zero. It also refuses anchors, aliases, tags, and a repeated key.

**Fix.** Quote each value that must be a string, such as `version: "0.6.0"`, and write each key once. The [YAML rules](https://docs.superdurable.io/zh-Hans/reference/dex-app/manifest.md#yaml-rules) list every refused form.

<a id="reserved-environment-variable"></a>

## An environment variable is refused as reserved

The import or commit check reports `app_manifest_invalid` with a message such as:

```text
application.environment "GOOGLE_API_KEY": the name is reserved or does not match ^[A-Z][A-Z0-9_]{0,127}$
```

**Cause.** Dex Cloud reserves names that start with `SUPERVERSE_`, `DEX_`, `AWS_`, `LD_`, `GIT_`, or `GO`, and a list of exact names. The `GO` prefix also covers names such as `GOOGLE_API_KEY`.

**Fix.** Rename the variable in [`application.environment`](https://docs.superdurable.io/zh-Hans/reference/dex-app/manifest.md#application-environment) and in the code that reads it, such as `MAPS_API_KEY` instead of `GOOGLE_API_KEY`.

<a id="repository-cannot-be-read"></a>

## The import says the repository cannot be read

The import shows:

```text
<owner/name> was not found, or the GitHub App cannot read it through this connection. Check the name and the repositories the app may access.
```

**Cause.** The repository name is wrong, the SuperDurable Dex Cloud GitHub App lacks access to the repository, or the GitHub organization is not connected to the Teamspace.

**Fix.**

- Check that `owner/name` matches the repository on GitHub.
- When the app is installed with **Only select repositories**, add the repository to that list in the app's settings on GitHub.
- When the organization is missing under **Import from**, a Teamspace admin connects it in the Teamspace's **Connections**. See [Connect GitHub is refused](https://docs.superdurable.io/zh-Hans/reference/dex-app/troubleshooting.md#connect-github-refused).

<a id="connect-github-refused"></a>

## **Connect GitHub** is refused

Dex Cloud refuses it with one of these errors:

```text
only a TeamSpace admin connects GitHub
only an owner of <account> connects it
```

A Teamspace member who is not an admin sees "Ask a Teamspace admin to connect GitHub." instead of the button.

**Cause.** Only a Teamspace admin connects GitHub. For an organization, that admin's GitHub account must be an owner of the organization. A plain member of the organization is refused. For a personal account, only that account itself connects it.

**Fix.** Ask a Teamspace admin who owns the GitHub organization, or who signs in as the personal account, to choose **Connect GitHub** in **Connections**.

<a id="auth-method-not-selectable"></a>

## A Gmail connection cannot be selected

**Cause.** Dex Cloud lists only connections whose authentication method equals `authMethodId` in `dex-app.yaml`. With `authMethodId: ""`, a connector with several methods, such as Gmail, shows none of its connections.

**Fix.** Set `authMethodId` to the method of the connection, such as `google-oauth` for Gmail. Keep `""` only for a connector release with one authentication method. See [`connectors`](https://docs.superdurable.io/zh-Hans/reference/dex-app/manifest.md#connectors).

<a id="test-engine-not-configured"></a>

## `make test-app` fails with "the test engine is not configured"

The tests fail with:

```text
the test engine is not configured: run the tests with make test-app
```

**Cause.** The application tests start a Dex Server for the run ([S5](https://docs.superdurable.io/zh-Hans/reference/dex-app/manifest.md#s5)). On your machine, they find its binary through the environment variable `DEX_SERVER_ZD_BINARY`, and it is unset.

**Fix.** Set `DEX_SERVER_ZD_BINARY` to the path of a `dex-server-zd` binary, then run the tests again:

```bash
DEX_SERVER_ZD_BINARY=/path/to/dex-server-zd make test-app
```

<a id="publish-blocked"></a>

## Publish is blocked

Dex Cloud shows one of these messages instead of publishing.

**Set up what Live needs first.**

- **Cause.** Live's **Setup** has a gap: a required connection or value has none, or no group of an [`application.requiredOneOf`](https://docs.superdurable.io/zh-Hans/reference/dex-app/manifest.md#application-required-one-of) requirement is fully set. Other items follow Preview. Secrets and the connections of endpoint-bound connectors never follow Preview, so Live needs its own.
- **Fix.** Set each gap in Live's **Setup**, secrets included. Then publish again.

**Choose a Ready Dex Server for Live.**

- **Cause.** Live has no Dex Server in the Ready state.
- **Fix.** Pick a Ready Dex Server for Live. Then publish again.

<a id="agent-session-canceled"></a>

## A Dex Agents session ends as Canceled instead of Completed

**Cause.** The application cancels the session to end it. A cancel ends the session as **CANCELED**.

**Fix.** End the session with a graceful complete:

```typescript
await client.stopFlow(sessionId, {type: StopType.GRACEFUL_COMPLETE});
```

Graceful complete needs Dex Agents 0.6.14 or later, `@superdurable/dex` 1.45.6 or later, and server-zd 0.1.34 or later. A session that was idle before the upgrade completes this way after its next turn. See [End a session](https://docs.superdurable.io/zh-Hans/reference/agents/session-limits.md#end-a-session).

<a id="connector-write-outcome-unknown"></a>

## A connector write has an unknown outcome

**Cause.** The provider may or may not have applied the write, such as after a timeout. An operation that declares bounded resends reads back first where it can and resends within its limit. Any other operation is sent once, or retried only by the Step's retry policy.

**Fix.** Connect the Mutation's uncertainty branch to a Step that reads the provider's state back or reconciles it. Leave resending out of application code. See [Connectors: effect classes](https://docs.superdurable.io/zh-Hans/concepts/connector.md#effect-classes) and, for Dex Agents tools, [Bounded resends](https://docs.superdurable.io/zh-Hans/reference/agents/connector-tools.md#bounded-resends).

<a id="next"></a>

## Next

- [Dex app manifest and repository layout](https://docs.superdurable.io/zh-Hans/reference/dex-app/manifest.md): every manifest field, rule, limit, and finding.
- [Managed Dex App](https://docs.superdurable.io/zh-Hans/components/managed-dex-app.md): import a repository and publish it to Live, with an optional Preview.
