You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When hosts load View HTML via srcdoc, PostMessageTransport needs contentWindow at construction time, but it's not available until the iframe loads. The View sends ui/initialize before the host transport is listening — the message is dropped, the bridge never fully initializes, and ontoolinput is never sent.
Opened an issue with the full breakdown (#542) and a PR with a fix (#543). Hope it helps!
Thank you @netanelavr! Do you think this is related to an issue in ChatGPT when revisiting a previous chat the app tool is called and a request/response is shown, but although onAppCreated fires none of its registered events fire?
Thank you @netanelavr! Do you think this is related to an issue in ChatGPT when revisiting a previous chat the app tool is called and a request/response is shown, but although onAppCreated fires none of its registered events fire?
@bgonzalez-thestable Yeah, could be the same issue if ChatGPT recreates the iframe when you go back to an old chat. Though it might also just be ChatGPT showing cached results without actually calling the tool again so onAppCreated fires but there's no tool input because nothing's being invoked. Worth checking the console to see if ui/initialize gets a response or not.
v1.7.0 adds diagnostics for two of the three causes here: a console.warn (or throw under {strict:true}) when one-shot handlers are first registered after connect() (#629/#631), and useApp now closes the App on unmount so React StrictMode dev doesn't leave a zombie listener (#631). The third cause — host attaching its transport listener after the View has already sent ui/initialize (#542) — is being addressed via host-ordering docs rather than #543's queue approach. For React, register one-shot handlers via onAppCreated (see basic-server-react). Could you retest with 1.7.0 and share any new console warnings?
Activity
netanelavr commentedon Mar 8, 2026
Hi @bgonzalez-thestable — I think I found the root cause.
When hosts load View HTML via
srcdoc,PostMessageTransportneedscontentWindowat construction time, but it's not available until the iframe loads. The View sendsui/initializebefore the host transport is listening — the message is dropped, the bridge never fully initializes, andontoolinputis never sent.Opened an issue with the full breakdown (#542) and a PR with a fix (#543). Hope it helps!
bgonzalez-thestable commentedon Mar 11, 2026
Thank you @netanelavr! Do you think this is related to an issue in ChatGPT when revisiting a previous chat the app tool is called and a request/response is shown, but although onAppCreated fires none of its registered events fire?
netanelavr commentedon Mar 22, 2026
@bgonzalez-thestable Yeah, could be the same issue if ChatGPT recreates the iframe when you go back to an old chat. Though it might also just be ChatGPT showing cached results without actually calling the tool again so onAppCreated fires but there's no tool input because nothing's being invoked. Worth checking the console to see if ui/initialize gets a response or not.
ochafik commentedon Apr 21, 2026
v1.7.0 adds diagnostics for two of the three causes here: a
console.warn(or throw under{strict:true}) when one-shot handlers are first registered afterconnect()(#629/#631), anduseAppnow closes the App on unmount so React StrictMode dev doesn't leave a zombie listener (#631). The third cause — host attaching its transport listener after the View has already sentui/initialize(#542) — is being addressed via host-ordering docs rather than #543's queue approach. For React, register one-shot handlers viaonAppCreated(see basic-server-react). Could you retest with 1.7.0 and share any new console warnings?