Insomnia: Issue with pull, push and commit

Created on 28 Jul 2020  路  11Comments  路  Source: Kong/insomnia

Describe the bug
I created a new document in Insomnia designer and cloned a git repository. I switched to a branch and then created an API request. Now I am trying to push that onto my branch. As I click on push button it starts loading and remains same forever. Nothing get pushed. Also same problem with pull also. Also when I click on commit button it shows me nothing to commit.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new document with a git repository cloned to it
  2. Checkout some branch other then master
  3. Create an API request on debug mode of Insomnia designer
  4. Now try to commit push or pull

Expected behavior
It should show me my changes on commit window and I should be able to push the changes.

Desktop (please complete the following information):

  • OS: Windows 10 pro 64 bit
  • Installation Method: Downloaded application for windows and installed Insomnia designer
  • App Version: 2020.3.3
apdesigner aregit-sync needs author input

Most helpful comment

Additional info to this issue:

  • git server is a self-hosted: GitLab
  • the branch is Not protected

(Hi @develohpanda FYI this is what we also discussed very quikly on slack a few weeks ago)

All 11 comments

Additional info to this issue:

  • git server is a self-hosted: GitLab
  • the branch is Not protected

(Hi @develohpanda FYI this is what we also discussed very quikly on slack a few weeks ago)

Ah, self-hosted GitLab strikes again.

I merged https://github.com/Kong/insomnia/pull/2432 recently, and there is a beta release (2020.4.0-beta.4) coming hopefully tomorrow that includes this PR, which may help you debug. You can upgrade to the beta channel from Preferences if you'd like to try it, but please note this is _beta_ and not stable.

Also when I click on commit button it shows me nothing to commit.

I find this to be the interesting one, as the git server shouldn't affect your ability to commit within the app.

Could you please try the following steps, with the console (View > Toggle Devtools > Console) open so that you can see git logs.

  1. Create a blank document in designer
  2. Create a request
  3. Create a blank git repository in GitLab
  4. Click "Setup Git Sync" in designer, and link your newly created repository
  5. Commit -> this should show changes
  6. Push -> you should see your commit in gitlab, or an error message in console

Please report back on findings to help me reproduce it 馃帀

Also when I click on commit button it shows me nothing to commit.

I think this is related to the long time one have to wait to see changed requests like reported here: #2457

I think this is related to the long time one have to wait to see changed requests like reported here: 2457

Ah, gotcha. So you _do_, eventually, see changes in the commit dialog? You'll notice that I have put the accepted label on 2457, we'll get onto it when we get a chance.

In that case, with the upcoming beta release, please try those steps and report back. I'm hopeful that the additional logging that has recently been added will help to determine why push/pull isn't working for you.

Ah, self-hosted GitLab strikes again.

I merged #2432 recently, and there is a beta release (2020.4.0-beta.4) coming hopefully tomorrow that includes this PR, which may help you debug. You can upgrade to the beta channel from Preferences if you'd like to try it, but please note this is _beta_ and not stable.

Also when I click on commit button it shows me nothing to commit.

I find this to be the interesting one, as the git server shouldn't affect your ability to commit within the app.

Could you please try the following steps, with the console (View > Toggle Devtools > Console) open so that you can see git logs.

  1. Create a blank document in designer
  2. Create a request
  3. Create a blank git repository in GitLab
  4. Click "Setup Git Sync" in designer, and link your newly created repository
  5. Commit -> this should show changes
  6. Push -> you should see your commit in gitlab, or an error message in console

Please report back on findings to help me reproduce it 馃帀

yes It worked for me. Now I'll check again for my project. Thanks a lot

Its working If i create a new blank document. But it is not working if I create new API request in existing document which I synced from gitlab repository

Hmm, that's interesting. A couple of questions:

  1. Could you provide any information on what your document looks like? A few/a lot of requests, a few/a lot of commits in the repository, whether _you_ created the repository or you cloned an existing repository with the .insomnia directory.
  1. Both the original repository, and the testing repository - did you create them, and can confirm you have the same permissions across both of them?

  2. Are you trying to commit to master, or a child branch? If a child branch, did you _create_ it in Designer and are trying to push, or did you _checkout_ a remote branch?

  3. Since the reproduction steps at the top of this issue are now out of date, would you be able to try reproduce what you are seeing, with a new document, in order to help me reproduce the issue that you're seeing?

It feels like you've hit an edge case of some sort, that's not necessarily related to your git provider, and I'd really like to get to the bottom of it. Thanks, @gautamtyagi81!

Yes @develohpanda . I cloned existing repository in insomnia designer which has already around 80 API requests.

  1. I created a new folder in which I created 2 API requests. I tried with just 1 commit. I tried to push in existing branch which was made during development and fetched in insomnia designer.
  2. I did not create the repository. It is existing project in gitlab and I was given access. There is only one repository which we are using for code (in phpstorm) and for API requests (in insomnia)
  3. I am trying to commit in a branch which I created from git bash and pushed to remote and checked out in Insomnia.
  4. I tried it with the beta version you have mentioned but still getting same issue. I can commit the changes but can not push.

I delete my document and cloned the repository again. Then I added my requests and then commit
Commit goes fine but when I pushed then I got this error

TypeError: Cannot read property 'request' of undefined
at httpPlugin (file:///C:/Users/91989/AppData/Local/insomnia-designer/app-2020.4.0-beta4/resources/app.asar/bundle.js:175820:19)
at async Function.discover (C:\Users\91989\AppData\Local\insomnia-designer\app-2020.4.0-beta4\resources\app.asar\node_modules\isomorphic-git\dist\for-node\isomorphic-git\index.js:6453:15)
at async Object.getRemoteInfo (C:\Users\91989\AppData\Local\insomnia-designer\app-2020.4.0-beta4\resources\app.asar\node_modules\isomorphic-git\dist\for-node\isomorphic-git\index.js:8429:20)
at async GitVCS.canPush (file:///C:/Users/91989/AppData/Local/insomnia-designer/app-2020.4.0-beta4/resources/app.asar/bundle.js:33209:24)
at async GitSyncDropdown._handlePush (file:///C:/Users/91989/AppData/Local/insomnia-designer/app-2020.4.0-beta4/resources/app.asar/bundle.js:193521:17)

Hi
I wanted to do a test also on my side using the beta 2020.4.0-beta.4, but with this version as soon as I start ( fresh AppData Insomnia folder and fresh clone) when I want to commit all of the requests are set to changed to be staged and committed :-O and if I try to rollback nothing happens

when I want to commit all of the requests are set to changed to be staged and committed :-O and if I try to rollback nothing happens

I literally just came across this 馃槷

We've published 2020.4.0-beta.6 just now. I think there must be something curious with your repository, let me know if the new beta helps otherwise we'll need to dig further again to atleast try to reproduce this.

Was this page helpful?
0 / 5 - 0 ratings