Global error when clicking on photo in Gallery Tutorial

Following the new create-t3-app tutorial for a gallery app and locally everything seems to be working (click on image, get modal. Refresh page, get only image). In production, when I click the image, I get the global error page 500. Is that because of this change I made to get the <TopNav /> to render with and without being signed in?
<TopNav />
<SignedIn>
{children}
{modal}
<div id="modal-root"></div>
</SignedIn>
<SignedOut />
<TopNav />
<SignedIn>
{children}
{modal}
<div id="modal-root"></div>
</SignedIn>
<SignedOut />
Here is the repo if you need more context or you can let me know what I need to clarify. https://github.com/mchisolm0/gallery/tree/trunk
GitHub
GitHub - mchisolm0/gallery
Contribute to mchisolm0/gallery development by creating an account on GitHub.
1 Reply
mchisolm0
mchisolm06mo ago
Okay, rewatching a few parts of the video, I think I found it. I wrapped the children and modal in the <SignedIn> component in the layout. Instead, I need to leave them and in the page.tsx file (the child that needs to check for auth( )), I should wrap its content in the <SignedIn> component. Feel free to correct me, but I'm about to go try that change. Okay...so that doesn't seem to have been the problem. Still seeing it in production and not locally. For context, there error I am seeing on Sentry is e is not iterable. So...I pushed some updates to production (basically just ignoring the errors and continuing with the tutorial), and now I'm no longer seeing the error. I did update some packages, so its possible that was the issue. When I finish the tutorial, I'll try to get Theo's repo running locally and see if I get the same problem I saw.
Want results from more Discord servers?
Add your server