Error Reference

This document catalogs all error types in the StreamLayer iOS SDK, organized by domain. Use it to diagnose issues during integration and at runtime.


Public SDK Errors

StreamLayerError is the top-level error type returned by public SDK APIs.

ErrorDescriptionCommon CauseFix
invalidArguments(String)One or more arguments passed to an SDK method are invalid.Passing nil, empty, or malformed values to SDK configuration or initialization methods.Verify all arguments match the expected format. Check the associated String for details.
apiError(String)A backend API call failed.Network issues, invalid API key, or server-side errors.Check network connectivity, verify your API key, and inspect the associated message for specifics.
cantDetectContainerView(String)The SDK cannot find a valid container view to present its UI.Calling overlay methods before the host view controller's view hierarchy is loaded, or passing a deallocated view.Ensure the container view is added to the window hierarchy before invoking SDK overlay methods.

Source: StreamLayerSDK/Sources/StreamLayerSDK/Public/StreamLayerSDK.swift


Authentication Errors

SLRAuthFlowError

ErrorDescriptionCommon CauseFix
cancelledThe authentication flow was cancelled by the user.User tapped back/cancel during sign-in or registration.Handle gracefully in your UI; no action required unless re-authentication is needed.

Source: StreamLayerSDK/Sources/StreamLayerSDK/SLRAuthFlow/SLRAuthFlow.swift

SLRAuthUserNameError

Validation errors for user display names during registration/profile update.

ErrorDescriptionCommon CauseFix
NAME_IS_TOO_SHORTThe username is below the minimum length.User entered fewer characters than required.Enforce minimum length in your input validation.
NAME_IS_TOO_LONGThe username exceeds the maximum length.User entered too many characters.Enforce maximum length in your input validation.
PUBLIC_NAME_IS_TOO_SHORTThe public display name is below the minimum length.User entered fewer characters than required.Enforce minimum length for public names.
PUBLIC_NAME_IS_TOO_LONGThe public display name exceeds the maximum length.User entered too many characters.Enforce maximum length for public names.
PUBLIC_NAME_ALPHANUMERIC_REQUIREDThe public name contains non-alphanumeric characters.User entered special characters or spaces.Restrict input to alphanumeric characters only.
PUBLIC_NAME_IS_NOT_ALLOWEDThe public name is blocked by the content filter.User entered a reserved or prohibited name.Prompt the user to choose a different display name.

Source: StreamLayerSDK/Sources/StreamLayerSDK/SLRAuthFlow/Auth/Models/SLRUserNameError.swift


Watch Party Errors

SLRWatchPartyError

Errors that occur during Watch Party sessions.

ErrorDescriptionCommon CauseFix
failedToConnectCould not establish a Watch Party connection.Network timeout, server unreachable, or invalid session token.Retry after a brief delay. Check network connectivity and session validity.
userConnectedFromAnotherDeviceThe user joined this Watch Party from a different device.Same account signed into Watch Party on two devices simultaneously.Inform the user that only one device per account is supported.
serverError(errorMessage:)A server-side error occurred during the Watch Party session.Internal backend failure (often gRPC error code 13).Display the error message to the user and retry. Escalate if persistent.

Source: StreamLayerSDK/Sources/StreamLayerSDK/Shared/ViewModules/Flows/WatchParty/Live/Base/Presenter/SLRWPBasePresenter.swift

SLRPermissionError

Device permission errors during Watch Party setup.

ErrorDescriptionCommon CauseFix
audioPermissionDeniedMicrophone access was denied by the user.User declined the microphone permission prompt or disabled it in Settings.Guide the user to Settings > Privacy > Microphone to grant access.
videoPermissionDeniedCamera access was denied by the user.User declined the camera permission prompt or disabled it in Settings.Guide the user to Settings > Privacy > Camera to grant access.

Source: StreamLayerSDK/Sources/StreamLayerSDK/Shared/ViewModules/Flows/WatchParty/Live/WatchPartyLive/View/Subviews/SLRSessionPermission.swift


Conference / Vonage Errors

ConferenceError

Errors from the video conferencing subsystem.

ErrorDescriptionCommon CauseFix
unsupportedNameThe conference name contains unsupported characters.Passing a name with special characters or invalid format.Use only system-supported names (alphanumeric, no special characters).
failedToBuildURLCould not construct the conference URL.Malformed conference configuration or missing parameters.Verify conference configuration before starting.
noDataReceivedThe conference request returned no data.Network interruption or empty server response.Retry the request. Check network connectivity.
jsonDecodingFailedFailed to decode the conference server response.Server returned an unexpected response format.Check SDK version compatibility with backend. Report to StreamLayer support if persistent.
noActiveConferenceFoundNo active conference exists for the given identifier.Attempting to join a conference that has ended or was never created.Verify the conference is active before joining. Refresh the session list.
conferenceAlreadyActiveA conference is already in progress on this session.Calling start while another conference is still running.End the existing conference before starting a new one.
wpIsNotImplementedWatch Party feature is not available in this build.The Watch Party module is not included or configured.See the Watch Party integration docs or contact StreamLayer support.

Source: StreamLayerSDK/Sources/StreamLayerSDK/Shared/Services/Vonage/Utils/ConferenceError.swift

SLRVonageConferenceService.SerivceError

ErrorDescriptionCommon CauseFix
failedToJoinSessionCould not join the Vonage video session.Invalid session ID, expired token, or network failure.Verify the session credentials and retry.

Source: StreamLayerSDK/Sources/SLRWatchPartyModule/SLRVonageConferenceService.swift


Chat Errors

TinodeError

Errors from the chat messaging layer (Tinode-based).

ErrorDescriptionCommon CauseFix
invalidReply(String)The server returned a response that could not be parsed.Unexpected message format from the chat server.Check SDK/server version compatibility.
invalidState(String)An operation was attempted in an invalid chat state.Calling send/subscribe before connection is established.Ensure the chat client is in the connected state before performing operations.
notConnected(ChatState)The chat client is not connected.Network loss, session expiry, or client not initialized.Reconnect the chat client. The associated ChatState indicates the current state.
serverResponseError(Int32, String, String?)The chat server returned an error response.Permission denied, topic not found, or internal server error. The Int32 is the error code; the String values are the error text and optional detail.Inspect the error code and message. Common codes: 404 (not found), 403 (forbidden), 500 (server error).
notSubscribed(String)The user is not subscribed to the requested chat topic.Attempting to read or send messages on a topic without subscribing first.Subscribe to the topic before interacting with it.
subscribed(String)The user is already subscribed to this topic.Calling subscribe on an already-active subscription.Check subscription state before subscribing. This is typically safe to ignore.

Source: StreamLayerSDK/Sources/StreamLayerSDK/Shared/Services/NetworkLayer/SLRGRPCService+Chat/SLRGRPCChatClient.swift

SLRPublicChatClientConnectionError

Connection precondition errors for the public chat client.

ErrorDescriptionCommon CauseFix
emptyConfigurationChat configuration is not set up.SDK not initialized or configuration not provided before opening chat.Call StreamLayer.initSDK(...) with a valid configuration before using chat features.
emptyAccessTokenAccess token is empty or nil.User not authenticated, or token expired and was cleared.Authenticate the user and ensure a valid access token is available.
emptyUserDataDatabase user data is empty.User profile not loaded or local database not populated.Ensure user login is complete and profile data is synced before opening chat.

Source: StreamLayerSDK/Sources/StreamLayerSDK/Shared/ViewModules/Flows/PublicChat/SLRPublicChatClient.swift


Core SDK Errors

SLRErrors

Namespace containing internal SDK error types.

ErrorDescriptionCommon CauseFix
SelfError.deallocatedA required object was deallocated before the operation completed.Weak reference was released during an async operation.This is an internal safeguard. If surfaced, report to StreamLayer support with reproduction steps.
DataError.tinodeUserDoesntSetThe Tinode chat user is not configured.Chat operations attempted before user authentication or Tinode client initialization.Ensure user authentication is complete before using chat features.
GenericError.chatClientDisabledThe chat client feature is disabled.StreamLayer.config.isChatFeatureEnable is set to false.Set isChatFeatureEnable to true in your SDK configuration.

Source: StreamLayerSDK/Sources/StreamLayerSDK/Shared/Extensions/SLRErrors.swift


File Service Errors

SLRFileServiceError

Errors during file upload operations (avatars, media attachments).

ErrorDescriptionCommon CauseFix
invalidHash(String)The file hash validation failed.Corrupted file or hash mismatch during upload.Retry the upload. If persistent, verify the source file is not corrupted.
invalidMetadata(String)File metadata is invalid or missing.Uploading a file without required metadata (type, size).Ensure file metadata is properly set before uploading.
invalidFileLocation(String)The file location path is invalid.File was moved or deleted before upload could complete.Verify the file exists at the specified path before initiating upload.
invalidHandlerURL(String)The upload handler URL is invalid.Server returned a malformed upload endpoint.Check SDK configuration and network connectivity. Report to support if persistent.
invalidUploading(String)The upload process failed.Network interruption during upload or server rejection.Retry the upload. Check file size limits and network connectivity.

Source: StreamLayerSDK/Sources/StreamLayerSDK/Shared/Services/File/SLRFileService.swift


Routing Errors

SLRRoutingError

ErrorDescriptionCommon CauseFix
emptyContainer(message:)The navigation container is empty or not set.Attempting to route to a module before the container view controller is configured.Ensure SLROverlayViewController is properly initialized and its container is set before navigation.

Source: StreamLayerSDK/Sources/StreamLayerSDK/Shared/ViewModules/Routing/SLRRoutingError.swift

RoutingError (RouteComposer)

Internal navigation routing errors.

ErrorDescriptionCommon CauseFix
typeMismatch(type:expectedType:context)A view controller type does not match the expected type.Internal routing misconfiguration.This is an internal SDK error. Report to StreamLayer support with the context message.
compositionFailed(context)The navigation composition step failed.A required intermediate view controller could not be created or found.Check that all navigation dependencies are properly registered.
initialController(.notFound, context)The initial (root) view controller was not found.The app's window or root controller is not set when routing begins.Ensure the app's rootViewController is set before invoking SDK navigation.
initialController(.deallocated, context)The initial view controller was deallocated.The root controller was released from memory.Maintain a strong reference to the root controller while the SDK is active.
generic(context)An unclassified routing error occurred.Various internal routing failures.Inspect the context.debugDescription and underlyingError for details.

Source: StreamLayerSDK/Sources/StreamLayerSDK/Shared/Utils/RouteComposer/RoutingError.swift


Advertising Errors

SLRGooglePALServiceError

Errors from the Google PAL (Programmatic Access Library) integration.

ErrorDescriptionCommon CauseFix
requestURLIsNilThe PAL ad request URL is nil.PAL nonce generation failed or returned no URL.Verify Google PAL SDK integration and nonce request parameters.
responseURLIsNilThe PAL ad response URL is nil.The ad server did not return a valid response URL.Check ad unit configuration and PAL SDK version compatibility.
pluginIsNotImplementedThe Google PAL plugin is not available (tvOS).Attempting to use PAL on tvOS where the module is not included.Use the platform-appropriate advertising module, or contact StreamLayer for tvOS PAL support.

Source: StreamLayerSDK/Sources/SLRGooglePALModule/SLRGooglePALService.swift, StreamLayerSDK/Sources/StreamLayerTVOS/Sources/Model/Advertising/GAM/SLRGooglePALService.swift

Promotion Factory Errors

ErrorDescriptionCommon CauseFix
FactoryError.typeNotSupportedThe promotion type is not supported by the current SDK version.Server returned a promotion type that this SDK version cannot render.Update to the latest SDK version.
FactoryError.adNotExistThe referenced ad does not exist.The ad was removed from the server or the ID is invalid.Refresh the promotion list. The ad may have expired.

Source: StreamLayerSDK/Sources/StreamLayerSDK/Shared/ViewModules/Flows/Promotions/


UI & Resource Errors

UIImageView.SetImageError

ErrorDescriptionCommon CauseFix
missingInBundle(String)An image asset is missing from the SDK bundle.SDK bundle was not properly included, or asset catalogs are incomplete.Verify the StreamLayer SDK bundle is correctly embedded in your app target.
unhandledErrorAn unexpected error occurred while loading an image.Unknown image loading failure.Report to StreamLayer support with reproduction steps.

Source: StreamLayerSDK/Sources/StreamLayerSDK/Shared/Models/SLRImage.swift

SLRImages.ValidationError

ErrorDescriptionCommon CauseFix
assetNotFound(name:)Image asset could not be loaded from the asset catalog.Asset catalog misconfiguration or missing resource.Verify SDK resources are bundled correctly.
resourceNotFound(name:)Image resource file could not be loaded.Resource file missing from the SDK bundle.Verify SDK resources are bundled correctly.

Source: StreamLayerSDK/Sources/StreamLayerSDK/DevResources/FuGen/SLRImages.swift

FontLoaderError

ErrorDescriptionCommon CauseFix
fontProviderThe font provider could not be initialized.SDK font files missing from the bundle.Ensure StreamLayer resource bundle is properly embedded.
fontCreateA font could not be created from the provided data.Corrupted font file or unsupported format.Re-embed the SDK resources. Report to support if persistent.

Source: StreamLayerSDK/Sources/StreamLayerSDK/iOS/Utils/FontsLoader.swift


Media & Contacts Errors

RxMediaPickerError

ErrorDescriptionCommon CauseFix
generalErrorAn unspecified media picker error occurred.System-level failure in UIImagePickerController.Retry the operation. Ensure camera/photo library permissions are granted.
canceledThe user cancelled the media picker.User tapped cancel in the photo/video picker.Handle gracefully; no action required.
videoMaximumDurationExceededThe selected video exceeds the maximum allowed duration.User selected a video longer than the configured limit.Inform the user of the maximum duration and prompt them to select a shorter video.

Source: StreamLayerSDK/Sources/StreamLayerSDK/iOS/Utils/RxMediaPicker.swift


Internal / Utility Errors

These errors are internal to the SDK and should not normally surface to integrators. They are documented for completeness.

ErrorTypeDescription
CancellablePromiseError.cancelledCancellableErrorAn async promise chain was cancelled.
UIAlertController.PMKError.cancelledCancellableErrorAn alert-based promise was cancelled by the user.
UIAlertController.PMKError.failedCancellableErrorAn alert-based promise failed.
MFMessageComposeViewController.PMKError.cancelledCancellableErrorA message compose promise was cancelled.
MFMessageComposeViewController.PMKError.failedCancellableErrorA message compose promise failed.
ContactsServiceError.someErrorErrorGeneric contacts service error.
CustomError.someErrorErrorGeneric menu state error.
MissingOutputErrorErrorAn RxSwift stream completed without emitting a value.

NSError Conventions

The SDK extends NSError with server error detection for gRPC responses:

PropertyTypeDescription
isServerErrorBoolReturns true if the error description contains "internal error (13):" (gRPC INTERNAL status).
serverErrorDescriptionStringExtracts the message portion after "internal error (13):".

These are used internally to classify gRPC transport errors during Watch Party sessions.