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.35k stars 1.93k forks source link

Bitbucket fails to sync when authenticating with VPN and certificate #2372

Open Rashgild opened 4 years ago

Rashgild commented 4 years ago

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 изображение

develohpanda commented 4 years ago

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?

Rashgild commented 4 years ago

@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 изображение

develohpanda commented 4 years ago

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?

Rashgild commented 4 years ago

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

develohpanda commented 4 years ago

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.

Rashgild commented 4 years ago

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

develohpanda commented 4 years ago

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?
Rashgild commented 4 years ago
  1. Yes, I generate token
  2. Atlassian Bitbucket v6.10.0
vlf commented 3 years ago

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)
develohpanda commented 3 years ago

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

antempus commented 3 years ago

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.

Dauliac commented 3 years ago

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

Eastkap commented 3 years ago

having the same issue with github

xavier-brochard commented 3 years ago

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.

stale[bot] commented 3 years ago

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.

TheProgrammer21 commented 3 years ago

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

sermarr commented 3 years ago

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)

pouyasalimi commented 2 years ago

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

develohpanda commented 2 years ago

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?

tuyen-at-work commented 2 years ago

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

jorygeerts commented 1 year ago

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.

chaz4short commented 1 year ago

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

needsomedata-online commented 1 year ago

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