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

Prerendering generate localhost related links into the html of login page #168

Open
tbetous opened this issue May 13, 2019 · 2 comments
Open
Labels
🐛 bug Something isn't working 🙏 help wanted Extra attention is needed

Comments

@tbetous
Copy link
Collaborator

tbetous commented May 13, 2019

Describe the bug
Prerendering have a weird behaviour with manifest icons. Particularly when it renders /login. We can found this in the head tag :

<head>
...
<link rel="icon" href="http://localhost:8000/img/icons/android-chrome-512x512.png" sizes="512x512">
<link rel="icon" href="http://localhost:8000/img/icons/android-chrome-192x192.png" sizes="192x192">
<meta name="mobile-web-app-capable" content="yes">
<meta name="x5-page-mode" content="app">
<meta name="browsermode" content="application">
<link rel="icon" href="https://bento-starter.firebaseapp.com/img/icons/android-chrome-512x512.png" sizes="512x512">
<link rel="icon" href="https://bento-starter.firebaseapp.com/img/icons/android-chrome-192x192.png" sizes="192x192">
<meta name="mobile-web-app-capable" content="yes">
<meta name="x5-page-mode" content="app">
<meta name="browsermode" content="application">
...
</head>

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://bento-starter.firebaseapp.com/login/
  2. Look a the generated head tag

Expected behavior
The html code should look like this :

<head>
...
<link rel="icon" href="https://bento-starter.firebaseapp.com/img/icons/android-chrome-512x512.png" sizes="512x512">
<link rel="icon" href="https://bento-starter.firebaseapp.com/img/icons/android-chrome-192x192.png" sizes="192x192">
<meta name="mobile-web-app-capable" content="yes">
<meta name="x5-page-mode" content="app">
<meta name="browsermode" content="application">
...
</head>

Desktop (please complete the following information):

  • OS: Linux Ubuntu 18.04
  • Browser Chrome
  • Version 73

Additional context
This is probably related to the spa prerendering plugin because when I generate prod build with yarn build command I can see the wrong html template in dist/login/index.html file.

@tbetous tbetous added 🐛 bug Something isn't working invalid This doesn't seem right and removed invalid This doesn't seem right labels May 13, 2019
@tbetous tbetous changed the title Prerendering generate link related to localhost into the html of login page Prerendering generate localhost related links into the html of login page May 13, 2019
@tbetous tbetous added the 🙏 help wanted Extra attention is needed label May 16, 2019
@thomasmarcelin
Copy link

It only happens when you navigate directly in /login, if you start at root then navigate I can't reproduce.
Maybe vue-head might be messing with it too ?

@tbetous
Copy link
Collaborator Author

tbetous commented Jun 19, 2019

Yes, I suspect either a wrong behaviour from vue-head or from pwa-plugin. What makes me to think that is that all these headers are generated with pwa-plugin based from what is written in manifest.json.

These headers should be generated with relative path.

I am not sure at all, but I don't have the time right now to dig into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🙏 help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants