Files
piik/docs/guide/troubleshooting.md
T
AAAandAkazaAkalin 3707e48225 feat!: expand media controls and simplify App connections
## Problem and outcome / 问题与结果

Piik's media settings were coupled to a small preset list, and using native App capture on a Site required a separate launcher mode. This release separates numeric media requests from presets and bounded runtime admission, remembers successfully applied settings, and lets a running App serve an explicitly approved Site independently of Local/public room startup.

The same phase repairs confirmed capture-retirement, ICE discovery, media-recovery and storage failures. P2P-first routing, one room authority and the existing Browser/Native media owners remain. This phase targets **v2.0.0** with incompatible Web/App contracts. The owner authorized publication after final acceptance; the verified package and deployment records own delivery completion.

## Release notes

### 中文

Piik 2.0 扩展了画质设置,简化了 App 与站点的连接,并集中修复采集和断线恢复问题。**本次升级调整了通信协议,App 与所用站点需要一起升级。**

#### 新功能与改进

- **自定义画面设置:** 保留三档推荐预设,支持填写分辨率上限、1–240 帧的帧率上限和 0.1–240 Mbps 的视频码率上限。滑动条沿用常用范围,更高数值可直接填写并显示为“自定义”。帧率范围随画幅变化,可请求 1080p240、1440p144、4K60 和超宽画面;输出保留来源比例。
- **自定义音频质量:** 在原有三档音频预设之外,可填写 6–320 kbps 的来源音频码率上限。
- **双端 App 协同连接:** 启用增强 NAT 穿透后,适用的重试可协调双方 App 准备 UDP 连接;首次连接仍走普通 ICE,不适用时继续现有流程。已通过受控网络验证,实际连通性仍取决于双方网络。
- **记住分享设置:** 下次打开时恢复已应用的画面与音频质量。仅用浏览器时按站点保存;通过新版 App 使用时,更换临时公网邀请网址也能保留设置。
- **更直接地连接 App:** 启动页提供本地房间和公网邀请,首次默认选择公网邀请。使用已有站点时,保持 App 运行,在站点点击 **App** 并确认授权即可。App 打开的本地房主页自动获得授权,站点按钮会显示 App 就绪状态。启动页可查看或取消授权;从另一个站点连接并批准,会替换原授权。
- **置顶聊天窗口:** 支持的桌面浏览器可将聊天移入独立置顶窗口,保留当前消息、草稿和阅读位置;关闭窗口后回到原页面。

#### 修复

- **连接与恢复:** 完善备用 STUN 与 NAT 采样信息的处理;重新收集 ICE 候选时刷新网卡地址。修正观众重连的机会计数、本机媒体连接恢复,以及恢复后遗留的发送队列和带宽统计问题。保留视频编码对应的标准重传能力,改善网络地址变化后的画面恢复。
- **采集稳定性:** 修正 Windows 停止采集或预览时的异步资源释放问题,保留采集边框偏好,更快跳过无法正常输出的编码器。采集与应用音频能力按实际接口探测,不再按 Windows 版本号排除;修正 Linux Portal 来源识别和早期采集失败通知,改善摄像头与原生采集的画面比例处理。
- **状态与清理:** 房间失效时及时释放 App 连接和待完成的选源请求;本地或公网房间启动失败时,App 保持待机并保留其他已授权站点的连接;公网邀请启动失败保留底层错误。修正启动页旧查询覆盖新设置的问题,并限制原生连接准备的待完成任务。SFU 诊断区分房主发布和观众接收状态。
- **其他维护:** 收到尚不支持的表情时跳过该效果;修正 SQLite 写入失败后的事务恢复。Gitee 镜像可独立重试,官网交互、指南和依赖同步更新。App 连接失败时提供重试与下载入口;统一选源设置与自定义数值的反馈。减少重复的随机短语,仅在持续等待时定时轮换。

#### 升级须知

**2.0 与 1.x 不能混用。** 自建站点请更新 Server 和连接该站点的 App,并刷新所有分享与观看页面。本地房间或公网邀请用户请停止分享、关闭旧 App,完整解压新版程序包后重新发送邀请链接。

本次不变更房间数据库结构。重启会中断正在进行的分享;麦克风、采集权限和设备选择不会自动恢复。4K60 等设置是输出上限,实际清晰度与帧率取决于来源、设备和网络。macOS/Linux 采集及部分移动设备仍需更多实机反馈。

### English

Piik 2.0 adds more control over sharing quality, simplifies connecting the App to a Site, and fixes capture and connection-recovery failures. **The communication contracts change in this release: update the App and its Site together.**

#### Highlights

- **Custom picture settings:** Keep the three recommended presets or enter a resolution ceiling, a 1–240 fps limit and a 0.1–240 Mbps video bitrate limit. Sliders retain their familiar ranges; higher entered values are clearly marked as custom. Frame-rate limits depend on picture size, admitting requests such as 1080p240, 1440p144, 4K60 and ultrawide pictures while preserving source proportions.
- **Custom audio quality:** Enter a 6–320 kbps source-audio bitrate limit alongside the three existing audio presets.
- **Coordinated App connections:** With enhanced NAT traversal enabled, eligible retries can coordinate UDP preparation between two Apps. The first attempt remains ordinary ICE, and ineligible preparation continues through the existing path. Controlled network checks pass; real-world connectivity still depends on both networks.
- **Remember sharing settings:** Restore successfully applied picture and audio quality next time. Browser-only use saves settings per site; an updated App can retain them across changing temporary public-invitation addresses.
- **Connect the App from a Site:** The launcher offers Local room and Public invite, with Public invite selected on first use. For an existing Site, keep the App running, click **App** on the Site and confirm its authorization. Host pages opened locally by App are authorized automatically, and the Site button reflects verified App readiness. View or revoke approval in the launcher. Connecting and approving another Site replaces the previous approval.
- **Always-on-top chat:** Supported desktop browsers can move chat into a separate always-on-top window while retaining messages, drafts and reading position. Closing the window returns chat to the page.

#### Fixes

- **Connections and recovery:** Improve fallback STUN discovery and NAT survey handling, and refresh interface addresses during ICE gathering. Fix Viewer recovery-opportunity accounting, local media-connection recovery, stale send queues and bandwidth accounting after recovery. Preserve standard video retransmission when selecting a codec to improve picture recovery after network-address changes.
- **Capture stability:** Fix asynchronous Windows resource retirement after capture or preview ends, retain the capture-border preference, and reject non-performing encoder candidates earlier. Detect capture and process-audio support through actual APIs rather than Windows-version gates. Correct Linux Portal target identification and early capture-failure delivery; improve source-aspect handling for camera and native capture.
- **State and cleanup:** Release App connections and pending source selection when room authority ends. Keep the App on standby and preserve other authorized Site connections when interactive Local/public room startup fails. Retain underlying public-invitation startup errors. Prevent stale launcher reads from replacing newer settings, bound pending native connection-preparation work, and distinguish Host publication from Viewer reception in SFU diagnostics.
- **Maintenance:** Skip unsupported incoming reaction effects, recover SQLite transactions after write failures, and retry Gitee mirroring independently. Update website interactions, guides and dependencies; clarify App connection recovery, source-selection settings and custom-value feedback. Reduce repeated playful captions, with timed rotation reserved for ongoing waits.

#### Upgrading

**2.0 and 1.x cannot be mixed.** For a hosted Site, update its Server and connected Apps, then refresh every Host and Viewer page. For Local rooms or Public invites, stop sharing, close the old App, extract the complete new package and send a fresh invitation.

The room database schema is unchanged. Restarting interrupts active shares; microphone activation, capture permission and device selection are not restored automatically. Settings such as 4K60 are output ceilings: actual resolution and frame rate depend on the source, device and network. macOS/Linux capture and some mobile devices still need more physical-device feedback.

## Verification / 验证

- Product candidate: `24a28738241b9012c0476386356a515aab21f1a5`, built as `v2.0.0`. [Final full candidate CI](https://github.com/TNTcraftHIM/Piik/actions/runs/38555494851) covers core validation, vulnerabilities, races, five App packages and both Server/container targets without publishing. Later commits extend race coverage, correct the capture test fixture's inherited Go race-exit delay, and update documentation/staged website screenshots; shipped product code is unchanged. [Additional control/loopback race checks](https://github.com/TNTcraftHIM/Piik/actions/runs/38561191343) use that updated collector. Product shutdown deadlines and test assertions are unchanged.
- Local Web acceptance passes **91 files / 1,612 tests**, type checking and production build. Full Go/native checks, Windows capture compilation, five-repeat control regressions, website/documentation build and repository checks pass. Existing documentation-size and bundle-size warnings remain visible.
- The Windows candidate's original descriptor, revision and SHA-256 are checked before extraction and packaged Local/control acceptance. All candidate packages pass the release publisher's read-only identity/checksum verification.
- Serial Windows native H.264 Host acceptance passes live/paused/custom/4K settings, background/source recovery and stop/re-share. VP8 two-room SFU and H.264 SFU-only checks pass live quality/audio changes, subscription/page-reload recovery and retirement; stopping one room preserves the other room's media. Browser-to-App fanout and App-exit fallback also pass. Gates clean their processes, profiles and listeners. These checks do not establish sustained game/4K performance.
- The final network run passes **37 cases and six negative controls**, with **32 actual media outcomes and five unavailable observations**. It covers all Browser/App pairings, IPv6, remapping, STUN backup, outages, quality recovery, healthy siblings and SFU policies. Sequential-NAT App/App preparation delivers media; a mixed sequential case also connects in this run, without a claim of deterministic benefit. Fault controls reject absent faults/frozen video and verify cancellation/cleanup. No public success percentage is inferred.
- Twenty Viewer topology acceptance delivers increasing decoded frames to all Viewers, preserves the two-copy bound and recovers from relay loss. Invitation privacy checks find no grant leakage in requests, cookies, persistent storage or logs. Both are bounded synthetic-source checks, not public-network endurance.
- Current UI checks cover Chinese/English/visual, both themes and 320/360/768/1366-pixel layouts, numeric limits, source selection, App approval/revocation, architecture downloads and reader navigation. Chat/PiP retains draft/history/scroll and returns to the page on close; retirement and refused opening clean up. Real Host/Viewer UI chat continues after capture stops and while the Host is absent. Film controls, mute/seek/end/replay, mobile containment and pointer-close unloading pass. README stills and the staged launcher now use current navigation. Scoped axe checks report no violations; contrast and physical assistive-technology coverage are not certified.
- Physical macOS/Linux capture, limited decoders, mixed HDR displays, mobile permissions and sustained game/4K use retain their [evidence limits](https://github.com/TNTcraftHIM/Piik/blob/ci/gitee-mirror/docs/verification-status.md). Unmatched field reports remain open. Gitee activation and public-domain checks are publication postflight; original v1.9.2 artifact/mirror recovery already passed without remote writes.

## Boundaries and contributor credit / 边界与贡献

The candidate uses Browser/server v24 and Native control v10; capture v7 and SQLite schema 2 are unchanged. Numeric wire values remain separate from codec/allocation admission. H.264/VP8, framework-owned adaptation and automatic P2P-first routing remain; this candidate adds neither codecs, room voice, end-to-end HDR, surround audio nor Magicsock.

Local controls confirm specific repairs, not the causes of unmatched user reports or a measured increase in NAT success rate. The STUN report in #471 remains subject to paired endpoint/network evidence. Gitee's separate workflow activation still needs post-merge verification; its original-artifact and anonymous-download path has passed against v1.9.2.

The Linux Portal fix from @AkazaAkali in #470 is incorporated with original commit authorship and the co-author trailer below. #462 and #469 propose higher audio rates and 4K; neither patch is merged. Their preset-expansion implementation is superseded by the independently established numeric-media contract, so overlapping functionality alone does not warrant merging or co-authorship. #475 identifies the Linux desktop entry’s missing terminal controls; that defect is independently corrected without accepting tray or Browser-owned process-exit additions. The settings request in #460 is implemented; issue/PR closure remains part of release follow-up.

Co-authored-by: AkazaAkalin <478080766@qq.com>
2026-10-14 08:09:45 -04:00

363 lines
25 KiB
Markdown

# Troubleshooting
English · [简体中文](./troubleshooting.zh-CN.md) · [Documentation](./README.md)
Find the symptom below and try the suggested checks. Stop when it works;
collect a diagnostic report if the problem persists.
## Common problems
| What you see | Try this |
| --- | --- |
| App startup fails, or no page opens automatically | Read the reason on the page and in the terminal. If the App is still running, copy its address into your browser. See [App diagnostics](../../cmd/piik-app/README.md#diagnostics) to collect a report; if Local mode lists several addresses, choose an adapter and IP on the launch page. |
| Public invitation fails to start, or a link shows 1033 | Check the host's App and current link using [public invitation troubleshooting](#public-invitation-fails-or-shows-1033). |
| Local invitation will not open | Check that both devices are on the same network and can reach each other. Guest Wi-Fi or firewall rules can block local access. |
| Room code says the room does not exist | Open the host's current full invitation link. Codes work only on their original site; a site with empty-room recycling may also have reclaimed it. The host can create a new room; see [joining a room](./getting-started.md#join-a-friends-room). |
| Cannot create a room (403) | On a self-hosted site, ask the administrator to check the [allowed site address](#room-creation-returns-403). |
| All room codes are in use | Retry later or use another Piik site. Administrators can enable [empty-room retention](../operations/self-hosting.md#1-configure-and-start-piik) to reclaim unused codes. This is separate from the per-room Viewer limit. |
| No screen picker | Allow the browser or App to record the screen when the OS asks. Browser capture needs HTTPS or `localhost`; try sharing from a desktop computer. |
| No App windows or screens listed | Check the message in the source picker, then follow [App source troubleshooting](#app-windows-or-screens-are-missing). **Browser** → **Choose what to share** opens the browser's screen, window or tab chooser. |
| Sharing fails after selecting a source | Click the error icon below the TV for details and guidance, then follow [sharing startup checks](#sharing-does-not-start-after-source-selection). |
| H264 fails to start, or sharing stops just after source selection | Try **Auto** or **VP8**, then follow [Windows H264 and graphics checks](#h264-sharing-fails-on-windows). |
| Game capture is black, shows only the desktop, or stops when entering the game | Compare sources and window modes using [game capture checks](#game-capture-is-black-or-sharing-stops). |
| HDR picture looks too bright or washed out | On Windows, try App capture or temporarily turn off HDR; see [HDR capture](#hdr-picture-looks-too-bright-or-washed-out). |
| Yellow outline around the shared window or screen | This is Windows' capture indicator. See [capture borders](#yellow-capture-border-on-windows) for Windows 11 controls and an optional Windows 10 workaround. |
| Picture but no source sound | Unmute the video. The host should choose a source with shareable audio and enable sound in the source picker. Camera video and audio inputs are selected separately; see [audio settings](./getting-started.md#add-your-voice). |
| Cannot hear the host's voice | The host can enable **Microphone** below the picture, then check the selected input and its volume in **Settings → Sound**. Check the device connection and microphone permission. If the control is unavailable, update the App and refresh the page. |
| Screen sharing includes a voice app's audio | Windows App screen capture can [exclude application audio](./getting-started.md#exclude-a-voice-app-from-screen-audio). This does not remove echo from speakers picked up by a microphone. |
| Virtual microphone has echo, or remains audible when muted in Piik | Temporarily turn off **System sound** to compare. A mixer's playback can enter source audio separately from Piik's microphone; check its [audio routing](./getting-started.md#exclude-a-voice-app-from-screen-audio). |
| Page opens but video will not connect | Use **Reconnect** if available, or refresh the viewing page. See [connection troubleshooting](#when-video-will-not-connect) if it still fails. |
| WebRTC or IP-leak protection is enabled | Check whether it blocks media connections using [browser WebRTC settings](#browser-webrtc-restrictions). |
| Connection fails on a campus or restricted network | Compare with a phone hotspot, then consider a [site with SFU forwarding](#campus-networks-and-strict-nat). |
| Picture repeatedly blurs, stutters or stops | Identify who is affected, then follow [picture quality and interruption checks](#picture-blurs-stutters-or-stops). |
| Phone fullscreen has black bars, or the button does not work | Video keeps its proportions; try landscape orientation and the playback bar's **Fullscreen** button. System video fullscreen depends on the browser. See [viewing controls](./getting-started.md#join-a-friends-room). |
| Sharing stops after sleep or suspension | Wake the device and return to the sharing tab; start sharing again if needed. Browser and OS suspension can interrupt capture or playback. |
For a bug report, include the version, OS/browser, what you expected, and how
to reproduce it. [Diagnostics and export](../../cmd/piik-app/README.md#diagnostics)
explains how to collect a local report and what to review before sharing it.
## Sharing does not start after source selection
The error icon below the TV explains the current failure. Click it for suggested
checks, a copyable failure summary and browser diagnostics. The summary contains
the Web version, message and error code, without invitation links or source names.
- **App disconnected or request timed out:** check that the App is running and
responding, then click **App** at the top of the site to connect. Allow local network
access if the browser asks. A timeout alone does not establish a graphics fault.
- **App could not start the selected source:** try an ordinary window or screen,
then compare with the **Browser** source picker. On Windows, try **Auto** or
**VP8** and follow [graphics checks](#h264-sharing-fails-on-windows).
- **Browser cannot read the source or permission is missing:** keep the source
open, allow screen recording and select the source again from the sharing page.
For a camera, also check whether another application has exclusive use of it.
- **Media connection failed:** check [browser WebRTC settings](#browser-webrtc-restrictions)
and local network permission. For **room creation HTTP 403**, use the next section.
Stop when sharing works. Otherwise, enable diagnostics before reproducing it once:
the Web button collects browser reports only. For App capture, also enable
**Debug launch** on its mode selection page, then press `D` in the terminal to export.
Send the reports from that attempt with the copied failure summary and the source
type you selected. You can still report without logs; a generic failure screenshot
alone usually cannot distinguish capture, encoding and connection causes.
Logs stay on your device; review private information before sharing them.
See [diagnostics and export](../../cmd/piik-app/README.md#diagnostics) for details.
## Room creation returns 403
Piik rejects room creation from a browser address that the server has not allowed,
even when the page opens normally. The site administrator should:
1. Set `PUBLIC_BASE_URL` to the browser's site address, including the scheme and
any non-default port, without a path.
2. Unset or empty `ALLOWED_ORIGINS` to use that address. If several addresses are
needed, list every trusted origin explicitly, separated by commas. Check for
an old `http://localhost:8787` override after copying a configuration example.
3. Restart Piik (recreate the container with `docker compose up -d` for Compose),
reload the page and retry.
If the response says `Origin not allowed` with correct settings, check that the
reverse proxy preserves the browser's `Origin` header. A 403 from the proxy or
WAF itself needs its own logs; do not disable origin validation to bypass it.
See [Server deployment](../operations/self-hosting.md) for the configuration.
## App windows or screens are missing
Keep Piik App running on the computer where you are sharing. Click **App** at
the top of the site, then confirm its address on the local approval page.
If the browser asks for local-network access, allow it, then
refresh the source list. If access was previously blocked, review this site's
browser permissions first.
The source picker distinguishes these outcomes:
| Message | Next step |
| --- | --- |
| Cannot connect to Piik App | Confirm the App is running and this site is approved. Close unused Piik tabs using the App, then refresh the list; up to two pages can use the App's native capture or viewing at once. |
| Piik App and this page are incompatible | Update Piik App and reload the page. |
| Piik App capture is currently unavailable | Check the App diagnostics for capture or encoder availability. Review your encoding setting or use browser capture. |
| Could not read the screen and window list | Refresh to retry. If it keeps failing, export both the App and browser Debug reports. |
| No sources available | The list was read successfully, but this tab has no selectable sources. Check the other source tabs. |
Local-network permission lets the page contact the App. It is separate from
the WebRTC media settings described below. An unreachable App alone does not
prove that permission was denied.
## H264 sharing fails on Windows
If selecting a window or screen returns you to the start screen, or reports a
sharing failure, it may involve capture, encoding or the Browser-to-App media
connection. The message alone does not identify a graphics-driver problem.
1. **Compare codecs on the same source.** In **Settings → Connection & encoding**, change the
video codec from **H264** to **Auto** or **VP8**, then start sharing again.
If VP8 works, you can keep using it while checking the H264 path.
2. **Update and restart.** Update Piik App and Chrome, and install the appropriate
graphics driver from your computer or GPU manufacturer's official support
page. On laptops with two GPUs, check both drivers. Restart after installation.
3. **For Chrome, check graphics acceleration and GPU preference.** In Chrome's
**Settings → System**, enable graphics acceleration if it was disabled, then
restart Chrome ([Google's setting instructions](https://support.google.com/meet/answer/10058482?hl=en)).
On a multi-GPU Windows PC, open **Settings → System → Display → Graphics**,
select or add Chrome (`chrome.exe`), and choose **Options → High performance → Save**.
Completely quit and reopen Chrome before retrying. If it does not help, restore
**Let Windows decide** ([Microsoft's graphics settings](https://support.microsoft.com/en-us/windows/hardware/display-graphics/optimizations-for-windowed-games-in-windows-11)).
The Windows preference is a browser-side check, not a guarantee of H264 support.
Piik App selects its native encoder separately; changing Chrome's GPU preference
does not select the App's capture GPU. If App capture still fails, keep the codec
comparison and export the App and browser reports for the same attempt. Include
your GPU model, driver version, source type and whether VP8 works. If both codecs
fail, also check [WebRTC restrictions](#browser-webrtc-restrictions).
## Game capture is black or sharing stops
Check that you selected the game's window or the screen displaying it, then try
the game's borderless window mode. Compare an ordinary window, and try both App
capture and the **Browser** source picker. Protected content may be unavailable
for capture; one game failing does not establish that every source is affected.
If Piik returns to the start screen after you enter a game, read the reason below
the TV and follow [sharing startup checks](#sharing-does-not-start-after-source-selection).
Include the game, window mode, source type, codec and matching App/browser reports
in your feedback. A missing picture alone does not identify an encoder fault.
## HDR picture looks too bright or washed out
Windows App capture through **Apps / Windows** or **Screens** converts HDR to SDR
for viewers. The **Browser** picker uses browser capture instead; some HDR sources
can look overexposed. This is a known limitation. Try the App categories above,
or temporarily turn off HDR in Windows display settings and select the source again.
Higher resolution or bitrate cannot restore clipped highlights.
If the picture still looks wrong, report the source type, HDR setting, GPU and
display model, with a comparison of the source and viewer pictures. Technical
background is in [HDR capture notes](../research/media-fidelity.md#hdr-to-sdr).
## Yellow capture border on Windows
Windows draws this outline to identify the window or display being captured.
On supported Windows versions, the App source picker offers **Show capture border**,
off by default. Windows permissions or another active capture can still require
the border. Windows 10 does not provide this control for its capture API.
### Windows 11: the border is still visible
1. Select **Apps / Windows** or **Screens** in Piik and leave **Show capture border**
off. A Browser-selected source uses the browser's own capture indicator.
2. Stop other apps or tabs capturing the same window/display, then restart sharing.
3. If Windows denied borderless capture, review **Screenshot borders** in Windows
privacy settings. Its settings page can also be opened with
`ms-settings:privacy-graphicscapturewithoutborder` from **Win+R**, when available.
Windows requires consent and can retain the border when another capture requests
it ([Microsoft's API documentation](https://learn.microsoft.com/en-us/uwp/api/windows.graphics.capture.graphicscapturesession.isborderrequired)).
If it persists, include the Windows version, selected source type and an
[App diagnostic report](../../cmd/piik-app/README.md#diagnostics) with your feedback.
### Optional Windows 10 workaround
[DWM Custom Projection Border](https://windhawk.net/mods/dwm-custom-projection-border)
is a third-party Windhawk mod for x64 Windows that can hide the border while keeping the same
capture method. It changes Windows' desktop compositor and affects other apps'
capture indicators too. The author shows it working on Windows 10 21H2; this
procedure has not been tested with Piik on a Windows 10 device.
1. Install [Windhawk](https://windhawk.net/) from its official website.
2. In Windhawk's global **Settings → Advanced settings → More advanced settings**,
append `dwm.exe` to **Process inclusion list** and save. Keep existing entries.
3. Find and install **DWM Custom Projection Border**. In the mod's settings,
turn on **Disable border** and save.
4. Stop and restart sharing in Piik, then check whether the border disappears.
To undo this, disable the mod and restart sharing. Remove the `dwm.exe` entry
if you added it only for this mod. If desktop problems appear or a Windows
update breaks compatibility, disable the mod first.
See the [mod author's instructions](https://github.com/ramensoftware/windhawk-mods/blob/main/mods/dwm-custom-projection-border.wh.cpp)
and [Windhawk's process settings](https://github.com/ramensoftware/windhawk/wiki/Injection-targets-and-critical-system-processes)
for current setup details.
## Public invitation fails or shows 1033
App **Public invite** uses Cloudflare Tunnel to provide a temporary web address.
`public invitation service exited before connecting` means the helper exited
before connecting; `exit status 1` alone does not identify the cause.
[Cloudflare error 1033](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1033/)
means that the address currently has no available tunnel connection. This differs
from a page that opens but reports **No media route available**.
1. **Viewers: confirm the link.** Ask the host to check that the App is running
and the computer is awake, then send the current invitation. Use a new link
after the App restarts; the old address may no longer work.
2. **Hosts: read the failure details.** Check that the complete App package was
extracted. Save the full error from the launch page or terminal, including
any detail after the exit code, and try again with **Debug launch**
enabled. The App retries early tunnel-process exits within its startup deadline.
3. **Compare networks.** Try a phone hotspot. Check whether DNS, a proxy or a
firewall blocks Cloudflare Tunnel; adjust only relevant rules. Ask the
administrator about a school or workplace network.
For a terminal timeout mentioning `:7844`, check outbound connections from
`cloudflared`, including proxy or game-accelerator rules.
[Cloudflare's connectivity checks](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/troubleshoot-tunnels/connectivity-prechecks/)
cover UDP and TCP on this port. This does not require opening an inbound port on your router.
If it keeps failing, you can share through the [online site or an existing site](./getting-started.md#share-from-an-existing-site).
Include the App version, failure time and [App diagnostic report](../../cmd/piik-app/README.md#diagnostics)
in feedback. If the unavailable address is a self-hosted site rather than the App's
temporary address, ask that site's administrator to check its service.
## Picture blurs, stutters or stops
Brief blur can result from automatic adjustments to network or encoding load.
If it recurs or never recovers, compare the following:
1. **Identify who is affected.** Is it the host's preview, every viewer or just
one viewer? Note the time and whether it recovers on its own. A clear host
preview does not establish that viewers' connections are healthy.
2. **Change one thing at a time.** The host can try a lower resolution or frame
rate under **Settings → Picture**, and check CPU/GPU load while the game runs.
An affected viewer can compare another browser or a phone hotspot. Increasing
bitrate does not necessarily help.
3. **Check the actual codec.** Open the host's **Show connection details** and
read **Video codec**. On Windows, Auto may select VP8 when H264 is unavailable,
its check cannot finish, or it cannot sustain the selected frame rate.
Software encoding competes with the game for CPU time. For **Browser** capture,
follow the [graphics checks](#h264-sharing-fails-on-windows), or compare the App's
window/screen capture. The App tries available hardware encoders independently.
VP8 alone does not establish a GPU fault; forcing H264 after a failed check may
make performance worse.
4. **Save reports from the affected period.** Enable diagnostics on the host and
affected viewer pages before reproducing; App capture also needs an App report.
Try **Reconnect** if the picture does not recover. Export before refreshing.
If sharing stopped altogether, read the reason below the TV and follow
[sharing startup checks](#sharing-does-not-start-after-source-selection). If the
host is still sharing but viewers cannot receive video, continue with the checks below.
## When video will not connect
**No media route available** means Piik has not found a working path to deliver
the picture to your device. Loading the page and receiving media use different
connections, so one can work while the other fails.
NAT (Network Address Translation) lets several devices share an Internet address.
Routers and providers differ in how they map addresses and admit incoming traffic;
some combinations make direct connections difficult. Firewalls and browser
policies can also block media. The message alone does not identify the cause.
STUN helps discover an address for direct connections; it does not relay the
picture. An unreachable STUN service can therefore leave chat working while
media fails. On self-hosted sites, administrators should check that `STUN_URLS`
points to reachable UDP services; an HTTP reverse proxy does not forward STUN.
Compare the diagnostic reports from both peers before assigning the cause.
Try these in order, stopping when the picture arrives:
1. **Retry the viewing page.** Choose **Reconnect** if it is available. If it is
disabled or does not help, refresh the viewing page or reopen the invitation.
Let each connection attempt finish. One or two fresh attempts can be worth
trying; repeated refreshes cannot remove a network restriction.
2. **Check browser WebRTC settings.** Browser settings or VPN/privacy extensions
can block media even while the page loads. This affects both sharing and viewing;
follow [browser WebRTC checks](#browser-webrtc-restrictions) below.
3. **Try another network.** For example, test a phone hotspot. If you use a VPN
or proxy, check its UDP policy; ask the administrator on a managed network.
4. **Enable usable IPv6.** Check that your provider, router and device support it.
When both peers have working IPv6, Piik can try that direct path alongside
IPv4. It does not bypass firewall rules; keep IPv4 enabled too.
5. **Check your own router, if you manage it.** On a trusted home network,
supported UPnP, PCP or NAT-PMP settings can let the App's native media path
request a port mapping. Browser-only capture does not request these mappings.
If a modem and router both perform NAT, follow your model's bridge/AP-mode
instructions to remove the extra layer. Carrier-grade NAT is upstream of your
router; ask your provider about available public IPv4 or IPv6 service.
Back up settings before changing the router's operating mode.
6. **Invite a friend on another network.** A Viewer who can receive the picture
and has spare forwarding capacity may give Piik another path to you. Piik
chooses this automatically; extra people help only when those connections work.
7. **Use a site with media fallback.** Its operator must enable SFU forwarding.
If the site offers **Privacy mode**, the Host must turn it off before sharing.
Sites configured for **Server media** already require SFU. The public
`demo.piik.tv` site and the App's **Public invite** mode do not provide SFU.
[Self-hosting](../operations/self-hosting.md#optional-media-fallback) is an
advanced option. Both P2P and SFU media currently use UDP; a network that blocks
UDP entirely still needs a different network or an administrator's help.
Router menus vary by model. These manufacturer guides explain
[IPv6 prerequisites](https://support.google.com/googlehome/answer/6361450),
[UPnP](https://support.google.com/googlehome/answer/6274337), and
[double NAT with a modem and router](https://www.tp-link.com/us/support/faq/3113/).
The [WebRTC connection guide](https://webrtc.org/getting-started/peer-connections)
explains discovery and connection checks in more technical detail.
If these steps do not help, collect a [Debug report](../../cmd/piik-app/README.md#diagnostics)
from the affected Viewer and, if possible, the Host for the same attempt. Include
the time, Piik version and network type when reporting the problem.
For a self-hosted site using SFU, also include the Server report. Successful Host
upload or subscription setup alone does not establish that the Viewer received
and decoded the picture; the reports from both sides help locate the failing step.
### Browser WebRTC restrictions
WebRTC carries Piik's picture and sound. Disabling it or blocking non-proxied UDP
can prevent viewing and even the local Browser-to-App media connection. Successful
source selection does not prove that connection works. Hiding local IP addresses
alone does not necessarily block WebRTC.
1. Open the same invitation in a browser profile with default settings and no
VPN/privacy extensions. If that works, check the original profile's WebRTC or
IP-leak protection settings.
2. Restore a policy that allows WebRTC UDP. A policy named `disable_non_proxied_udp`
is restrictive; the browser default is a useful comparison. Vivaldi exposes
**Settings → Privacy and Security → WebRTC IP Handling → Broadcast IP for Best WebRTC Performance**.
Chrome extensions can control this policy even without a visible browser switch.
3. Reload the affected Piik page and retry. If a school or company manages the
setting, ask its administrator to review it.
Allowing these connections can expose network addresses to WebRTC peers; change
only the relevant setting. See [Chrome's policy reference](https://developer.chrome.com/docs/extensions/reference/api/privacy#property-network)
and [Vivaldi's privacy settings](https://help.vivaldi.com/desktop/privacy/privacy-settings/).
### Campus networks and strict NAT
A campus network can work with Piik, but a shared Internet gateway or restrictive
firewall may make direct connections harder. Try a phone hotspot first: if the
same invitation works there, focus on the original network's restrictions.
For regular use, consider **self-hosting a Piik site with SFU media forwarding**.
This gives viewers a server path when direct connections fail. Follow the
[deployment guide](../operations/self-hosting.md#optional-media-fallback), including
its public-address and UDP-port requirements. Keep Piik App running, open the new
site in your browser and select **App** at the top to approve its local access.
Send invitations generated by that site.
The public demo and App Public invite mode remain P2P-only. SFU also requires
usable UDP: when the network blocks UDP entirely, use another network or ask the
administrator for access. Deploying a server alone does not remove that restriction.
Ready to host a site for your group? Follow [self-hosting](../operations/self-hosting.md).
For other guides, return to [the documentation home](./README.md).