Query UI Monitor bug?

Enterprise 6.5

I am running a query in the monitor and getting results. But when running explain or clicking for the plan or plan text I’m getting the following error:

Internal error generating query plan: TypeError: Cannot read property 'properties' of undefined

This sounds Iike JS issue. And since the query is returning results, I have to assume the engine is in fact able to generate a plan.

All other queries that I’ve ever tried and that I’m trying now work fine.

I really wish I knew how to better help you, I’ve located the piece in my query that brings about this failure, but I cannot reproduce it, abstracting it into a general form that will be helpful for you.

I am hoping that you’ve seen this error message before and can give me some guidance as to how I can help you help me :slight_smile:

Try with different browser . cc @eben

Indeed.

I get the error on Chrome: Version 73.0.3683.103 (Official Build) (64-bit)

But do not on Firefox 77.0.1

I’m on a Ubuntu system.

Thanks @naftali. I will reproduce and log a bug or you are welcome to log it yourself here https://issues.couchbase.com/

Hi @naftali, that error can occur when a query explain is being analyzed. Is there a more detailed error in your browser’s javascript console?

Also, could you post the ‘EXPLAIN’ plan for your query, so I could run it through the analyzer and see if I can reproduce the error?

@eben
The console error is no more informative than what I posted: “Exception analyzing query plan: TypeError: Cannot read property ‘properties’ of undefined”

I’d have to get an okay from security to share the explain, since it’s a production query. I can make the request but would first need a non public way to get it to you.

it’s failing in this code block:

            catch (exception) {
              console.log("Exception analyzing query plan: " + exception);
              newResult.explainResult = "Internal error generating query plan: " + exception;
              newResult.explainResultText = "Internal error generating query plan: " + exception;
              newResult.status = "explain error";
            }

Hi @naftali, I’m a bit stumped, since the ‘try’ block associated with that ‘catch’ doesn’t contain any references to a field called ‘properties’. Since your explain plan is potentially sensitive, is there any chance you use the browser’s debugger to step through the ‘try’ block and tell me on which line the error is originating?

heh, @eben

Because I gain a lot from these forums and wanted to take the opportunity to give back, I thought I’d give it a go.

So I fired up the query monitor today located the explain error queries, but the error no longer reproduces for this query.

What I can say is that the query plan had to have changed pretty drastically, because I had added an index yesterday. Whereas before there was no covering index now there is.

Should I come across this again, I’ll be sure to debug that code block

Thank you @naftali. I’m glad you aren’t seeing the problem, and I appreciate whatever details you will provide if the problem reoccurs.