Astro - Internal Server Error
[REQUIRED] Environment info
firebase-tools: 13.0.3
Platform: WIndows
[REQUIRED] Test case
I was able to get a blank system to load, but something is failing out with an astro site that I had exposed through cloud run using docker. When I tried to convert it using the settings from the working site, it allowed the load and then failed as an internal server error.
[REQUIRED] Steps to reproduce
Converted Astro site setup for docker to go right to firebase... loads and then fails
[REQUIRED] Expected behavior
Website is available online message on upload = ...Website is visible online
[REQUIRED] Actual behavior
Internal Server Error
This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.
Hey @bkingsleyc, I’d like to ask a few things just to get a better understanding of this report as well as to make sure we’re on the same page:
- Are you deploying your Astro app as a Docker container to Cloud Run?
- Could you elaborate what you mean by “Converted Astro site setup for docker to go right to firebase.”?
- Could you share with us the
hostingsection of yourfirebase.jsonfile? - Are there any error logs from the Google Cloud console that you can share? This will help us understand what could’ve caused the error.
By any chance, could you share a minimal, reproducible sample that we can try deploying on our end?
Hey @aalej!
Sorry for the confusion.
Point 1. Are you deploying your Astro app as a Docker container to Cloud Run?
I am not. I was trying to say that I have another instance that currently works through firebase integrated with a astro docker image running on cloud run. That cloud run docker instance works without challenges through firebase. Sorry for the confusion and please let me know if any additional elaboration is helpful.
Point 2. Could you elaborate what you mean by “Converted Astro site setup for docker to go right to firebase.”?
Sorry same as Point 1. Converted astro site (setup for docker) to go ~ {deploy} right to firebase {hosting}
Point 3. Could you share with us the hosting section of your firebase.json file?
"hosting": { "target": "collaborativetechnologies", "source": ".", "ignore": [ "firebase.json", "/.*", "/node_modules/**" ],
Point 4. Are there any error logs from the Google Cloud console that you can share? This will help us understand what could’ve caused the error.
Yes. There was an error for
https://www.npmjs.com/package/@iconify/react a dev dependency that should get everything it needs at build time/upload to hosting and currently does not fail in my docker instance when it loads.
When I removed it that package from the code and redeployed it the site to hosting, it did load into firebase without the internal server error.
So the problem seems to be the server looking for this package in the production instance. Additionally my research seemed to imply this is more of a dev based node module and should be loaded in to production.
Point 5. minimal, reproducible sample
Let me know if you need one for the issue above with the dev package dependency above or the image issue below
Point 6. I am still getting errors with the images which are not loading.
Am I allowed to use this issue or would you like me to create another? The link on the site just shows as the firebase hosting url and I do see issues in the log. The images that are not working are located in the assets/images folder vs the public folder (which seems to load fine) and all images load appropriately in the docker version.
I really appreciate the quick responses. Please just let me know if there is anything else you need.
bkingsleyc
Did you find a way to fix this ? Facing the same issue here :(
@bkingsleyc can you please provide a minimal, reproducible example so I can investigate the issue?
@leoortizz minimum steps include:
- Create a new astro project
- add needed firebase files
- add folder under source named assets
- add an image to the folder
- Change index.astro to include the imported image component referencing the imported image
- Deploy to firebase
index.astro
import { Image } from 'astro:assets'; import pic from '../assets/pic.png';
@BenjaOliva you can always just have the images live in the public folder and not use the assets to import from under the src folder.