GoogleChrome / android-browser-helper

The Android Browser Helper library helps developers use Custom Tabs and Trusted Web Activities on top of the AndroidX browser support library.
Apache License 2.0
694 stars 288 forks source link

PostMessage request has failed due to an internal error on the browser message channel. #445

Open onkar-rentomojo opened 1 year ago

onkar-rentomojo commented 1 year ago

Read this First If you have a Trusted Web Activity related question, the best place to ask it is on StackOverflow, on the trusted-web-activity tag, which is also monitored by the team.

Describe the bug Open your app URL - post message works properly and data flow is proper - open external url in new tab and comeback to the app - as soon as web sends post message, app crashes. We get -3 error code which is this - PostMessage request has failed due to an internal error on the browser message channel.

Additional context Tested on chrome 117, chrome 119 (dev)

Cartier0745 commented 11 months ago

Hi @onkar-rentomojo I am trying to setup Postmessage demo from https://developer.chrome.com/articles/post-message-twa/ but it's failed on onRelationshipValidationResult. Could you please tell me how do you specify

private Uri SOURCE_ORIGIN = Uri.parse("my-app-origin-uri");

Is it just package name eg. https://com.mycompany.myapp ?

shunxing commented 8 months ago

@Cartier0745 I have the same issue as you

@onkar-rentomojo any idea ?