Skip to content

WebApp.requestWriteAccess() callback never fires on second invocation (page reload / repeated call) #30729

@AgentBelfort

Description

@AgentBelfort

Steps to reproduce

Open a Mini App in Telegram Desktop. The Mini App calls Telegram.WebApp.requestWriteAccess(callback) early during initialization.
The permission modal appears. Either dismiss it without explicit answer, or grant/deny normally - both reproduce the issue.
Reload the Mini App page (Ctrl+R / "Reload page" from the three-dots menu), OR call requestWriteAccess a second time within the same session.
On the second call, the SDK logs to the JS console:

[Telegram.WebApp] Write access is already requested
and the callback passed to requestWriteAccess is never invoked.

Expected behaviour

The callback should be invoked with a boolean result on every call, regardless of whether the request was suppressed due to throttling, an existing permission, or any other internal state. Either of these would be acceptable:

Invoke the callback synchronously with true if the user has previously granted access (allows_write_to_pm: true in initData).
Invoke the callback with false if the request is suppressed (throttled / already pending).
Pass through and re-show the modal.

Currently the callback is silently dropped, which makes it impossible for a Mini App to know whether to wait for a response or proceed.

Actual behaviour

Callback is never called. Any await new Promise(resolve => Telegram.WebApp.requestWriteAccess(resolve)) pattern hangs forever, blocking the rest of module initialization on async paths. No error is thrown, no event is dispatched, no rejection occurs — the promise simply never settles.

Operating system

Windows 11

Version of Telegram Desktop

Telegram Desktop (latest stable), Telegram.WebApp.version === "9.6"

Installation source

Static binary from official website

Crash ID

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions