I have made a pwa application using angular. The problem is that on chrome android the app doesn't start in standalone mode, even the service worker is working right and i have https connection. I think the problem may be that my app is at www.domain.com:18052 (custom port) but I have not found any info in documentation.
Asked
Active
Viewed 542 times
1
-
Welcome to SO, could you please add more details? maybe some code snippets or mentioned what you have tried already? – Alen Genzić Jul 20 '18 at 07:02
-
@D.Simon i mentioned that i have https – adrian.coca Jul 20 '18 at 07:18
-
1@AlenGenzić i generate an app with ng new angular-pwa-app and after that added a service worker ng add @angular/pwa --project . I made a ng build --prod and deployed in nginx. site is like https://www.example.com:18052. I think the problem might be because of custom port. I don't have the posibility to test my app on standard 443. – adrian.coca Jul 20 '18 at 07:22
-
1. Did you test the HTTPS url with the Chrome Audit tool? 2. Did you see there "User can be prompted to Install the Web App"? 4. If yes, did you see the Automatic Install prompt in Chrome when you open the site? 5. Did you install the app? 6. Are you using the shortcut icon on your screen to open the standalone? – Mathias Jul 20 '18 at 23:43
-
@Mathias the answer to all your questions is Yes. the app is installed and opened from home screen and is not a shorcut, it generates a signed .apk but is not opened in standalone mode. – adrian.coca Jul 26 '18 at 12:51
-
If you added to the home screen from the Chrome automatic prompt, that icon should open standalone. Which version of Chrome are you using? Have you asked someone else to try it on their device? – Mathias Jul 26 '18 at 13:02
-
If you have a URL you can share, I can test on my device to see if it works. – Mathias Jul 26 '18 at 13:02
-
Oh, that is most mysterious. Happens to me as you described. Sorry, all I can do is a wild guess. Is the machine you are hosting on spinning up new instances each time you hit the URL? You may want to try something static. I have never seen this happen with the 10-15 I have tested. – Mathias Jul 27 '18 at 01:14
-
Also there is one simple error in the audit you may want to fix. But I doubt it will make the Standalone screen issue go away. https://developers.google.com/web/tools/lighthouse/audits/no-js – Mathias Jul 27 '18 at 01:17
-
1@Mathias is just a simple server with nginx, no docker and other stuffs. I will try to fix that error but as you said I don't think is the problem. Thanks for your help and if i will find a solution i will post here. – adrian.coca Jul 27 '18 at 07:24
-
It may be using the port is causing the issue. Can you test with the default? See this answer: https://stackoverflow.com/questions/51677716/pwa-deployed-in-node-js-running-in-standalone-mode-on-android-and-ios – Mathias Aug 06 '18 at 12:48
-
@Mathias I tried with default one and it's working. It seems that Chrome doesn't like customs ports. Thx for help. – adrian.coca Aug 10 '18 at 09:55
1 Answers
0
It may be using the port is causing the issue. Can you test with the default?
See this answer: PWA deployed in node.js running in Standalone mode on Android and iOS

Mathias
- 4,243
- 4
- 25
- 34