when searching for a repository in the homepage, sometimes I get a result and the other times the page goes full white.
here's the error that's triggering the white page:
react-dom.production.min.js:189 TypeError: Cannot read properties of null (reading 'length')
at bK (Hero.tsx:117:26)
at Lf (react-dom.production.min.js:167:137)
at Kl (react-dom.production.min.js:197:258)
at im (react-dom.production.min.js:292:88)
at am (react-dom.production.min.js:280:389)
at s0 (react-dom.production.min.js:280:320)
at ki (react-dom.production.min.js:280:180)
at iu (react-dom.production.min.js:271:88)
at tm (react-dom.production.min.js:268:429)
at z (scheduler.production.min.js:13:203)
Yl @ react-dom.production.min.js:189
Fy.r.callback @ react-dom.production.min.js:189
wp @ react-dom.production.min.js:144
Dp @ react-dom.production.min.js:262
em @ react-dom.production.min.js:260
n0 @ react-dom.production.min.js:259
c0 @ react-dom.production.min.js:283
kn @ react-dom.production.min.js:281
tm @ react-dom.production.min.js:269
z @ scheduler.production.min.js:13
B @ scheduler.production.min.js:14
when I investigated further, turns out the call going to supabase from src/components/Hero.tsx, triggering fetchRecommendations from src/lib/supabase.ts is timing out and thus returning null, and as there's no null check in src/components/Hero.tsx, results are set to null, which triggers an error a few lines later when results.length is called, which causes the page to go white
a temporary solution would be to implement a null handling and a retry mechanism on the supabase calls.
but as I went further and set the Network property to Slow 3G in the Performance tab in the developer console, I had all my requests failing. setting it to Fast 3G makes the first call work, but the second one failes. so I believe a more permanent solution would be to reconfigure the timeout
Describe the bug
when searching for a repository in the homepage, sometimes I get a result and the other times the page goes full white.
here's the error that's triggering the white page:
when I investigated further, turns out the call going to supabase from
src/components/Hero.tsx
, triggeringfetchRecommendations
fromsrc/lib/supabase.ts
is timing out and thus returningnull
, and as there's no null check insrc/components/Hero.tsx
,results
are set to null, which triggers an error a few lines later whenresults.length
is called, which causes the page to go whitea temporary solution would be to implement a null handling and a retry mechanism on the supabase calls.
but as I went further and set the
Network
property toSlow 3G
in the Performance tab in the developer console, I had all my requests failing. setting it toFast 3G
makes the first call work, but the second one failes. so I believe a more permanent solution would be to reconfigure the timeoutSteps to reproduce
Reproduce 1:
Slow 3G
rust
Reproduce 2:
Fast 3G
rust
dart
Browsers
Other (add additional context)
Additional context (Is this in dev or production?)
production, using the Arc browser (arc.net)
Code of Conduct
Contributing Docs