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

Firebase deploy blanc page #3496

Closed
harrymelka opened this issue Nov 23, 2017 · 8 comments
Closed

Firebase deploy blanc page #3496

harrymelka opened this issue Nov 23, 2017 · 8 comments

Comments

@harrymelka
Copy link

harrymelka commented Nov 23, 2017

Hello,
I have met an issue with the firebase deployment. When I do the firebase deploy command everything works fine but when I go to the link from firebase, it shows a blanc page. I inspected it with chrome inspector and I see that this is my index.html but it doesn't go and root my real index.js page from my react project.

Configuration React Project

firebase 4.2.0
react 16.1.1
react-router 3.2.0
redux 3.7.2

firebase.json

screen shot 2017-11-23 at 17 30 19

public/index.html

screen shot 2017-11-23 at 17 32 07

Source

I have been following :
https://gautamthapar.me/deploying-react-app-firebase/#comment-309
https://medium.com/@bensigo/hosting-your-react-app-with-firebase-hosting-add1fa08c214

The link that firebase give me after deploy: https://smartbatz-502a2.firebaseapp.com/

If you have any idea, thank you

@SSTPIERRE2
Copy link

@harrymelka hey did you find what happened with this? I followed tutorials that made it look simple but I just get a blank page.

@Herohtar
Copy link

I came across this issue while searching for a solution to a problem that sounds similar to this. I have a create-react-app site that was previously deployed to Firebase just fine; however, after making some updates and re-deploying it, it no longer works. Everything generates into the build folder correctly, and it tells me the same number of files are deployed, but it seems that only the index.html and 404.html files are actually on the server. The .js and .css files that should be rendering the app give a 404 error. They are clearly there in the folder and the site works when I serve it locally.

@harrymelka
Copy link
Author

@SSTPIERRE2 yes I found how to fix it. When you try to deploy your solution, verify that your build folder is the right one that you use when you are using the command to initialise your project.

You can make some test by adding stuff like
<h1>Hello World</h1>
inside your index.html and another header to the other index.html and check which one is working.

@Herohtar
Copy link

The issue for me was a bug in firebase-tools that caused it to not deploy files correctly. I had to temporarily downgrade to an older version, but it has since been fixed.

@MincePie
Copy link

Hi @Herohtar - I'm trying to solve this same problem. I'm working through solutions that seem to have helped others, but not getting anywhere. What is the firebase-tools problem and how did you fix it? Or - do you think that problem no longer exists?

@MincePie
Copy link

@harrymelka - how did you solve the problem of the build/index.html not correctly reading from your src/index.html? I copied the src/index.html file over, because when i first initialised the fireabase app - it replaced my index.html with a firebase hosting notice. I realised then that the previous version of the build did not update when I changed the meta tags. But what can be done to solve that problem?

@Herohtar
Copy link

@MincePie The issue that was causing the problem for me was a bug with the deploy caching in firebase-tools that caused certain files to not actually be uploaded like they were supposed to. I temporarily used an older version to work around it, but they fixed the bug so if you have the latest version it shouldn't be that.

@lock lock bot locked and limited conversation to collaborators Jan 9, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants