Closed Dav-Way closed 4 years ago
Hello My2Eway, thank you for opening an issue with us!
I have automatically added a "needs triage" label to help get things started. Our team will investigate the issue and help solve it ASAP. Other community members may also look into the issue and provide feedback 🙌
For the first issue about asset links and browser address bar, I believe Chrome requires that your assetlinks.json file be located at the root of the domain to prove ownership. Your assetlinks file should be at /.well-known/assetlinks.json
. Can you try that?
For the second issue regarding service worker registration, I believe the service worker code looks for the service worker in a particular path. @jgw96 can you confirm?
Looking...
Hey @My2Eway , what does your pwabuilder-sw-register.js look like? Also, where did you get that file from if you dont mind me asking? Our service workers actually dont give you a sw-register file anymore so i'm just checking where you got that from. Also, our service worker tests do not look at a file path or anything anymore but actually just if your site has a service worker registered. The fact that one is not found for your site @My2Eway points to the service worker not being registered.
Hello,
Thanks for the answers.
We put all files on the root of the web server like this :
https://project.buzzyapp.com/.well-known/assetlinks.json
https://project.buzzyapp.com/pwabuilder-sw-register.js
But the adress bar is still displayed, have you got some anotehers ideas please ?
Thanks in advance
and the js files come from https://www.pwabuilder.com
@My2Eway it looks like you don't have a service worker:
Looking at your HTML, it looks wrong to me:
As described here, your HTML should contain the following:
<script type="module">
import 'https://cdn.jsdelivr.net/npm/@pwabuilder/pwaupdate';
const el = document.createElement('pwa-update');
document.body.appendChild(el);
</script>
That script will find a pwabuilder-sw.js
file and register it as your service worker.
Hello,
We updated the javascript code, and it look like the service worker is running.
But there is no change on app, the adress bar is till present.
Can you please check if there is some other problem on our app ?
Thanks in advance.
Did you follow the steps from our Remove the address bar article?
yes , i check this page and follow the stepds
do yo see any problems on my site / app please ?
What's the name of your app in the Google Play store? I'd like to install it and test out some things.
The actual name is "buzzyapp"
here is the link : https://play.google.com/store/apps/details?id=com.buzzyapp.project.twa&hl=fr
The issue is your asset links are incorrect. As documented in Remove the Address Bar, you need to verify your asset links are correct.
(You likely have incorrect asset links if you opted into Google Play resigning your APK, resulting in different asset links.)
To fix this, update your assetlinks.json file to the following:
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.buzzyapp.project.twa",
"sha256_cert_fingerprints": [
"AB:51:1D:87:56:D2:06:67:BA:4F:FD:A7:4D:C0:98:3D:A4:8E:96:94:A3:35:D1:E2:9C:5B:6E:E2:9C:CB:6E:25",
"C1:5A:37:F5:E3:8F:A6:BA:F1:13:30:BF:7E:7C:9B:F3:19:B8:67:72:ED:CD:25:BA:94:57:97:84:80:02:18:09"
]
}
}]
Please update your asset links file, then let us know if it works. 👍
Hello,
Thanks for you answser.
I've upload the new assetlinks.json : https://project.buzzyapp.com/.well-known/assetlinks.json
But there is no change, as you can see in this screenshot :
It's working for me:
Your local device may have had the assetlinks.json file cached. Refresh it in Chrome, then reinstall the app. (Alternately, serve assetlink.json with a no-cache header.)
Let me know if it works for you.
yes it works with chrome, thanks a lot ! it was a cache problem as you described
with the samsung internet browser the address bar is present, but maybe this browser dont fully support PWA ?
Glad your issue is fixed!
With regards to Samsung Browser, I'll need to check with the Google team to see whether Android Trusted Web Activities (TWA) are fully supported in their browser. @davrous do you know?
In the meantime, @My2Eway, if you need Samsung support without the browser address bar, please open a new issue for that. 👍
@JudahGabriel do you mean i need to create a new issue on github for pwa samsung support ? (and close this one #996) ?
@David-My2eWay Yes, since this issue is about asset links and service worker, I recommend you open a new issue for your Samsung browser issue.
ok, its done 👍
Hello all,
We used PWABuilder to create a PWA app from a web app and it works great, thanks!
But we have 2 problems that we can't solve, can you please help us ?
1 / we created a directory /app/serviceWorker1/ containing the files pwabuilder-sw.js and pwabuilder-sw-register.js, but on the site https://www.pwabuilder.com the "service wordker" test still fails
2 / we created a directory /app/.well-known/ directory containing the assetlinks.json file, but the Browser Address Bar is still displayed on the wpa app
Thank you in advance.
Regards, David