Kong / Kong/insomnia

Fail to render cc when trying to select a json path from the history

Open
#5,846 4 comments 1 reaction 0 assignees View on GitHub
B-bug S-unverified
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

### Actual Behavior

This is happening with only one of my queries.

In the response section, when I click on the little clock icon. I get the list of last jsonpath queries used :

![image](https://user-images.githubusercontent.com/34516402/225089191-c5076b80-1b14-405b-af34-cc08dd7876e2.png)

As soon as I hover any of them with my mouse (without clicking), I get the following Application Error that pops up:

```
Error: Failed to execute 'querySelector' on 'Element': '[data-key="$.*.catalog[?(@.type="network")].endpoints[?(@.interface="public" && @.region_id="UK")]"]' is not a valid selector.
at file:///C:/Users//AppData/Local/insomnia/app-2023.1.0/resources/app.asar/index.6916a4f6.js:80:112908
at Vx (file:///C:/Users//AppData/Local/insomnia/app-2023.1.0/resources/app.asar/index.6916a4f6.js:67:24458)
at Vp (file:///C:/Users//AppData/Local/insomnia/app-2023.1.0/resources/app.asar/index.6916a4f6.js:67:42799)
at file:///C:/Users//AppData/Local/insomnia/app-2023.1.0/resources/app.asar/index.6916a4f6.js:67:41058
at D (file:///C:/Users//AppData/Local/insomnia/app-2023.1.0/resources/app.asar/index.6916a4f6.js:52:1648)
at Immediate.ue [as _onImmediate] (file:///C:/Users//AppData/Local/insomnia/app-2023.1.0/resources/app.asar/index.6916a4f6.js:52:2022)
at process.processImmediate (node:internal/timers:466:21)
```

### Reproduction Steps

I don't know a way currently to reproduce this systematically. As stated, it only happens with one of my queries right now.

### Is there an existing issue for this?

- [X] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.

### Additional Information

Hovering the items in the list should highlight the items and clicking on one should promote it as the current jsonpath query.

### Insomnia Version

2023.1.0

### What operating system are you using?

Windows

### Operating System Version

Windows 11 Family version 21H2

### Installation method

Chocolatey

### Last Known Working Insomnia version

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in the response section's JSONPath history, reproducing the hover over the saved query shown in the report, and trace the querySelector failure reported in index.6916a4f6.js. Done means hovering history items highlights them without an application error and clicking one promotes it as the current JSONPath query.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.