Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON.parse SyntaxError since 0.4.4 #46

Open
devhammed opened this issue Jan 19, 2021 · 6 comments
Open

JSON.parse SyntaxError since 0.4.4 #46

devhammed opened this issue Jan 19, 2021 · 6 comments
Labels
awaiting feedback Waiting for participants to send feedback

Comments

@devhammed
Copy link
Collaborator

Hello there!

The generator since version 0.4.4 is throwing error Uncaught SyntaxError: Unexpected token in JSON at position 2764 with the insomnia.json file below (though it import correctly in Insomnia app and also works in version 0.4.3):

{"_type":"export","__export_format":4,"__export_date":"2021-01-19T08:26:15.602Z","__export_source":"insomnia.desktop.app:v2020.5.2","resources":[{"_id":"req_d3a7868acd2d4c2baa1808ea1efc49d4","parentId":"fld_99f32bcae3c34cb7b995f62366560549","modified":1611044671451,"created":1611044671451,"url":"{{ base_url }}/surveys","name":"GetSurveys","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"Admin-Token","value":"{{ administrator.token }}","description":"","id":"pair_d76b9d0a0156442aa58bf141cab64bc2"}],"authentication":{},"metaSortKey":-1606833245833,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_99f32bcae3c34cb7b995f62366560549","parentId":"fld_4fd02f68cf00457f950610a091b0c7d3","modified":1606836884702,"created":1606832899101,"name":"Surveys","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-999999975,"_type":"request_group"},{"_id":"fld_4fd02f68cf00457f950610a091b0c7d3","parentId":"wrk_a58dbb58449f43928aebb88192101a91","modified":1606836830731,"created":1606836830720,"name":"Administration","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1000000000,"_type":"request_group"},{"_id":"wrk_a58dbb58449f43928aebb88192101a91","parentId":null,"modified":1606832665458,"created":1606832590082,"name":"Survey","description":"","scope":null,"_type":"workspace"},{"_id":"req_e033048f93b84135b613c1c9bb911e24","parentId":"fld_16e8e4700e63418ba935eff07b06d9b4","modified":1608309726232,"created":1606833746449,"url":"{{ base_url }}/{surveyId}/pages","name":"GetPages","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"Admin-Token","value":"{{ administrator.token }}","description":"","id":"pair_aac4458f06db41858bf2119caa73b16f"}],"authentication":{},"metaSortKey":-1606833746449,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_16e8e4700e63418ba935eff07b06d9b4","parentId":"fld_4fd02f68cf00457f950610a091b0c7d3","modified":1606836878158,"created":1606833742115,"name":"Pages","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1000000025,"_type":"request_group"},{"_id":"req_1126487208be4840aa158e73d0c2c58e","parentId":"fld_653a28282362407bb92d5dbf6ea2d172","modified":1611044697399,"created":1611044697399,"url":"{{ base_url }}/administrator/session","name":"CreateSession","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"username\": \"{{ administrator.userame }}\",\n\t\"password\": \"{{ administrator.password }}\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_730eb2bcd7524a4192df6536e82e5518"}],"authentication":{},"metaSortKey":-1606835358452,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_653a28282362407bb92d5dbf6ea2d172","parentId":"fld_4fd02f68cf00457f950610a091b0c7d3","modified":1606836872222,"created":1606836790274,"name":"Session","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1000000075,"_type":"request_group"},{"_id":"env_800ccb2e8347e5b93c470fb4e3762c9fbfd3242e","parentId":"wrk_a58dbb58449f43928aebb88192101a91","modified":1606858393882,"created":1606832590172,"name":"Base Environment","data":{"base_url":"","administrator":{"userame":"","password":"","token":""}},"dataPropertyOrder":{"&":["base_url","administrator"],"&~|administrator":["userame","password","token"]},"color":null,"isPrivate":false,"metaSortKey":1606832590172,"_type":"environment"},{"_id":"jar_800ccb2e8347e5b93c470fb4e3762c9fbfd3242e","parentId":"wrk_a58dbb58449f43928aebb88192101a91","modified":1606837170275,"created":1606832590175,"name":"Default Jar","cookies":[{"key":"PHPSESSID","value":"qb5jd2023s5bjpclv9f3udjbqj","domain":"api.carenity.test7","path":"/","hostOnly":true,"creation":"2020-12-01T15:39:30.269Z","lastAccessed":"2020-12-01T15:39:30.269Z","id":"36095498947206206"}],"_type":"cookie_jar"},{"_id":"spc_d5bd08f434f54e14805db1e120d8337a","parentId":"wrk_a58dbb58449f43928aebb88192101a91","modified":1606832590084,"created":1606832590084,"fileName":"Insomnia","contents":"","contentType":"yaml","_type":"api_spec"},{"_id":"env_6ee0ecb85e8b4236ae5a9497c2fae807","parentId":"env_800ccb2e8347e5b93c470fb4e3762c9fbfd3242e","modified":1611044461604,"created":1606858176670,"name":"dev","data":{"base_url":"http://api.dev.test7","administrator":{"userame":"","password":"","token":""}},"dataPropertyOrder":{"&":["base_url","administrator"],"&~|administrator":["userame","password","token"]},"color":null,"isPrivate":false,"metaSortKey":1606858176670,"_type":"environment"}]}

Insomnia Plugin issue: devhammed/insomnia-plugin-documenter#3

@NicolasCaous
Copy link

This makes the latest version of insomnia-documenter unusable

devhammed added a commit to devhammed/insomnia-plugin-documenter that referenced this issue Feb 9, 2021
@devhammed
Copy link
Collaborator Author

devhammed commented Feb 9, 2021

This makes the latest version of insomnia-documenter unusable

Hello @NicolasCaous , I just reverted the documenter files to last stable version pending the wait for the fix...kindly upgrade the documenter plugin from Insomnia Plugins UI.

Screenshot from 2021-02-09 15-16-16

I will also try to look for the fix on my end here because it seems @jozsefsallai is busy with other things.

@NicolasCaous
Copy link

@devhammed thank you for the temporary fix! :)

@jozsefsallai
Copy link
Collaborator

Thank you for the bug report, I will look into this (any many others) very soon!

@devhammed devhammed assigned devhammed and unassigned devhammed May 6, 2021
@raulamoretti
Copy link

I download this and the @devhammed plug in , but not working for me!

@jozsefsallai
Copy link
Collaborator

Please try using v0.5.1 and see if the problem persists.

@jozsefsallai jozsefsallai added the awaiting feedback Waiting for participants to send feedback label May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback Waiting for participants to send feedback
Projects
None yet
Development

No branches or pull requests

4 participants