Skip to content

Latest commit

 

History

History
48 lines (28 loc) · 1.68 KB

README.md

File metadata and controls

48 lines (28 loc) · 1.68 KB

Sample TWA app to request clipboard permission

How to run the example

  1. How to launch the web app
  2. How to launch the Android app

Screenshot_1710265892

What is the problem?

Executing:

await navigator.clipboard.read();

returns a promise that is never resolved or rejected.

How to reproduce the problem?

  1. Start the web.
  2. Launch the Android app.
  3. Tap on the button.
  4. 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: chromeVersion

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