This Firebase deploy error “HTTP Error: 500, Internal error encountered.” is a frustrating one and the logs don’t always seem to help in solving it. Before getting too technical with your search, this is a good place to start for beginners using Firebase.
The first port of call is to have a run through the firebase-debug.log file, this is located in the route of your project but will only be visible if your last deployment failed. If you can’t shed any light on the situation from there then the next thing to do is to log in to the Firebase web console.
If you are on the free or a capped tier you will need to check your usage limits, it may be that you have exceeded the max storage limit for your current plan. This can happen if you have too many files being saved on the project or if you are making lots of deployments and your deployment history is not being maintained. If you are not saving files to Firebase then it will be the latter, go to the hosting tab and click on Usage.
The deployment history and rollbacks will take up all your storage space, so make sure you manage them to just what you need. It will take a while for the storage to update once they are deleted. It can take up to 4 hours but once it is done then you can get back to deploying your code. Please be aware that once these rollback deployments are deleted, they cannot be recovered and also that you will not be able to delete them in bulk. So if you have never deleted any, then you are going to have to do quite a lot of single file deletions to stay on the free plan.
Realistically you need either take it upon yourself to maintain the storage or just pay for the extra storage. Every application is different but ultimately you will likely scale up into the paid plans eventually. The paid plans are good value for money but just make sure you are doing everything you can to keep your application well optimised so it is not wasting resources and money.