question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v1.11.0 assetlinks.json not generated by`bubblewrap build` and `bubblewrap fingerprint generateAssetLinks` is empty

See original GitHub issue

Describe the bug

Per the Quick Start Guide, an assetlinks.json should be generated when I run bubblewrap build but this seems to only be the case in v1.10.0 AND when I use the new fingerprint command, the file is empty (I think because it imports and maps over the empty fingerprints key in the generated twa-manifest.json).

To Reproduce

Steps to reproduce the behavior:

  1. npm install @bubblewrap/cli@v1.11.1
  2. npx bubblewrap init --manifest=https://slate.com/media/sites/slate-com/web-app-manifest.json
  3. press enter at all prompts
  4. npx bubblewrap build --skipPwaValidation
  5. Note that there is not assetlinks.json file generated nor a message about it
  6. npx bubblewrap fingerprint generateAssetLinks
  7. Note that assetlinks.json is empty

Expected behavior npx bubblewrap fingerprint generateAssetLinks should generate an assetlinks.json file with content similar to v1.10.0 e.g.

[{
        "relation": ["delegate_permission/common.handle_all_urls"],
        "target" : { "namespace": "android_app", "package_name": "com.slate.twa",
                     "sha256_cert_fingerprints": ["B8:C8:22:AF:6C:D2:5B:7A:68:F4:2D:F8:BB:D8:F5:10:21:21:E4:69:E2:5A:FA:79:0C:EA:2D:C2:69:4D:FF:19"] }
      }
]

Additional context When I install v1.10.0, its bubblewrap build generates the assetlinks.json file, so this error seems likely related to addition of the fingerprint command in #478. Note also that #478 assume that there will be something in the fingerprints array of the twa-manifest.json file, but that when I do a bubblewrap init for my manifest that array is empty in twa-manifest.json. Both v1.10.0 and v1.11.1 generate the empty fingerprints array "fingerprints": [], - but only v1.11.1 seems to rely on it being populated with the fingerprint command. Did I miss something?

Desktop (please complete the following information):

  • OS: MacOS
  • Browser n/a
  • Version v.1.11.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
hhimanshucommented, Jul 15, 2021

Thanks for filing this, @elgreg.

Generating fingerprint from the key generated by Bubblewrap was removed. The reason for the change is that most developers use (and they should be using) Play App Signing when upload the app to the Play Store and the default assetlinks.json generated by Bubblewrap was incorrect in most cases.

We may want to reinstate that, since that key can be used for debugging locally.

@andreban, based on what I read, we should reconsider updating https://developer.chrome.com/docs/android/trusted-web-activity/quick-start/#creating-your-asset-link-file. Since I am new and looking for first hand information, I relied on this web page and did not see assetlinks.json being created. It’s only when I hunted down I came to this GitHub issue. As I understand now, I must use https://developer.chrome.com/docs/android/trusted-web-activity/quick-start/#play-store-signing for generating assetlinks.json. Please correct me if I am wrong here. Thanks

4reactions
devalexqtcommented, Apr 8, 2021

bubblewrap build not generated assetlinks.json for me too! And WTF?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Concepts (for Web Developers)
To create the assetlinks.json file, you'll need the SHA 256 certificate fingerprint associated with your app's signing key. The important thing ...
Read more >
App links intent filters in assetlinks.json not working on Android
Create assetlinks.json using Tools > App Links Assistant . Then press Open Digital Asset Links File Generator , enter domain, application id, select...
Read more >
Getting Started | Google Digital Asset Links
The Digital Asset Links protocol and API enable an app or website to make public, verifiable statements about other apps or websites.
Read more >
Validating your Trusted Web Activity's Digital Asset Links
Digital Asset Links allow your website to declare that it's related to an Android app and vice versa. It also allows your app...
Read more >
Android App Links not working when using "App Signing by ...
I've also downloaded a derived APK from Google Play and made sure that the fingerprint matches that in the assetlinks.json file. Here's an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found