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.39k stars 1.94k forks source link

Cannot import OpenAPI spec (fio bank) #7885

Open verglor opened 3 weeks ago

verglor commented 3 weeks ago

Expected Behavior

Importing https://developers.fio.cz/v3/api-docs-production.json should succeed.

Actual Behavior

The following error is displayed instead:

TypeError: Failed to fetch at file:///C:/Users/jako/AppData/Local/insomnia/app-9.3.3/resources/app.asar/mainWindow-DiEbH_aZ.js:1300:1707 at xSe (file:///C:/Users/jako/AppData/Local/insomnia/app-9.3.3/resources/app.asar/mainWindow-DiEbH_aZ.js:134:11346) at Module.l (file:///C:/Users/jako/AppData/Local/insomnia/app-9.3.3/resources/app.asar/import-CHi2A4P6.js:1:438) at async file:///C:/Users/jako/AppData/Local/insomnia/app-9.3.3/resources/app.asar/mainWindow-DiEbH_aZ.js:56:4454 at async Qye (file:///C:/Users/jako/AppData/Local/insomnia/app-9.3.3/resources/app.asar/mainWindow-DiEbH_aZ.js:56:4904) at async Promise.all (index 2) at async Jye (file:///C:/Users/jako/AppData/Local/insomnia/app-9.3.3/resources/app.asar/mainWindow-DiEbH_aZ.js:56:3552) at async nt (file:///C:/Users/jako/AppData/Local/insomnia/app-9.3.3/resources/app.asar/mainWindow-DiEbH_aZ.js:55:26806) at async et (file:///C:/Users/jako/AppData/Local/insomnia/app-9.3.3/resources/app.asar/mainWindow-DiEbH_aZ.js:55:23473)

Reproduction Steps

  1. Go to workspace
  2. Click Create > Import > Url
  3. Type https://developers.fio.cz/v3/api-docs-production.json into Url input box.
  4. Click Scan button

Is there an existing issue for this?

Additional Information

If I first download the spec and import as file it succeed but without any collection.

Insomnia Version

9.3.3

What operating system are you using?

Windows

Operating System Version

10.0.19045.4780

Installation method

winget

Last Known Working Insomnia version

No response

CurryYangxx commented 3 weeks ago

Hi @verglor , this seems related to the electron issue: https://github.com/electron/electron/issues/29984, developers.fio.cz URL requires a client certification, and then electron throws an error. You can download this JSON, and choose file import.

verglor commented 3 weeks ago

Thanks @CurryYangxx, but as I mentioned in additional info if I first download the spec and import as file it succeed but without any collection.

verglor commented 3 weeks ago

Missing endpoints in collection is actually general problem already reported in #6547.

notjaywu commented 3 weeks ago

@verglor You can generate the collection manually

image
verglor commented 3 weeks ago

Thanks @notjaywu! This makes #6547 much less severe. 😉

notjaywu commented 3 weeks ago

Thanks! I'll close this issue.

verglor commented 3 weeks ago

Hi @notjaywu, but this issue is rather about importing from URL, so maybe you could rather close #6547 but leave this open until mentioned electron issue solves this one.

notjaywu commented 3 weeks ago

Hi @notjaywu, but this issue is rather about importing from URL, so maybe you could rather close #6547 but leave this open until mentioned electron issue solves this one.

Yes, good point. Reopen to track the Electron API issue.