Kong / Kong/insomnia

2022.3 and higher shows infinite loading on commit changes action.

Open
#4,905 8 comments 5 reactions 0 assignees View on GitHub
B-bug N-investigation S-verified
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

### Expected Behavior

When I initiate commit action
image
It should open list of files to be committed.

### Actual Behavior

It displays a modal with loading status but never displays committed files. It works on version 2022.2 but with version 2022.3 and higher, it doesn't work anymore.

When I open devtools it displays the following error
```
Uncaught (in promise) YAMLSyntaxError: All collection items must start at the same column
at Collection.parse (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/yaml/dist/parse-cst.js:331:24)
at /Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/yaml/dist/parse-cst.js:1605:29
at CollectionItem.parse (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/yaml/dist/parse-cst.js:92:19)
at /Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/yaml/dist/parse-cst.js:1586:25
at Collection.parse (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/yaml/dist/parse-cst.js:350:20)
at /Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/yaml/dist/parse-cst.js:1605:29
at Document.parseContents (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/yaml/dist/parse-cst.js:622:26)
at Document.parse (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/yaml/dist/parse-cst.js:685:19)
at Object.parse (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/yaml/dist/parse-cst.js:1723:18)
at parseDocument (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/yaml/dist/index.js:43:24)
at Object.parse (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/yaml/dist/index.js:55:15)
at g2.stat (index.016df4fc.js:161:5144)
at async FileSystem.lstat (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/isomorphic-git/index.cjs:4324:21)
at async Object.status (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/isomorphic-git/index.cjs:13077:19)
at async Bz._refresh (index.016df4fc.js:1896:12487)
at async Bz.show (index.016df4fc.js:1896:11977)
```
image

so i narrowed the issue to yaml parsing of following content

image

I prepared small repo with replicable case here

https://github.com/rostislav-simonik/insomnia-commit-issue

so you can execute by
`node index.js`

and it displays this error
```

YAMLParseError: Unexpected scalar at node end at line 26, column 6:

",\"variables\":{\"userAccountId\":\"{% response 'body',
'req_bfbe07ff4…
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

at Composer.onError (/Users/rostislav.simonik/Development/repositories/sandbox.insomnia-issue/node_modules/yaml/dist/compose/composer.js:69:34)
at Object.resolveEnd (/Users/rostislav.simonik/Development/repositories/sandbox.insomnia-issue/node_modules/yaml/dist/compose/resolve-end.js:31:21)
at Object.resolveFlowScalar (/Users/rostislav.simonik/Development/repositories/sandbox.insomnia-issue/node_modules/yaml/dist/compose/resolve-flow-scalar.js:35:27)
at Object.composeScalar (/Users/rostislav.simonik/Development/repositories/sandbox.insomnia-issue/node_modules/yaml/dist/compose/compose-scalar.js:11:29)
at composeNode (/Users/rostislav.simonik/Development/repositories/sandbox.insomnia-issue/node_modules/yaml/dist/compose/compose-node.js:24:34)
at Object.resolveBlockMap (/Users/rostislav.simonik/Development/repositories/sandbox.insomnia-issue/node_modules/yaml/dist/compose/resolve-block-map.js:79:19)
at Object.composeCollection (/Users/rostislav.simonik/Development/repositories/sandbox.insomnia-issue/node_modules/yaml/dist/compose/compose-collection.js:13:36)
at composeNode (/Users/rostislav.simonik/Development/repositories/sandbox.insomnia-issue/node_modules/yaml/dist/compose/compose-node.js:31:38)
at Object.resolveBlockMap (/Users/rostislav.simonik/Development/repositories/sandbox.insomnia-issue/node_modules/yaml/dist/compose/resolve-block-map.js:79:19)
at Object.composeCollection (/Users/rostislav.simonik/Development/repositories/sandbox.insomnia-issue/node_modules/yaml/dist/compose/compose-collection.js:13:36) {
code: 'UNEXPECTED_TOKEN',
pos: [ 1164, 1420 ],
linePos: [ { line: 26, col: 6 }, { line: 26, col: 262 } ]
}

```

### Reproduction Steps

_No response_

### 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

_No response_

### Insomnia Version

2022.3 and higher

### What operating system are you using?

macOS

### Operating System Version

macOS Monterey 12.4

### Installation method

download from insomnia website

### Last Known Working Insomnia version

2022.4.2

Contributor guide

Open the contributing guide

Research direction

Start with the reproducible node index.js case and trace the YAML parsing used when the commit changes view refreshes its file status. Compare the behavior across the reported Insomnia versions and verify that the commit action lists files instead of remaining in a loading state, including the provided malformed-content case.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, yaml
Domain
desktop, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.