Skip to content

Commit

Permalink
DEPLOYED AGAIN
Browse files Browse the repository at this point in the history
  • Loading branch information
CJohnDesign committed Jan 7, 2025
1 parent 038e301 commit 6808abb
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 17 deletions.
78 changes: 78 additions & 0 deletions firebase-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[debug] [2025-01-07T23:39:50.548Z] ----------------------------------------------------------------------
[debug] [2025-01-07T23:39:50.549Z] Command: /usr/local/bin/node /usr/local/bin/firebase deploy
[debug] [2025-01-07T23:39:50.549Z] CLI Version: 13.29.1
[debug] [2025-01-07T23:39:50.549Z] Platform: darwin
[debug] [2025-01-07T23:39:50.549Z] Node Version: v20.18.0
[debug] [2025-01-07T23:39:50.549Z] Time: Tue Jan 07 2025 18:39:50 GMT-0500 (Eastern Standard Time)
[debug] [2025-01-07T23:39:50.550Z] ----------------------------------------------------------------------
[debug]
[debug] [2025-01-07T23:39:50.582Z] Object ".emulators.hosting" in "firebase.json" has unknown property: {"additionalProperty":"source"}
[debug] [2025-01-07T23:39:50.584Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2025-01-07T23:39:50.584Z] > authorizing via signed-in user ([email protected])
[debug] [2025-01-07T23:39:50.584Z] [iam] checking project gouda-company for permissions ["cloudconfig.configs.get","cloudconfig.configs.update","cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","cloudsql.databases.create","cloudsql.databases.update","cloudsql.instances.connect","cloudsql.instances.create","cloudsql.instances.get","cloudsql.instances.list","cloudsql.instances.update","cloudsql.users.create","datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebasedataconnect.connectors.create","firebasedataconnect.connectors.delete","firebasedataconnect.connectors.list","firebasedataconnect.connectors.update","firebasedataconnect.operations.get","firebasedataconnect.schemas.create","firebasedataconnect.schemas.delete","firebasedataconnect.schemas.list","firebasedataconnect.schemas.update","firebasedataconnect.services.create","firebasedataconnect.services.delete","firebasedataconnect.services.list","firebasedataconnect.services.update","firebasehosting.sites.update","firebaserules.releases.create","firebaserules.releases.update","firebaserules.rulesets.create",null]
[debug] [2025-01-07T23:39:50.584Z] Checked if tokens are valid: false, expires at: 1736292790039
[debug] [2025-01-07T23:39:50.584Z] Checked if tokens are valid: false, expires at: 1736292790039
[debug] [2025-01-07T23:39:50.584Z] > refreshing access token with scopes: []
[debug] [2025-01-07T23:39:50.585Z] >>> [apiv2][query] POST https://www.googleapis.com/oauth2/v3/token [none]
[debug] [2025-01-07T23:39:50.585Z] >>> [apiv2][body] POST https://www.googleapis.com/oauth2/v3/token [omitted]
[debug] [2025-01-07T23:39:50.740Z] <<< [apiv2][status] POST https://www.googleapis.com/oauth2/v3/token 200
[debug] [2025-01-07T23:39:50.740Z] <<< [apiv2][body] POST https://www.googleapis.com/oauth2/v3/token [omitted]
[debug] [2025-01-07T23:39:50.753Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects/gouda-company:testIamPermissions [none]
[debug] [2025-01-07T23:39:50.753Z] >>> [apiv2][(partial)header] POST https://cloudresourcemanager.googleapis.com/v1/projects/gouda-company:testIamPermissions x-goog-quota-user=projects/gouda-company
[debug] [2025-01-07T23:39:50.753Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/gouda-company:testIamPermissions {"permissions":["cloudconfig.configs.get","cloudconfig.configs.update","cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","cloudsql.databases.create","cloudsql.databases.update","cloudsql.instances.connect","cloudsql.instances.create","cloudsql.instances.get","cloudsql.instances.list","cloudsql.instances.update","cloudsql.users.create","datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebasedataconnect.connectors.create","firebasedataconnect.connectors.delete","firebasedataconnect.connectors.list","firebasedataconnect.connectors.update","firebasedataconnect.operations.get","firebasedataconnect.schemas.create","firebasedataconnect.schemas.delete","firebasedataconnect.schemas.list","firebasedataconnect.schemas.update","firebasedataconnect.services.create","firebasedataconnect.services.delete","firebasedataconnect.services.list","firebasedataconnect.services.update","firebasehosting.sites.update","firebaserules.releases.create","firebaserules.releases.update","firebaserules.rulesets.create",null]}
[debug] [2025-01-07T23:39:50.985Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects/gouda-company:testIamPermissions 200
[debug] [2025-01-07T23:39:50.985Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/gouda-company:testIamPermissions {"permissions":["cloudconfig.configs.get","cloudconfig.configs.update","cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","cloudsql.databases.create","cloudsql.databases.update","cloudsql.instances.connect","cloudsql.instances.create","cloudsql.instances.get","cloudsql.instances.list","cloudsql.instances.update","cloudsql.users.create","datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get","firebasedataconnect.connectors.create","firebasedataconnect.connectors.delete","firebasedataconnect.connectors.list","firebasedataconnect.connectors.update","firebasedataconnect.operations.get","firebasedataconnect.schemas.create","firebasedataconnect.schemas.delete","firebasedataconnect.schemas.list","firebasedataconnect.schemas.update","firebasedataconnect.services.create","firebasedataconnect.services.delete","firebasedataconnect.services.list","firebasedataconnect.services.update","firebasehosting.sites.update","firebaserules.releases.create","firebaserules.releases.update","firebaserules.rulesets.create"]}
[debug] [2025-01-07T23:39:50.986Z] [iam] error while checking permissions, command may fail: Authorization failed. This account is missing the following required permissions on project gouda-company:


[debug] [2025-01-07T23:39:50.986Z] Checked if tokens are valid: true, expires at: 1736296789740
[debug] [2025-01-07T23:39:50.986Z] Checked if tokens are valid: true, expires at: 1736296789740
[debug] [2025-01-07T23:39:50.987Z] >>> [apiv2][query] POST https://iam.googleapis.com/v1/projects/gouda-company/serviceAccounts/[email protected]:testIamPermissions [none]
[debug] [2025-01-07T23:39:50.987Z] >>> [apiv2][body] POST https://iam.googleapis.com/v1/projects/gouda-company/serviceAccounts/[email protected]:testIamPermissions {"permissions":["iam.serviceAccounts.actAs"]}
[debug] [2025-01-07T23:39:51.202Z] <<< [apiv2][status] POST https://iam.googleapis.com/v1/projects/gouda-company/serviceAccounts/[email protected]:testIamPermissions 200
[debug] [2025-01-07T23:39:51.202Z] <<< [apiv2][body] POST https://iam.googleapis.com/v1/projects/gouda-company/serviceAccounts/[email protected]:testIamPermissions {"permissions":["iam.serviceAccounts.actAs"]}
[debug] [2025-01-07T23:39:51.203Z] Checked if tokens are valid: true, expires at: 1736296789740
[debug] [2025-01-07T23:39:51.203Z] Checked if tokens are valid: true, expires at: 1736296789740
[debug] [2025-01-07T23:39:51.203Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/gouda-company [none]
[debug] [2025-01-07T23:39:51.525Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/gouda-company 200
[debug] [2025-01-07T23:39:51.526Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/gouda-company {"projectId":"gouda-company","projectNumber":"694200444660","displayName":"Gouda","name":"projects/gouda-company","resources":{"hostingSite":"gouda-company","storageBucket":"gouda-company.appspot.com","locationId":"us-central"},"state":"ACTIVE","etag":"1_08671e98-1a5e-46a0-b389-4489369e40e2"}
[debug] [2025-01-07T23:39:52.389Z] defaultcredentials: writing to file /Users/cjohndesign/.config/firebase/cjohndesign_gmail_com_application_default_credentials.json
[debug] [2025-01-07T23:39:52.390Z] Checked if tokens are valid: true, expires at: 1736296789740
[debug] [2025-01-07T23:39:52.390Z] Checked if tokens are valid: true, expires at: 1736296789740
[debug] [2025-01-07T23:39:52.390Z] >>> [apiv2][query] GET https://firebasehosting.googleapis.com/v1beta1/projects/gouda-company/sites pageToken=&pageSize=10
[debug] [2025-01-07T23:39:52.836Z] <<< [apiv2][status] GET https://firebasehosting.googleapis.com/v1beta1/projects/gouda-company/sites 200
[debug] [2025-01-07T23:39:52.836Z] <<< [apiv2][body] GET https://firebasehosting.googleapis.com/v1beta1/projects/gouda-company/sites {"sites":[{"name":"projects/gouda-company/sites/gouda-company","defaultUrl":"https://gouda-company.web.app","appId":"1:694200444660:web:f9ef01bfda90fc63a6a0a1","type":"DEFAULT_SITE"}]}
[debug] [2025-01-07T23:39:52.837Z] Checked if tokens are valid: true, expires at: 1736296789740
[debug] [2025-01-07T23:39:52.837Z] Checked if tokens are valid: true, expires at: 1736296789740
[debug] [2025-01-07T23:39:52.837Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/-/webApps/1:694200444660:web:f9ef01bfda90fc63a6a0a1/config [none]
[debug] [2025-01-07T23:39:53.407Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/-/webApps/1:694200444660:web:f9ef01bfda90fc63a6a0a1/config 200
[debug] [2025-01-07T23:39:53.407Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/-/webApps/1:694200444660:web:f9ef01bfda90fc63a6a0a1/config {"projectId":"gouda-company","appId":"1:694200444660:web:f9ef01bfda90fc63a6a0a1","storageBucket":"gouda-company.appspot.com","locationId":"us-central","apiKey":"AIzaSyBESSIfnnHcChqLnEPGGRdYuQBAx_kGTjs","authDomain":"gouda-company.firebaseapp.com","messagingSenderId":"694200444660","measurementId":"G-1L66RSFLQ7"}
[info]
Thank you for trying our early preview of Next.js support on Firebase Hosting.
During the preview, support is best-effort and breaking changes can be expected. Proceed with caution.
The integration is known to work with Next.js version 12 - 15.0. You may encounter errors.

Documentation: https://firebase.google.com/docs/hosting/frameworks/nextjs
File a bug: https://github.com/firebase/firebase-tools/issues/new?template=bug_report.md
Submit a feature request: https://github.com/firebase/firebase-tools/issues/new?template=feature_request.md

We'd love to learn from you. Express your interest in helping us shape the future of Firebase Hosting: https://goo.gle/41enW5X

[debug] [2025-01-07T23:39:55.169Z] Checked if tokens are valid: true, expires at: 1736296789740
[debug] [2025-01-07T23:39:55.169Z] Checked if tokens are valid: true, expires at: 1736296789740
[debug] [2025-01-07T23:39:55.169Z] >>> [apiv2][query] GET https://firebasehosting.googleapis.com/v1beta1/projects/gouda-company/sites/gouda-company [none]
[debug] [2025-01-07T23:39:55.278Z] <<< [apiv2][status] GET https://firebasehosting.googleapis.com/v1beta1/projects/gouda-company/sites/gouda-company 200
[debug] [2025-01-07T23:39:55.278Z] <<< [apiv2][body] GET https://firebasehosting.googleapis.com/v1beta1/projects/gouda-company/sites/gouda-company {"name":"projects/gouda-company/sites/gouda-company","defaultUrl":"https://gouda-company.web.app","appId":"1:694200444660:web:f9ef01bfda90fc63a6a0a1","type":"DEFAULT_SITE"}
[info] ▲ Next.js 15.1.3

[info] - Environments: .env.local, .env.production


[info] Creating an optimized production build ...

[info] ✓ Compiled successfully

[info] Skipping validation of types

[info] Linting ...

12 changes: 9 additions & 3 deletions src/app/(auth)/join/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,18 @@ export default function JoinPage() {
<Alert className="border-green-500 bg-green-50 dark:bg-green-900/10">
<AlertDescription className="text-foreground">
<div className="text-lg mb-4">
Check your email!<br/>There&apos;s a link to get in!
Check your email!<br/><strong>There&apos;s a link to get in!</strong>
</div>
<div className="hidden md:block">
<div className="text-sm font-bold mb-2">Open your email:</div>
<div className="text-sm mb-2">Open your email:</div>
<div className="flex gap-2 justify-center flex-wrap">
{EMAIL_LINKS.desktop.map((link) => (
<Button
key={link.name}
variant={emailService === link.service ? 'default' : 'outline'}
className={emailService === link.service
? 'bg-primary hover:bg-primary/90 text-secondary hover:text-secondary border-primary'
: 'border-secondary text-secondary hover:border-primary hover:text-primary'}
asChild
>
<a
Expand All @@ -173,6 +176,9 @@ export default function JoinPage() {
<Button
key={link.name}
variant={platform === link.platform ? 'default' : 'outline'}
className={platform === link.platform
? 'bg-primary hover:bg-primary/90 text-secondary hover:text-secondary border-primary'
: 'border-secondary text-secondary hover:border-primary hover:text-primary'}
asChild
>
<a href={link.url}>
Expand Down Expand Up @@ -203,7 +209,7 @@ export default function JoinPage() {

<Button
type="submit"
className="w-full h-[48px] text-[21px] leading-[32px] font-bold bg-primary hover:bg-primary/90 text-primary-foreground"
className="w-full h-[48px] text-[21px] leading-[32px] font-bold bg-primary hover:bg-primary/90 text-secondary hover:text-secondary"
>
Join Now
</Button>
Expand Down
4 changes: 2 additions & 2 deletions src/app/(auth)/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ export default function LoginPage() {
<Alert className="border-green-500 bg-green-50 dark:bg-green-900/10">
<AlertDescription className="text-foreground">
<div className="text-lg mb-4">
Check your email!<br/>There&apos;s a link to get in!
Check your email!<br/><strong>There&apos;s a link to get in!</strong>
</div>
<div className="hidden md:block">
<div className="text-sm font-bold mb-2">Open your email:</div>
<div className="text-sm mb-2">Open your email:</div>
<div className="flex gap-2 justify-center flex-wrap">
{EMAIL_LINKS.desktop.map((link) => (
<Button
Expand Down
7 changes: 3 additions & 4 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ const montserrat = Montserrat({
const PUBLIC_ROUTES = ['/', '/login', '/join']

function RootLayoutInner({ children }: { children: React.ReactNode }) {
const { profile, user } = useUserProfile()
const { profile } = useUserProfile()
const pathname = usePathname()
const isPublicRoute = PUBLIC_ROUTES.includes(pathname || '')

// Default to light for public routes when not logged in
// Default to dark for logged in users if isDarkMode is not set
const isDark = isPublicRoute && !user ? false : (profile?.isDarkMode ?? true)
// Always use light theme for public routes
const isDark = isPublicRoute ? false : (profile?.isDarkMode ?? true)

return (
<html lang="en" suppressHydrationWarning className={`${montserrat.variable} ${isDark ? 'dark' : ''}`}>
Expand Down
7 changes: 2 additions & 5 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Link from 'next/link'
import { useEffect, useState } from 'react'
import { useUserProfile } from '@/contexts/UserProfileContext'
import { useRouter } from 'next/navigation'
import { useTheme } from 'next-themes'
import { Button } from '@/components/ui/button'
import { Loader2 } from 'lucide-react'

Expand All @@ -17,13 +16,11 @@ export default function Home() {
const { user, isLoading } = useUserProfile()
const router = useRouter()
const [mounted, setMounted] = useState(false)
const { setTheme } = useTheme()

// Handle mounting and force light theme
// Handle mounting
useEffect(() => {
setMounted(true)
setTheme('light')
}, [setTheme])
}, [])

// Only redirect to songbook if user is logged in
useEffect(() => {
Expand Down
6 changes: 5 additions & 1 deletion src/components/playlists/edit-playlist-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,11 @@ export function EditPlaylistDialog({ playlistId, userId, existingSongs }: EditPl
size="sm"
variant="ghost"
className="opacity-0 group-hover:opacity-100 transition-opacity"
onClick={() => handleRemoveSong(song)}
onClick={(e) => {
e.preventDefault()
e.stopPropagation()
handleRemoveSong(song)
}}
disabled={loadingStates[song.id]}
>
{loadingStates[song.id] ? (
Expand Down
4 changes: 2 additions & 2 deletions src/contexts/UserProfileContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ export function UserProfileProvider({ children }: { children: React.ReactNode })
data.email = user.email || '' // Use Firebase email if profile email is missing
}

// Ensure isDarkMode is false by default
data.isDarkMode = false
// Ensure isDarkMode is false for public routes
data.isDarkMode = PUBLIC_ROUTES.includes(pathname || '') ? false : (data.isDarkMode ?? false)
setProfile(data)

// Set up real-time listener for profile updates
Expand Down

0 comments on commit 6808abb

Please sign in to comment.