mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #3554] [bug]: "Error while importing: format not recognized" when importing a single environment #1218
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1218
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @crossbone-magister on GitHub (Nov 15, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3554
Is there an existing issue for this?
Current behavior
When exporting a single environment and then reimporting, the following error shows up:

When exporting all the environments, no errors show up. This works whether all is one or multiple environments.
If you use both export methods in an hoppscotch installation that only has one registered environment, the only difference in the two export files is that the first one contains a JSON object, while the second one contains an array of JSON objects.
Steps to reproduce
Environment
Release
Version
Local
@liyasthomas commented on GitHub (Nov 16, 2023):
@JoelJacobStephen can you take a look into this?
@DanielAttali commented on GitHub (Dec 3, 2023):
Hi @crossbone-magister
Ensure the JSON file has square brackets at the beginning and end.
When exporting, a JSON file is downloaded without square brackets at the beginning and end, so when you try to import the same file, an error occurs.
@crossbone-magister commented on GitHub (Dec 3, 2023):
Hi @DanielAttali, thanks for your reply.
I also pointed out the missing square brackets in my original description, though not explicitly:
What you are suggesting is what I eventually did to move forward with the import, but it feels like a workaround to me.
I believe it would be best for the import and export files to have a consistent format instead of having the user to play around with them to make the import work. What do you think about it?
In any case this is just my personal opinion, it's ultimately up to the hoppscotch team to decide if they consider it an issue and what is the best approach to solve it.
@nnmer commented on GitHub (Dec 27, 2023):
Feels like this is still an issue. I can re-import exported env.json (with 1 environment collection) but if I have another file with the simplest content as below - constantly getting "File format not recognized.". Adding this new environment into the previously exported env.json with existed environment produce same error
Hoppscotch Desktop App v2023.12.1-1
@liyasthomas commented on GitHub (Dec 27, 2023):
@jamesgeorge007 @amk-dev can you look into this?
@jamesgeorge007 commented on GitHub (Dec 28, 2023):
Hi @nnmer, I couldn't reproduce the issue with the above environment JSON file.
Can you provide a sample environment JSON file that will help reproduce the issue? Also, can you check if it's reproducible on hoppscotch.io?
@nnmer commented on GitHub (Dec 29, 2023):
@jamesgeorge007 , I've played a bit more, maybe restart of OS and App helped, it does work now.
But, I've found that the values in json should not contain numbers as a number, but strings instead. If all values to be converted to strings and updated format to native Hoppscotch - I've managed to import my Postman env. collection.
@liyasthomas commented on GitHub (Jan 2, 2024):
Thanks for your patience and valuable feedback. This feature has been implemented in the latest release.
Closing this ticket as this feature is now available in the recent version. Feel free to reach out if you encounter any further concerns.
@aakrem commented on GitHub (Jan 18, 2024):
Still getting the same error. from client version and from website.
@jamesgeorge007 commented on GitHub (Jan 18, 2024):
@aakrem, can you share the steps to reproduce? Possibly a sample environment JSON file.
@aakrem commented on GitHub (Jan 18, 2024):
@jamesgeorge007 sure, it's a JSON format and I am trying to import it from this URL: https://cloud.agenta.ai/api/openapi.json
@aakrem commented on GitHub (Jan 18, 2024):
@jamesgeorge007 any idea if we can solve this soon?
@jamesgeorge007 commented on GitHub (Jan 18, 2024):
Hi, we'll investigate this and get back.
@jamesgeorge007 commented on GitHub (Jan 22, 2024):
@aakrem, a CORS error occurs while attempting to fetch from the above URL. We're tracking this internally. In the meantime, you can use an extension that adds the
Access-Control-Allow-Origin: *rule to the response header. For instance, Allow CORS: Access-Control-Allow-Origin.@pritammobisoft commented on GitHub (Apr 1, 2024):
Is there any update on this? This is not just related to CORS. I tried to import a OpenAPI 3.01 JSON file which was saved to disc. Even then this error came. The JSON file was generated automatically by Spring Boot and works with OpenAPI viewer.
@jamesgeorge007 commented on GitHub (Apr 2, 2024):
Hi @pritammobisoft, can you help with the steps you took and a sample file to reproduce?
Please follow the steps here while importing an OpenAPI collection.
@lin-mt commented on GitHub (Apr 22, 2024):
Hi @jamesgeorge007 Importing https://cloud.agenta.ai/api/openapi.json from URL is not working in Desktop App (windows v2024.3.0).
@matthiscock commented on GitHub (May 20, 2024):
Same for me, exports from Postman fail to import
The [] trick failed also
(Note managed to get a environment in, but never a collection)
@ChenE2000 commented on GitHub (May 30, 2024):
Same issue for me while try to import file
http://localhost:8000/openapi.jsondirectly exported from FastAPI swagger.@jalotra commented on GitHub (May 30, 2024):
Same for me, when I try to import from Spring Boot OpenApi Spec !
@whhomi commented on GitHub (Jun 12, 2024):
Same for me, when I try to import from Flask OpenApi Spec.
@aakrem commented on GitHub (Jun 12, 2024):
@jamesgeorge007 @liyasthomas can we reopen this issue ? it looks like it's not solved
@ahsanaasim commented on GitHub (Jul 4, 2024):
We are trying to switch from Insomnia. But For this issue, we got stuck. We identified an interesting thing. The exported json file from insomnia gets imported instantly in the personal workspace.
It doesn't work with the newly created workspace.
I saw the same problem is faced by others. But the issue seems to be closed without any solution.
Here is the link to the issue: https://github.com/hoppscotch/hoppscotch/issues/3975
@ahsanaasim commented on GitHub (Jul 4, 2024):
I have checked the network response of the API that is being called. Seems like there is one internal crash. Hope the response below helps to solve the issue
I saw the same problem is faced by others. But the issue seems to be closed without any solution.
Here is the link to the issue: https://github.com/hoppscotch/hoppscotch/issues/3975
@balub commented on GitHub (Jul 4, 2024):
Hey @ahsanaasim if its not a problem could you share the file you were using so we can try reproducing the issue out end.
@rampa2510 commented on GitHub (Jul 14, 2024):
Encountering the same issue cannot share the file since it has company data.
@sxhil7 commented on GitHub (Jul 19, 2024):
anyone solved this issue???
@CostcoFanboy commented on GitHub (Sep 27, 2024):
Dummy fix, but I import with Postman, then dump and re-import into Hoppscotch as the import function for Postman works.
@LucasVos commented on GitHub (Oct 2, 2024):
Any status update on this issue? We use .NET Swagger generated specs. same error as everyone else.
@Jrb1x commented on GitHub (Nov 1, 2024):
Same here. First time trying Hoppscotch and shocked that I can't import an OpenAPI spec.
@ianmuhia commented on GitHub (Dec 2, 2024):
same here
@vladimir-cloudypro commented on GitHub (Jan 5, 2025):
I noticed that the issue is happening on files bigger than "700 KB". As long as you are not on the Personal Workspace. @liyasthomas
@salmanarshad321 commented on GitHub (Apr 17, 2025):
even on a paid plan?
@kidfromjupiter commented on GitHub (Oct 31, 2025):
I can confirm this. I imported a 3.1Mb postman export into my personal workspace no problem. But could never import it into my free tier team workspace
@adam-cobb commented on GitHub (Feb 3, 2026):
I'm seeing this issue as well, as above, I cannot import a larger (7MB) Postman JSON into anything other than my personal workspace, it even fails the same if I first import to personal then try and do a workspace import to the team workspace, I still see the "Format not recognised error"
Is there any update on this please, as this is the only thing holding us back from switching away from Postman.
Thanks.
@Michahide commented on GitHub (Mar 2, 2026):
still experience the same issue, is there any upcoming fix?