fix: image generation 503 when Firebase Admin is not configured - #306
Open
driver727-pixel with Copilot wants to merge 1 commit into
Open
fix: image generation 503 when Firebase Admin is not configured#306driver727-pixel with Copilot wants to merge 1 commit into
driver727-pixel with Copilot wants to merge 1 commit into
Conversation
…onfigured Agent-Logs-Url: https://github.com/driver727-pixel/Punch-Skater/sessions/a38ed908-ed7e-419b-b395-4a78b83df3ee Co-authored-by: driver727-pixel <269849721+driver727-pixel@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
driver727-pixel
April 20, 2026 17:27
View session
driver727-pixel
marked this pull request as ready for review
April 20, 2026 17:29
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All four image routes unconditionally called
authenticateFirebaseUser, which throws503whenadminAuthisnull(Firebase Admin SDK unconfigured). This made character/board/background-removal image generation entirely unavailable in any deployment without Firebase Admin credentials, even whenFAL_KEYis set.Changes
server/routes/images.js— AcceptadminAuthas a parameter; guard auth calls behindif (adminAuth). For/api/generate-board-imageand/api/board-image-status(which usecaller.uidfor in-memory job tracking), fall back to{ uid: 'anonymous' }whenadminAuthis absent.server/index.js— PassadminAuthintoregisterImageRoutes.Follows the same graceful-degradation pattern already used in the admin and battle route registrations (both guard their auth-dependent paths with
if (!adminAuth)).