avantation icon indicating copy to clipboard operation
avantation copied to clipboard

HAR file saved from Fiddler throws error

Open amit-potdar opened this issue 5 years ago • 0 comments

ServerService-GetNavigationMenu2-fiddler.zip ServerService-GetNavigationMenu2-ff.zip

Hi,

When we try to generate OpenAPI specification from HAR file that is saved from Fiddler, it throws syntax error --- SyntaxError: Unexpected token  in JSON at position 0 at JSON.parse () at Avantation.run (C:/Users/amit.potdar/AppData/Roaming/npm/node_modules/avantation/lib/index.js:31:20) at Avantation._run (C:/Users/amit.potdar/AppData/Roaming/npm/node_modules/avantation/node_modules/@oclif/command/lib/command.js:43:31)

I've attached the HAR file for replication.

The command I used on Windows 10 OS ---- avantation.cmd ServerService-GetNavigationMenu2-fiddler.har

However, when we save HAR file from browser via dev tool, we could generate OpenAPI specification successfully. I saved the file from firefox browser --- avantation.cmd ServerService-GetNavigationMenu2-ff.har

The difference I could see is fiddler minifies HAR file and browser doesn't.

Can you check this?

Thanks, Amit

amit-potdar avatar Jun 24 '20 03:06 amit-potdar