Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Web App Manifest / Add to home screen not working #534

Closed
rivengh opened this issue Dec 19, 2020 · 6 comments · Fixed by #562
Closed

Invalid Web App Manifest / Add to home screen not working #534

rivengh opened this issue Dec 19, 2020 · 6 comments · Fixed by #562
Assignees
Labels
bug Something isn't working

Comments

@rivengh
Copy link
Contributor

rivengh commented Dec 19, 2020

Describe the bug
Add to home screen feature not working correctly with evcc.

To Reproduce
Steps to reproduce the behavior:
Open evcc with mobile browser and select "Add to home screen".
A shortcut is created on the home screen, but without an icon and with an invalid URL (e.g.": https://evcc/dist/#/).

Expected behavior
A shortcut is created on the home screen, with evcc icon and correct start URL.

EVCC details:
evcc 0.37

@rivengh
Copy link
Contributor Author

rivengh commented Dec 19, 2020

Screenshot 2020-12-19 175754

@andig
Copy link
Member

andig commented Dec 19, 2020

/cc @naltatis I have the same problem. Looks like another bug in parcel.js. Any idea how to fix this?

@rivengh thanks for spotting the source of this issue- has been driving me mad for some days now and I've always blamed Apple.

Could we just remove the manifest without losing anything?

@naltatis
Copy link
Member

I already looked into fixing this in parcel, but since this is not our only issue with relative paths it might be easier to switch from parcel to vue-cli (Webpack). I already have a version of this working in a local branch.

@mark-sch
Copy link
Contributor

Encountered other side effects (necessary workarounds) with parcel also: e.g. adding a simple, relative "a href" seems to be impossible. Needed this ugly workaround, a link like "/broker/login" is impossible:

<div class="navbar-nav"> <router-link class="nav-item nav-link pb-1" to="/">Laden</router-link> <router-link class="nav-item nav-link pb-1" to="/config">Konfiguration</router-link> <script>document.write('<a class="nav-item nav-link pb-1" href="' + document.location.origin + '/broker">Sunny5-Broker</a>')</script> <script>document.write('<a class="nav-item nav-link pb-1" href="' + document.location.origin + '/broker/login">Login</a>')</script> </div>

So I would appreciate to drop the parcel usage also.

@PanNwt
Copy link
Contributor

PanNwt commented Dec 25, 2020

For me it looks like the relative path inside the webmanifest with only one folder up is the problem. In the release 31/32(?) the deployment of the assets were changed and now the manifest file locates in a different two level deep folder (source and published). Adding another ../ should solve this issue.

A current workaround is to have two container with evcc. One with version 0.30 for creating the homelink and one with the latest version for working with.

@andig
Copy link
Member

andig commented Jan 2, 2021

It's tool-generated. Problem is that the bundling tool does not work with relative paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants