Sample TWA app to request clipboard permission
How to launch the web app
How to launch the Android app
Executing:
await navigator . clipboard . read ( ) ;
returns a promise that is never resolved or rejected.
How to reproduce the problem?
Start the web.
Launch the Android app.
Tap on the button.
In the Chrome console, you can see the first log message but not the one after the promise and no dialogue prompts for permission in the TWA.
To reproduce it again you must clear site settings and permissions inside Google Chrome, kill the app and open it again.
Which version of Chrome are we using?
It happens with all the latest versions of Chrome. For example:
Example of permission dialogue never appearing
permissionDialogNeverShownInTWA.mp4
Example of permission being rejected briefly while reloading with Chrome dev tools
permissionDialogBrieflyAppearingAfterReloadWithDevTools.mp4
Example of correct behaviour in Chrome outside the TWA
workingFineInChrome.mp4
It also happens with other permissions, like the microphone
microphoneNotWorking.mp4