-
Notifications
You must be signed in to change notification settings - Fork 928
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
Cannot read property 'deploys' of undefined #1232
Comments
There's been some adjustments in this flow recently. This error is coming from (in the source): https://github.com/firebase/firebase-tools/blob/master/src/deploy/index.js#L111 @Memeriaj can you take a look as you've been dealing with this lately? |
I think I may know what is going on here. Does your We definitely need a proper error in this case explaining that we're not deploying anything. (unrelated to the issue: generally you want to have your environment level switching be on a Firebase project level basis and not on different Hosting Sites within the same project (though you might have a Site for a blog, a Site for a web app, and a Site for your Docs that are all in the same environment on different Hosting Sites on the same project). This is mainly because things like Firebase Auth have only a single instance within a project. Ideally your |
|
I think the config you mention is in the firebase bashrc file and not the firebase json file. |
Under the hosting section of the firebase.json file you need to have |
Sorry, its not clear where in the json to put the target field, would i put this at the root of the json(it didnt work) or should it be in the root of the hosting(also didnt work for me). |
Also my firebaserc file, references my root project but it doesnt have any reference to the my second hosting site, so im not sure how the CLI tool will be able to understand where to deploy to. |
It should go in the Hosting section of your
This docs page has goes into further detail about each step and talks a little bit about why you might use targets and multiple Sites as well. With |
Thanks, i seem to making some headway but now im getting a 404 error entity not found.
|
That snippet from your Possible problems (you've probably checked these, but I'm listing them just in case other people stumble on to this later):
If you try deploying with the debug flag on which part is the one returning the 404? I'd suspect that it would come from |
Ok, managed to work out what was going on. |
Whoa, wait. You needed to upgrade to Blaze for your deploy to work? What this because you hadn't created the new Hosting Site yet and needed to upgrade to do so? Or was it that you'd previously upgraded to Blaze, created a second Hosting Site, downgraded your billing plan, and then tried to deploy? Also do you happen to know which request was throwing that error? Because you're right, that error is not helpful at all and I want to track down where it came from so that I can have it provide some guidance on what to do instead of some generic 404 text. |
Yep thats right, Its a little confusing, I'm pretty sure i created the second site on the free tier, then i had problems deploying and thought it might be that, so i upgraded. When i realised i needed to raise an issue on github, i downgraded, when i did this, wierd things started happening in the firebase web console. The second hosting website would appear, but when i clicked it, it would show an empty screen. |
having same issue |
@isevcik really? I was fairly certain that we fixed that issue (and I really should have closed this). Did you do a similar thing of upgrading your project, and then downgrading it? You probably should email into support so that we can get the details of your project and get it fixed. You should make sure to mention this GitHub issue and me so that they know who to send it to. |
@isevcik I was getting this same error and thought I had the same issue but it turned out to be a typo in the projectid in .firebaserc. firebase target:apply type target-name resource-name |
Hello, same issue:
|
@hpoit I'm also getting that error. Did you resolve it? If so what did you change?
Has this been resolved for anyone that's contacted support as @Memeriaj suggested? If so could the details be posted here for future reference? |
@MaxInertia yes I resolved it, I formatted and erased my entire machine :-) |
I think it just throws this error when it can't find the deploy target in your config. I would check your config in the two config firebase files. Post the contents up here if you want a second opinion. |
Same thing here, when tried to deploy secondary website with firebase 7.3.1 Actually, error was in firebase.json, I have specified wrong "target" |
I was able to resolve this issue by creating a new deploy target with the help of this guide: https://firebase.google.com/docs/hosting/multisites?authuser=1#set_up_deploy_targets I issued one command:
and added
edit: I stepped into this issue when I set up my first hosting on my brand new firebase project. |
I was able to resolve it as well. My issue was that when I created my deploy target using the command outlined in the docs: $firebase target:apply hosting target-name resource-name, I had put my main project as the resource name. I changed that in the .firebaserc file and ran the firebase deploy command and it worked. Example below:
|
Hi am also facing the same issue, slightly in a different way(for custom added domain) I am able to deploy into multiple hosting with different target name. but when I try to deploy into my custom added domain. I get Error: HTTP Error: 404, Requested entity was not found. My custom domain is 3dprinter.froozen.in (added to firebase inside default hosting by clicking add custom domain button) |
We will need debug logs showing the exact failing call to be able to help
diagnose the issue.
…On Sat, Jan 4, 2020, 12:52 AM nandha ***@***.***> wrote:
Hi am also facing the same issue, slightly in a different way(for custom
added domain)
I am able to deploy into multiple hosting with different target name. but
when I try to deploy into my custom added domain. I get *Error: HTTP
Error: 404, Requested entity was not found.*
My custom domain is 3dprinter.froozen.in (added to firebase inside
default hosting by clicking add custom domain button)
My custom domain is added inside my project default domain.
Kindly help me in proceeding further
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1232?email_source=notifications&email_token=AAAAH7SNCPUEIMIWCDHK6CDQ4BE4JA5CNFSM4HJWK5J2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICTYYY#issuecomment-570768483>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAH7V26G3YF6Q7FYDP5QTQ4BE4JANCNFSM4HJWK5JQ>
.
|
Hi @mbleigh , I got my issue resolved
If there is no more queries we can close this issue |
My problem with "Error: HTTP Error: 404, Requested entity was not found" i tried to use
istead of
|
I solved mine by making sure:
The
The important part is making |
I got hit by this today as well, converting firebase.json Now I need to duplicate every entry (even if its the same except target), that have lots of headers configuration for all environments, suddenly that's 4x json configuration I need to manage. Anyway to reuse default hosting from firebase json? |
Multiple sites in the same project are not intended to be used as "environments" -- if you have a "staging", "dev", etc site those should be sites in different projects and the If that's not what you're doing, can you help me understand why the |
Well, that does pretty much sums it up, we current have 4 different env in different GCP projects, however we needed to deploy a temporary env (that includes other parts, not just firebase hosting), felt a lot simpler to re-use existing GCP project for a month or two, rather than adding a brand new one. The only way to achieve this atm, is by duplicated firebase.json hosting configuration 5 times and adding unique target to each config. I guess where the confusion comes from, is if you have default hosting configuration, expectation would be that it will work with any target or project, but I guess that's my misunderstand on how its used by different projects, compared to project + target. Obviously can still make it work, just took a a while understand why this error showed up. |
The error message is definitely bad either way, and FWIW we have a better solution for "ephemeral previews" under development now 😄 |
Just to add to the "array fix", we have two sites deployed, I was able to target the correct site after changing targets to an array:
But then the "admin" returned a blank page, as we are using React, the trick was to have the Public point to Build. |
I'm encountering this issue, and everything is correct according to the above and docs. Yet I still get the error. No matter which target I use, it doesn't seem to respect that, even though all the files and settings are reported as correct. Is there anything else not covered above? |
|
Hmm, I don't know exactly what I did to make it work, but it currently works with this
|
I had the issue today and was able to find a fix. So full procress is,
Not doing the above step will leave your app at the welcome title.
Now for some odd reason, after
then
|
Environment info
firebase-tools:
[email protected]
Platform:
MacOS
Test case
MacOS, Node 10.15.3, [email protected]
Steps to reproduce
Create two hosting sites on firebase console.
Run
'firebase target:apply hosting dev firebase-hosting-id'
Run
'firebase deploy --only hosting:dev'
Expected behavior
Deployment successful
Actual behavior
The text was updated successfully, but these errors were encountered: