insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Bitbucket fails to sync when authenticating with VPN and certificate

Open Rashgild opened this issue 5 years ago • 23 comments

When I try pull/push commit to rep, I getting error:

TypeError: Cannot read property 'request' of undefined at httpPlugin (file:///C:/Users/Rashgild/AppData/Local/insomnia-designer/app-2020.2.2/resources/app.asar/bundle.js:248444:19) at process._tickCallback (internal/process/next_tick.js:68:7)".

Error on bitbucket (!), on github it`s allright.

Screenshots изображение

  • OS: Win 10
  • App Version 2020.2.2

Rashgild avatar Jul 09 '20 22:07 Rashgild

Hi @Rashgild! Could you also add some info on what your repository looks like at the moment? Has it previously been sync'd with Designer, does it contain a .insomnia directory at the root?

develohpanda avatar Jul 09 '20 22:07 develohpanda

@develohpanda, repository was empty, I tried to push and get this error. Then I pushed commit with git bush. In insomnia I get this error too.

now state on repository изображение

Rashgild avatar Jul 09 '20 23:07 Rashgild

Thanks. So to confirm, your steps were:

  1. Create new bitbucket repo
  2. Create new document in insomnia designer
  3. Write a specification
  4. Click the "Setup Git Sync" button in insomnia
  5. Commit your changes
  6. Push -> led to the error in your screenshot

Is that correct?

develohpanda avatar Jul 09 '20 23:07 develohpanda

Yes, that's it!

Oh, I discovered a new fact: In main menu -> Create -> Import from "Git Clone" And I got the following error: 2020-07-10_02-16-53

Rashgild avatar Jul 09 '20 23:07 Rashgild

Interesting, certificate. What is the bitbucket repository setup like? 2FA, self-hosted, etc. It may be a security related issue being surfaced as a different error.

develohpanda avatar Jul 09 '20 23:07 develohpanda

Bitbacket located remotely, I have access to it through vpn under the certificate

Rashgild avatar Jul 09 '20 23:07 Rashgild

My guess is that authentication method is currently not supported by Designer, possibly related to #2220 and #2221

  1. When designer asked you to enter your app token, how did you generate that?
  2. Could you please identify the version of BitBucket hosted remotely?

develohpanda avatar Jul 09 '20 23:07 develohpanda

  1. Yes, I generate token
  2. Atlassian Bitbucket v6.10.0

Rashgild avatar Jul 09 '20 23:07 Rashgild

Are there any updates on this? I'm on 2020.4.1 and have the similar? issue, but we're using self-signed cert with gitlab.

Push:

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

Pull:

TypeError: Cannot read property 'request' of undefined
    at httpPlugin (file:///C:/Users/test/AppData/Local/insomnia-designer/app-2020.4.1/resources/app.asar/bundle.js:178544:19)
    at async Function.discover (C:\Users\test\AppData\Local\insomnia-designer\app-2020.4.1\resources\app.asar\node_modules\isomorphic-git\dist\for-node\isomorphic-git\index.js:6453:15)
    at async fetchPackfile (C:\Users\test\AppData\Local\insomnia-designer\app-2020.4.1\resources\app.asar\node_modules\isomorphic-git\dist\for-node\isomorphic-git\index.js:7296:22)
    at async fetch (C:\Users\test\AppData\Local\insomnia-designer\app-2020.4.1\resources\app.asar\node_modules\isomorphic-git\dist\for-node\isomorphic-git\index.js:7157:22)
    at async Object.pull (C:\Users\test\AppData\Local\insomnia-designer\app-2020.4.1\resources\app.asar\node_modules\isomorphic-git\dist\for-node\isomorphic-git\index.js:9895:49)
    at async GitSyncDropdown._handlePull (file:///C:/Users/test/AppData/Local/insomnia-designer/app-2020.4.1/resources/app.asar/bundle.js:193810:7)

vlf avatar Sep 28 '20 10:09 vlf

Hi @vlf, unfortunately we haven't had a change to dig further into this one yet.

develohpanda avatar Sep 28 '20 21:09 develohpanda

I had this issue on a existing repo (without insomnia designer) and reset the repository settings and then tried to pull and got a similar error with master. I went to view branches and waited for it to populate before creating a new branch. After that, I was able to push after committing changes. I will attempt to repro with another repository.

@vlf try resetting repo settings and then looking at the branches before doing anything else.

antempus avatar Oct 07 '20 00:10 antempus

I had the same issue with self hosted gitlab. (my certificate is insecure and self signed.)

Tls error on clone And:

TypeError: Cannot read property 'request' of undefined
    at httpPlugin (file:///opt/Insomnia%20Designer/resources/app.asar/bundle.js:178549:19)
    at async Function.discover (/opt/Insomnia Designer/resources/app.asar/node_modules/isomorphic-git/dist/for-node/isomorphic-git/index.js:6453:15)
    at async fetchPackfile (/opt/Insomnia Designer/resources/app.asar/node_modules/isomorphic-git/dist/for-node/isomorphic-git/index.js:7296:22)
    at async fetch (/opt/Insomnia Designer/resources/app.asar/node_modules/isomorphic-git/dist/for-node/isomorphic-git/index.js:7157:22)
    at async Object.pull (/opt/Insomnia Designer/resources/app.asar/node_modules/isomorphic-git/dist/for-node/isomorphic-git/index.js:9895:49)
    at async GitSyncDropdown._handlePull (file:///opt/Insomnia%20Designer/resources/app.asar/bundle.js:193857:7)

On pulling

Dauliac avatar Dec 01 '20 13:12 Dauliac

having the same issue with github

Eastkap avatar Mar 11 '21 10:03 Eastkap

Having the same issue on GitHub Enterprise 2.22.6 exposed under a self-signed certificate.

When pushing: image

When cloning: image

My OAuth token is generated within GitHub Enterprise, and has all possible scopes, so probably not related to #2220 and #2221.

  • macOS Mojave 10.14.6
  • Insomnia v2021.1.1

xavier-brochard avatar Mar 22 '21 10:03 xavier-brochard

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 26 '21 23:05 stale[bot]

I have the same issue with my GitLab server. The certificate is self-singed.

TheProgrammer21 avatar Jul 19 '21 06:07 TheProgrammer21

I have the same issue with my GITEA server. The certificate is also self-signed.

(Personal rant: I find this particular Insomnia functionality extremely picky)

sermarr avatar Jul 28 '21 10:07 sermarr

I have the same issue with GitLab self-hosted, The certificate is Let's Encrypt

pouyasalimi avatar Oct 25 '21 20:10 pouyasalimi

Hi all, 2021.6 has been released which should include some better error messaging here to help narrow down the issue. Could you please report back any findings and whether you still experience this error after upgrading?

develohpanda avatar Nov 01 '21 01:11 develohpanda

Tried many times in many computers, I'm never success in enable Git Sync feature.

tuyen-at-work avatar Nov 04 '21 04:11 tuyen-at-work

I'm running into this issue as well. The HTTPS certificate is self-signed, the CA for it is trusted by my Windows certificate store (so browsers and such simply trust it).

Entering an HTTP URL somewhat works, but the URL field keeps getting cleared.

jorygeerts avatar Oct 17 '22 14:10 jorygeerts

I am having a similar issue can never get Git Sync to work but my error say 401 Unauthorized. not sure about a self sgn Cert but I m trying to connect to an On Prem, Azure DevOps Git Repo and My team members and I have had no luck. Any ideas?

Insomnia Version: latest beta, 2022.7.0-beta4 Repo location: https://tfs.**.com/tfs//*******/_git/Insomnia-api-collections.git

image

chaz4short avatar Nov 11 '22 00:11 chaz4short

Any news? I think my bug is the same https://github.com/Kong/insomnia/issues/6094

needsomedata-online avatar Jul 05 '23 09:07 needsomedata-online