Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug: _index.tsx seems not to pass valid dates into EventDetails.tsx #123

Open
3 tasks done
jvoccia opened this issue Nov 1, 2024 · 4 comments
Open
3 tasks done
Labels
status: accepting prs type: bug Something isn't working

Comments

@jvoccia
Copy link
Contributor

jvoccia commented Nov 1, 2024

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Expected

The last 2 events - the November and December events seem to have a problem. The "date" is a string in JSON - we convert this string into a Date object and sort on it (using a Date sort).

However, for some reason when passed to EventDetails - the date object isn't valid - and we get a runtime error.

Weirdly the event page that uses this same component + same JSON does not seem to be affected.

I also have not been able to reproduce this outside of the GitHub Action - making it very hard to debug.

I added a displayDate string as a workaround, and just catch the error and use displayDate if date does not work. But this is very hacky.

Actual

Would expect a date to be passed to eventDetails - and eventDetails to be able to parse and show said date.

Additional Info

When this fails it was bringing down the website :(

@jvoccia jvoccia added type: bug Something isn't working status: accepting prs labels Nov 1, 2024
@iamtimleonard
Copy link
Contributor

Was there any kind of helpful error message when this was happening?

@jvoccia
Copy link
Contributor Author

jvoccia commented Nov 20, 2024

Was there any kind of helpful error message when this was happening?

Yes it was:

RangeError: Invalid time value
   at EventDetails (/home/runner/work/philly-js-club-website/philly-js-club-website/app/components/EventDetails.tsx:29:50)

There is more information here: #121

An example of a failure at the time was:
https://github.com/philly-js-club/philly-js-club-website/actions/runs/11306036631/job/31446178167
Check the: "Start Server and Mirror with WGET" step - I have yet to fail on a mirroring failure either. I probably need to spend some time writing up more issues.

One interesting note is Nov 14 is after the change to EST

@iamtimleonard
Copy link
Contributor

Sounds thorny as heck. I'll mess around with it to see if I can replicate it on my machine, but I doubt I'll get any farther than you.

@iamtimleonard
Copy link
Contributor

I have yet to fail on a mirroring failure either

You mean the action should've stopped and failed instead of continuing on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants