---
schema_version: "1"
id: dfd2997bfcd6135596c056534e356b5c97554854e79677ce8fc4a9993a88e95e
title: PDK Troubleshooting
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/pdk/1.9/policies-pdk-troubleshooting.md
canonical_url: https://docs.mulesoft.com/pdk/1.9/policies-pdk-troubleshooting
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 429ea51bf8e4cdc19a775d8e3890a4abd9b1361cd706c0c32a1dc8b580d845c3
description: MuleSoft Documentation Site
release: "1.9"
latest: false
---
---
product: Omni Gateway Policy Development Kit (PDK)
version: 1.9
---

# PDK Troubleshooting

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

When using Omni Gateway Policy Development Kit (PDK), you might encounter issues with PDK itself.
See the following sections to help you resolve these issues:

- [Cargo-Generate Error on a Mac Device](#cargo-generate)

- [Anypoint CLI Credentials Error](#cli-credential)

- [Group ID Error When Creating the Policy Project](#group-id-error)

- [401 Authorization Error When Running Make Setup](#authorization-error)

- [Error: No such file or directory When Running Make Build (Split Model Policy)](#implementation-build-no-file)

- [Error Looking for the Specified Asset When Running Make Build-Asset-Files (Split Model Policy)](#build-asset-files-asset-not-found)

To debug issues with your custom policy, see:

- [Debugging Custom Policies with the PDK Debugging Playground](https://docs.mulesoft.com/pdk/1.9/policies-pdk-debug-local)

- [Debugging Deployed Custom Policies](https://docs.mulesoft.com/pdk/1.9/policies-pdk-debug-deployed-policies)

## Cargo-Generate Error on a Mac Device

When compiling Rust on a Mac Device for the first time, the following error might occur:

```ssh
$ cargo install cargo-generate
error: linking with `cc` failed: exit status: 1
[...]
```

To troubleshoot this error:

1.  Ensure Xcode is installed, then compile again.

    To install Xcode, execute the following command:

    ```ssh
    xcode-select --install
    ```

2.  If Xcode is installed and PDK still does not compile, create or edit the `~/.cargo/config.toml`
    file by adding the following:

    ```toml
    [target.x86_64-apple-darwin]
    rustflags = [
      "-C", "link-arg=-undefined",
      "-C", "link-arg=dynamic_lookup",
    ]
    [target.aarch64-apple-darwin]
    rustflags = [
      "-C", "link-arg=-undefined",
      "-C", "link-arg=dynamic_lookup",
    ]
    ```

## Anypoint CLI Credentials Error

Anypoint CLI requires multi-factor authentication (MFA) with a Connected App. Using any PDK command
without Connected App credentials results in an error similar to the following:

```ssh
Error: Failed to launch the browser process! undefined
[...]:ERROR:ozone_platform_x11.cc(239)] Missing X server or $DISPLAY
[21921:21921:1103/113335.217708:ERROR:env.cc(255)] The platform failed to initialize. Exiting.
TROUBLESHOOTING: https://pptr.dev/troubleshooting
```

To configure Anypoint CLI with MFA authentication using a Connected App, refer to
[Authentication to the Anypoint Platform CLI](https://docs.mulesoft.com/anypoint-cli/latest/auth).

## Group ID Error When Creating the Policy Project

Anypoint CLI uses the `ANYPOINT_ORG` environment variable. This variable can use either the
organization name or the organization ID as the value. If the variable is set to the organization
name, the [policy creation command](https://docs.mulesoft.com/pdk/1.9/policies-pdk-create-project) fails to infer the group ID of the
organization.

Use the organization ID for the value of `ANYPOINT_ORG`. However, if you cannot change the variable,
use one of the following methods to provide the group ID:

- If you run the create command and receive the following prompt:

  ```ssh
  Please provide a valid group-id (the id of the organization that will own the asset):
  ```

  Enter your group ID, then press Enter.

- Use the `--group-id` flag when creating the PDK project, for example:

  ```ssh
  anypoint-cli-v4 pdk policy-project create -n <policy-name> --group-id <organization-id>
  ```

## 401 Authorization Error When Running Make Setup

When executing \`make setup', the following error might occur:

```ssh
$ make setup
       Login token for `anypoint` saved
[...]

Caused by:
  failed to get successful HTTP response from `https://anypoint.mulesoft.com/crates[...]/download` [...], got 401
  body:
make: *** [install-cargo-anypoint] Error 101
```

This error occurs when your version of Rust is not v1.88.0 or later.

To solve this error, refer to
[Rust Requirements for Using PDK](https://docs.mulesoft.com/pdk/1.9/policies-pdk-prerequisites#rust-requirements) to ensure your Rust
software meets the required version.

## Error: No such file or directory When Running Make Build (Split Model Policy)

When running `make build` from the implementation project, this error sometimes occurs:

```ssh
Error: No such file or directory (os error 2)
make: *** [build] Error 1
```

Make sure that you’ve executed `make setup` and `make release-local` and that you’ve published the
definition asset version before building the implementation.

## Error Looking for the Specified Asset When Running Make Build-Asset-Files (Split Model Policy)

When running `make build-asset-files` from the implementation project, this error sometimes occurs:

```ssh
Fetching policy: {definition_asset_id}:{definition_asset_version}... !
    Error: There was a problem looking for the specified asset.
make: *** [build-asset-files] Error 2
```

Make sure that you’ve executed `make setup` and `make release-local` and that you’ve published the
definition asset version before building the implementation.

## See Also

- [Policy Development Kit Architecture Overview](https://docs.mulesoft.com/pdk/1.9/policies-pdk-architecture)

- [Prerequisites for Omni Gateway Policy Development Kit (PDK)](https://docs.mulesoft.com/pdk/1.9/policies-pdk-prerequisites)

- [Known Issues](https://help.salesforce.com/s/issues)
