Skip to content

Cannot use graphiql at all when having this error: 'length' of undefined at getToken #356

@codTango

Description

@codTango

I'm actually not sure if I should post this here or for express-graphql as I'm using express-graphql, but since this error is coming from graphiql.min.js, I'm posting this issue here.

Situation

Occasionally, the graphiql will get the below error in console, and then Documentation Explorer will keep spinning and graphiql will become unusable. Most cases I found command + c/v to copy and paste in the QUERY VARIABLES panel will cause the problem. After it happens, I won't be able to use graphiql for a while, doesn't work even hard refresh the page. Then it will just work again after a long time.

Uncaught TypeError: Cannot read property 'length' of undefined
    at getToken (graphiql.min.js:4)
    at Object.token (graphiql.min.js:4)
    at nt (graphiql.min.js:7)
    at lt (graphiql.min.js:7)
    at Qe (graphiql.min.js:7)
    at Je (graphiql.min.js:7)
    at ht (graphiql.min.js:7)
    at At (graphiql.min.js:7)
    at Pt (graphiql.min.js:7)
    at Tn (graphiql.min.js:8)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions