pwa-builder / PWABuilder

The simplest way to create progressive web apps across platforms and devices. Start here. This repo is home to several projects in the PWABuilder family of tools.
https://docs.pwabuilder.com
Other
2.55k stars 273 forks source link

[BUG] [QUESTION] Address bar present while building the android app locally #4633

Closed shunxing closed 5 months ago

shunxing commented 5 months ago

What happened?

Hi there,

I generated the Android code from pwa-builder. When building locally with Android studio, the address bar kept being shown. However the assetslinks.json is uploaded and live on my website.

The assetslinks.json is working fine. When the app is installed from the published version in the Google play store, it doesn't show the address bar. The issue only happens when building and running the app locally on an emulator.

My first guess would be that I'm not having my signing key when building locally and using the debug variant instead of the release. Unfortunately I don't have access to my release signing key. Other members are taking care of signing off the release app.

Would that be the cause of my issue while building and running locally

image

Would there be a way of forcing the verification locally?

How do we reproduce the behavior?

  1. Build any app in pwa-builder
  2. Upload the assetslinks.json to your domain
  3. Build the Android app locally that will access to your domain

What do you expect to happen?

No address bar is shown and no error saying that the verification of the assetslinks has failed

What environment were you using?

OS: MacOS 13.6.3 IDE: Android Studio Giraffe | 2022.3.1 Patch 2 Emulator

image

Additional context

No response

jgw96 commented 5 months ago

Hey! So yes, you have identified the issue correctly. For local testing, I would say just test the PWA installed from Chrome, unless you need to test any specific code you may have added to your TWA. @khmyznikov or @Jaylyn-Barbee any other ideas?

shunxing commented 5 months ago

I found a workaround to make it work locally

To make it work locally with the debug mode, I still haven't found a solution

jgw96 commented 5 months ago

Thanks for sharing! I am going to close this for now as it is out of scope for PWABuilder, but thanks!