Open Privat33r-dev opened 8 months ago
Can you provide a test case for reproducing it?
Can you provide a test case for reproducing it?
I can't provide even exact steps to reproduce it, but I sent a retrospection json to your e-mail that consistently causes the error. Later, if I find time for this and if it's necessary, I can try to debug it to find the exact cause of the issue. Likely it's caused by some code during parsing stage.
Anyway, I provided the fix in #388, just forgot to point to this issue :)
UPD: quick search gave the root cause of the issue here https://github.com/graphql-kit/graphql-voyager/blob/ae284138c519516e02f30d9edeac7ccc15692930/src/graph/graphviz-worker.ts#L123
Basically it starts with a warning:
Can not compress string: ReferenceError: CompressionStream is not defined
So the problem has somewhat deeper roots, but the white screen is caused by the faulty error handling (because of charset=utf8
). Maybe fixing it will help with some other issues as well.
but I sent a retrospection json to your e-mail that consistently causes the error.
@Privat33r-dev can you please sent it to my email: ivan.goncharov.ua@gmail.com
Because I can't reproduce your issue even if I do globalThis. CompressionStream = undefined
to imitate browser that doesn't support this API.
Also please specify browser and version you can reproduce it on?
The error states:
I believe that it's easy to fix (e.g. by providing support for specific encodings using FileReader (since blob's text() presume UTF8). The provided MIME is RFC-2045 compatible (see section 5.1.), in fact even some examples in the RFC include charset.