---
source_url: https://www.pubnub.com/docs/sdks/dart/faq
title: FAQ for Dart SDK
updated_at: 2026-05-29T11:10:45.289Z
sdk_name: PubNub Dart SDK
sdk_version: 7.1.0
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# FAQ for Dart SDK

PubNub Dart SDK, use the latest version: 7.1.0

Install:

```bash
dart pub add pubnub@7.1.0
```

Check out the frequently asked questions about the PubNub Dart SDK.

## Why is a userId required?

The `userId` uniquely identifies the client (end user, device, or server). Set and persist a stable value for the lifetime of the user or device; without it, the client cannot connect.

## Can I publish and subscribe with one client?

Yes. Use a `Subscription` for real-time updates and publish from the same `PubNub` instance.

## How do I enable Transport Layer Security (TLS)?

Set `ssl: true` on the `NetworkingModule` to enable TLS for all communications with PubNub.

## Why am I not receiving messages after subscribing?

Messages published before `subscribe()` are not delivered by default. Subscribe first, then publish. Use history to fetch earlier messages when needed.

## Why does publish fail with RequestOtherException on macOS?

`RequestOtherException` usually means the HTTP request failed before PubNub returned a response (network or platform restriction), not an invalid channel name.

On **macOS**, Flutter desktop apps often run inside App Sandbox. If outbound network is blocked, publish and subscribe fail. Add the client network entitlement to `macos/Runner/DebugProfile.entitlements` and `macos/Runner/Release.entitlements`:

```xml
<key>com.apple.security.network.client</key>
<true/>
```

Rebuild the app after changing entitlements. For full setup steps, see [Getting Started — Platform permissions](https://www.pubnub.com/docs/sdks/dart#platform-permissions).

## How do I filter messages server-side?

Set `filterExpression` on the keyset. The Stream Controller add-on must be enabled for your keyset.

## Which encryption should I use?

Prefer 256‑bit AES‑CBC via `CryptoModule`. The legacy 128‑bit option is available for backward compatibility.

## How do I configure reconnection behavior?

Set `retryPolicy` on the `NetworkingModule` (exponential or linear). Non‑subscribe requests do not retry.

## How do I use a proxy?

Provide a custom `NetworkingModule` that routes traffic through your proxy and origin.

## Why does encryption use AES-128 when CryptoModule is configured?

If a call supplies a `cipherKey` argument (for example, in file encrypt/decrypt helpers), that argument overrides the configured `CryptoModule` for that operation and uses legacy Advanced Encryption Standard (AES) with 128-bit keys. Remove the `cipherKey` argument to use the `CryptoModule` configuration (AES‑256‑CBC), or configure a separate `CryptoModule` instance for partial encryption scenarios.

For details, refer to [CryptoModule configuration](https://www.pubnub.com/docs/sdks/dart/api-reference/configuration#cryptomodule).

## Terms in this document

* **PubNub** - PubNub is a real-time messaging platform that provides APIs and SDKs for building scalable applications. It handles the complex infrastructure of real-time communication, including: Message delivery and persistence, Presence detection, Access control, Push notifications, File sharing, Serverless processing with Functions and Events & Actions, Analytics and monitoring with BizOps Workspace, AI-powered insights with Illuminate.