Firebase hosting: Needs Setup

风流意气都作罢 提交于 2019-11-28 21:16:28
brennen

I had the same problem, I was able to resolve it by toggling the DNS Status on cloudflare from DNS and HTTP Proxy (CDN) to just DNS on the two A records

It started working right away. Hope that helps!

The proper solution, ie without disabling Cloudflare for the site, is to use Full SSL for your domain/subdomain.

You can either choose Full SSL for all your domain entries, or set up a Page Rule for a specific subdomain, in your case, use "inv.agsft.com/*"

Source: https://community.cloudflare.com/t/flexible-ssl-redirect-loop-with-google-firebase/2063/3, which in turn points to https://support.cloudflare.com/hc/en-us/articles/115000219871-Why-does-Flexible-SSL-cause-a-redirect-loop-

Had the same issue and this solved the redirect issue. Firebase will however still report the domain as "Needs setup", for that I have no solution, but it does not affect the functionality of the hosting.

When I run dig -t txt +noall +answer inv.agsft.com there are no TXT records showing. Since those are required to verify your ownership of the domain, Firebase Hosting will not continue the setup beyond step one.

Update: since the next step requires you to map A records to the IP addresses of Firebase hosting, I ran the relevant dig too:

$ dig -t a +noall +answer inv.agsft.com
inv.agsft.com.      299 IN  A   104.18.56.240
inv.agsft.com.      299 IN  A   104.18.57.240

Those are not the addresses I'd expect for Firebase Hosting, so it looks like either you haven't correctly entered the A records, or they have't propagated yet.

When I change my setting like below, it started to work again. Redirect loop fixed:

To avoid any kind of ssl issues when using firebase hosting and cloudflare you have to check to following points:

  1. You don't need to toggling the DNS Status on cloudflare from DNS and HTTP Proxy (CDN) to just DNS on the two A records unless you don't want the cloudflare ssl certificates and want to just use the firebase ssl certificates (look to this carefully because you will loose the protection that cloudflare provides to your site in case you decide to use only the clouflare DNS)

If you "keep the cloud orange" it will not causes any problem to your firebase hosting.

  1. Add the firebase IP's to cloudflare following the instructions provided by firebase hosting and remove any other A record from your domain/subdomain that you are setting up

  2. To ensure you have a end-to-end encryption (using both firebase ssl as well as cloudflare ssl), make sure that your cloudflare crypto options is set to "Full":

  1. Use a page rule likes in case that you want your root domain to receive all trafic:

  1. In your firebase hosting setup, do the same:

p.s: Look that the message "Needs setup" is still there but the app is running without any problem.

p.s2: the majority problems regarding cloudflare and firebase is that firebase ssl can take several hours to start to work and you keep seeing a message like "your connection is not private". It happens not beucase cloudflare is messing our proxy out but because firebase ssl is still not fully propagated.

I hope it help others :)

For the people that is using Namecheap, This configuration worked for me.

I had the same issue. Here's how I fixed it:

1) Cick the View button on the problematic domain (in the Hosting section next to where it says Needs Setup).

2) Change the 'Setup mode' from Quick Setup to Advanced and follow the 3 steps

  • 2a) Open your domain provider's settings (I'm using Google Domains) and add the TXT record it's giving you.
  • 2b) Wait about 4-12 hours for verification
  • 2c) Add the provided A records into your domain provider's settings

This is not a quick process, but it should be working about 5 minutes after you complete step 2c.

In my case I did the same that Brennen did:

  • toggling the DNS Status on cloudflare from DNS and HTTP Proxy (CDN) to just DNS on the two A records.

But just start working when I:

  • Delete the domain from firebase. (click on the : points select delete domain)
  • refresh the firebase site
  • Added again in Quick Setup. I already had the A record added in Cloudflare so I didn't added again.

After that automatically the status added was connected.

Remember: Before testing, clean you browser cache.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!