Kong / insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
https://insomnia.rest
Apache License 2.0
34.84k stars 1.97k forks source link

Unable to commit changes in repository with git submodule #4824

Open rspurgeon opened 2 years ago

rspurgeon commented 2 years ago

Expected Behavior

Either the ability to commit code to a repository with a submodule or a proper error message indicating non-support or workaround.

Actual Behavior

When using the Git integration with Insomnia, I've noticed that the Commit function does not complete successfully on a repository with a git submodule. Cloning via the GitHub auth mechanism (or setting up a respiratory manually), and then executing the Commit function will result in a spinning wait icon in the Commit screen and no further progress.

Screen Shot 2022-05-31 at 2 21 17 PM

Reproduction Steps

Create a repository with a git submodule, make a change (for example add a spec file), then execute a Git Commit operation.

Is there an existing issue for this?

Additional Information

No response

Insomnia Version

2022.3.0

What operating system are you using?

macOS

Operating System Version

macOS Monterey 12.4

Installation method

Downloaded from main page

Last Known Working Insomnia version

No response

filfreire commented 2 years ago

Hi @rspurgeon, thank you for reporting this!

I was able to reproduce this as well. The moment I try to commit after setting up git sync on a repo, I see the "infinite loading" behavior.

We seem to be hiding an error that is thrown when folks try to issue a commit on a repo with submodules:

/Users/filipe.freire@konghq.com/work/insomnia/packages/insomnia/node_modules/isomorphic-git/index.cjs:2107 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'byteLength')
    at Function.wrap (/Users/filipe.freire@konghq.com/work/insomnia/packages/insomnia/node_modules/isomorphic-git/index.cjs:2107:37)
    at hashObject$1 (/Users/filipe.freire@konghq.com/work/insomnia/packages/insomnia/node_modules/isomorphic-git/index.cjs:12775:27)
    at getWorkdirOid (/Users/filipe.freire@konghq.com/work/insomnia/packages/insomnia/node_modules/isomorphic-git/index.cjs:13088:34)
    at async Object.status (/Users/filipe.freire@konghq.com/work/insomnia/packages/insomnia/node_modules/isomorphic-git/index.cjs:13129:26)
    at async GitStagingModal2._refresh (git-staging-modal.tsx:207:7)
    at async GitStagingModal2.show (git-staging-modal.tsx:176:5)

Screenshot 2022-06-02 at 11 47 14

Note: I used as an example for the git sync this repository: https://github.com/filfreire/example-parent-repo (which has this submodule repository inside https://github.com/filfreire/example-submodule-repo).

@rspurgeon we'll update this ticket as soon as there's any fixes or work done on this specific issue.

JoakoV3 commented 1 year ago

Same problem here, different error

Version: Insomnia 2022.6.0 Build date: 9/26/2022 OS: Linux x64 5.14.0-1054-oem Electron: 19.0.3 Node: 16.14.2 V8: 10.2.154.4-electron.0 Architecture: x64 Error:

Uncaught (in promise) YAMLSyntaxError: All collection items must start at the same column
    at Collection.parse (/opt/Insomnia/resources/app.asar/node_modules/yaml/dist/parse-cst.js:331:24)
    at /opt/Insomnia/resources/app.asar/node_modules/yaml/dist/parse-cst.js:1605:29
    at Document.parseContents (/opt/Insomnia/resources/app.asar/node_modules/yaml/dist/parse-cst.js:622:26)
    at Document.parse (/opt/Insomnia/resources/app.asar/node_modules/yaml/dist/parse-cst.js:685:19)
    at Object.parse (/opt/Insomnia/resources/app.asar/node_modules/yaml/dist/parse-cst.js:1723:18)
    at parseDocument (/opt/Insomnia/resources/app.asar/node_modules/yaml/dist/index.js:43:24)
    at Object.parse (/opt/Insomnia/resources/app.asar/node_modules/yaml/dist/index.js:55:15)
    at hF.stat (ne-db-client.ts:194:7)
    at async FileSystem.lstat (/opt/Insomnia/resources/app.asar/node_modules/isomorphic-git/index.cjs:4324:21)
    at async Object.status (/opt/Insomnia/resources/app.asar/node_modules/isomorphic-git/index.cjs:13077:19)
    at async Lz._refresh (git-staging-modal.tsx:214:13)
    at async Lz.show (git-staging-modal.tsx:183:11)
maycon5 commented 1 year ago

This problem keeps happening, some solution?

I even updated to the last beta version, but still not fix this.

Version: Insomnia 2022.7.0-beta.6 Build date: 29/11/2022 OS: Windows_NT x64 10.0.19044 Electron: 21.2.0 Node: 16.16.0 V8: 10.6.194.18-electron.0 Architecture: x64 Git Sync: GitLab

insomnia git infinite loop loading screen error

Baklap4 commented 1 year ago

Still having the same issue in 2022.7.0 image Any update on this? This along with a lot of other issues with the git integration is kind of preventing us from working nicely with Insomnia.

Is there perhaps a workaround so we can play with the git cli (installed on the computer) ourselves instead of having to go through isomorphic-git