Exceptions on Safari & Firefox
This bit of code is exploding:
https://github.com/edgedb/edgedb-studio/blob/a73e7b1d8050ccbd83f874fef6e54b2a74c172db/shared/studio/tabs/schema/state/textView.ts#L246-L248
The value of schemaData.scalars.values() is 2k lines so put it in a gist:
https://gist.github.com/sbdchd/1b1f50612d6e66f49e56502850739c76
but here's a screenshot
and the errors:
[mobx] uncaught error in 'Reaction[Autorun]'
TypeError: undefined is not an object (evaluating 'e.name.localeCompare')
Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'e.name.localeCompare')
edit: seems the data is getting corrupted or something
[...schemaData.scalars.values()].map(x => x.schemaType)
returns a mix of "Scalar" and undefined
edit2: there should also probably be some ErrorBoundarys sprinkled around to avoid:
edit3: trying on Firefox I get:
https://github.com/edgedb/edgedb-studio/blob/a73e7b1d8050ccbd83f874fef6e54b2a74c172db/shared/studio/tabs/schema/textView.tsx#L343-L343
Thanks, we'll take a look!
@sbdchd Can you post your schema? Also did this error happen the first time you used the UI, or did the error happen after a page reload?
I don't think it initially happened. I'm pretty sure I navigated between a couple projects and then I tried to type the REPL and I couldn't type.
Then I looked in the console and saw an error. Later when navigating more stuff started breaking more as in white screen.
I have 3 projects setup in the UI, one is the example the default schema, and a couple empty projects with:
module default{};
for the sdl
edit:
I cleared the IndexDB and the bug persists, also noticed a different error in the console:
Fetch API cannot load http://localhost:10700/db/_example due to access control checks.
maybe related to https://stackoverflow.com/questions/63141448/safari-fetch-api-cannot-load-due-to-access-control-checks-after-reload 🤷🏻
edit2: that fetch error seems spurious, can't get it to reproduce.