Skip to main content
Markdown

Errors

Every refusal has a short code. The page hands it on as code (e.code of a rejected promise, { code } of an error or realtime:error event, a call's endReason); PHP returns it as a WP_Error's code.

The connection​

rt.on( 'error', ( e ) => … ): the realtime server refused the page's connection.

CodeWhyWhat to do
not_licensedthe server doesn't know the site keythe site's credentials are wrong or revoked: activate a WordPlus plugin's licence again, or connect again
not_includedthe site's plan doesn't include realtimeupgrade the plan in the WordPlus Cloud account
wrong_originthe page isn't on the site's licensed address (with or without www.)serve the page from the site's address; a headless front end on another domain isn't supported
over_capacitya staging copy has its 25 people onlineexpected on a staging copy
try_latera server still startingthe page tries again by itself
bad_requestthe handshake was malformed

Channels​

realtime:error on a subscription:

CodeWhy
forbiddenthe channel's owner said no, or no plugin owns it
expired, bad_tokenthe token ran out, or wasn't signed by the site (the page asks again once for an expired one)
bad_channelnot a channel name the server takes
too_manythe connection holds 1,000 channels
fulla presence channel has its 1,000 members
auth_failedthe site's auth route didn't answer
not_connectedthe site has no credentials
no_auththe page has no auth route
timeout, serverthe server didn't answer, or failed

trigger() also rejects with rate_limited (over 10 a second), bad_event (not client-…), too_large (over 10 KB), or forbidden (a public channel, or one the tab doesn't hold).

Publishing​

publish(), publish_batch() and channel_info() return a WP_Error:

CodeWhy
not_connectedthe site has no credentials
missing_signature, stale_signature, unknown_site, bad_signaturethe request's signature wasn't taken: a site clock off by more than 5 minutes is stale_signature
not_includedthe plan doesn't include realtime
bad_requestno channels, or an event named realtime:…
too_many, too_largeover 100 channels or 10 events, or data over 10 KB
http_<status>, or WordPress's ownthe server couldn't be reached

Calls​

From calls.start(), incoming.accept() and calls.room() (rejected with code), from the calls route (denied), and as a call's endReason when the server refused to start it:

CodeWhy
forbiddenyour calls() callback said no, or no plugin owns the call
no_usernobody to call as: a visitor without an id (calls)
not_includedthe plan doesn't include calls
bad_requesta call or room name the server doesn't take, or calling yourself
bad_token, expiredthe token wasn't the site's, or ran out
no_call, call_endedanswered after the caller gave up
answered_elsewhereanswered on another device
not_connectedthe site has no credentials
auth_failed, no_auththe site's calls route didn't answer, or the page has none
no_mediathe server has no media servers set up
no_rooms_script, rooms_script_failed, rooms_script_brokenthe media client's script isn't there, or didn't load
signaling_unavailablethe page's connection was down

decline() rejects with answered when the call was already answered on another device.

How a call ended is in calls.