Closed Dreamescaper closed 3 years ago
Oh I wonder if this is related to dark/light mode? That's probably a bug in the default error screen.
Or, it kind of looks like you've entered The Matrix! (But with blue text instead of green.)
No, not related to dark/light mode. Under some conditions it's ok, sometimes like that with same device settings.
Hmm that's quite odd then. I think for that screen it might not set all the foreground/background colors and if you're in dark/light mode that can create bad combinations (e.g. black on black). That's usually the problem when I see such problems.
This is the error UI:
Looking at it now, I don't see any colors set at all, so this is certainly odd. But maybe setting explicit colors is best to avoid any risk of inheriting some bad color combinations from something.
Sometimes I get the opposite - simple white screen, nothing else.
I'm guessing it's doing black on black and white on white. I think setting explicit colors is the right approach.
It would be nice to be theme-aware using a little helper like this:
https://github.com/Eilon/Rezipe/blob/master/src/Rezipe/RezipeBaseComponent.cs#L29-L32
OK, I see that I get simple white screen when my Shell fails to create, and I had no such line in my App:
MainPage = new ContentPage();
(didn't think that it mattered).
But adding this line fixed this particular issue - not the black screen though, so I keep digging.
Ah yes you need to set some initial value for MainPage because all the Blazor stuff loads async. So you could have just an empty ContentPage
or you could even put a splash screen there. The Blazor stuff loads very quickly (depending on the app) so there's usually not much to do aside from setting some default value.
Yeah, I was just surprised that that line would affect error screen. I mean, everything else works fine for me without that line.
Yeah that's certainly bizarre.
Ok, so I get this black screen when I attempt to render EditForm component (the one for Web :) ). It obviously wasn't able to render that (fails with KeyNotFoundException), and attempts to show Error page. I don't know why it fails to display it though.
I have seen such behavior under other conditions, but can't recall anything right now.
However I checked that it does help to BackgroundColor to white explicitly.
Thank you for sending the PR, it is now merged!
In most cases for me when exception happens I simple see fully black screen. I see some text when try to scroll the page, but that doesn't help. That makes debugging hell of a lot harder, considering that exceptions are not logged anywhere else!
I'm trying to find concise repro case for this behavior.
Details
![Mryhbqn1HZ](https://user-images.githubusercontent.com/17177729/98969555-9fc69800-2517-11eb-8e55-dc824d10a0ba.gif)