firebase init exit in 404 Error when both Hosting and GitHub Actions are selected
[REQUIRED] Environment info
Ubuntu 20.04.3 LTS
[REQUIRED] Test case
See the reproduction procedure below.
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
It should be able to complete the configuration successfully without error exit.
Fundamentally, the problem may be that the hosting configuration includes the GitHub Actions configuration, and there is a separate GitHub Actions configuration option.
[REQUIRED] Actual behavior
The setup for "Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys" will be completed successfully.
During the setup of "Hosting: Set up GitHub Action deploys", the following error occurs.
The text was updated successfully, but these errors were encountered:
I have investigated the cause of this issue.
I ran the same procedure with the
As you can see
The relevant part of the source code
This occurs in the following places in the source code.
Therefore, if the GitHub Actions setting is executed twice, the return value of the
And this will cause a 404 error.
The root cause and proposal
The root cause is that
How about modifying it to ignore "Hosting: Set up GitHub Action deploys" if the both options are selected?
@os1ma why do you need both features?
As I understand, the second one is a part of the first one, so you do not need to select second feature. But I agree that selecting of both features should not broke the tool.
@Matrosskin Hi! Actually, I am not sure about the reason why both features are needed. It's just my guess, but the "Hosting: Set up GitHub Action deploys" option might be useful, if you want to add only GitHub Actions configuration later to an existing project.
In any case, it should not terminate in error, so I will create a simple pull request to resolve this issue.