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

Got an Error when transforming a HAR file generated for an Angular Application #73

Open
vikramuk opened this issue Oct 27, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@vikramuk
Copy link

vikramuk commented Oct 27, 2020

Transformed a har file which described this error

2020-10-27 20:39:17,586 ERROR Please help us fix this error by reporting it! https://github.com/zalando-incubator/Transformer/issues
Traceback (most recent call last):
File "c:\progapps\python37\lib\site-packages\transformer\scenario.py", line 316, in from_har_file
har = json.load(file)
File "c:\progapps\python37\lib\json_init_.py", line 296, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "c:\progapps\python37\lib\json_init_.py", line 348, in loads
return _default_decoder.decode(s)
File "c:\progapps\python37\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "c:\progapps\python37\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Unterminated string starting at: line 195542 column 24 (char 14100343)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\progapps\python37\lib\site-packages\transformer\cli.py", line 90, in script_entrypoint
dump(file=sys.stdout, scenario_paths=config.input_paths, plugins=config.plugins)
File "c:\progapps\python37\lib\site-packages\transformer\transform.py", line 92, in dump
intersperse("\n", _dump_as_lines(scenario_paths, plugins, with_default_plugins))
File "c:\progapps\python37\lib\site-packages\transformer\transform.py", line 135, in intersperse
yield next(it)
File "c:\progapps\python37\lib\site-packages\transformer\transform.py", line 113, in _dump_as_lines
for path in scenario_paths
File "c:\progapps\python37\lib\site-packages\transformer\transform.py", line 113, in
for path in scenario_paths
File "c:\progapps\python37\lib\site-packages\transformer\scenario.py", line 169, in from_path
blacklist=blacklist,
File "c:\progapps\python37\lib\site-packages\transformer\scenario.py", line 335, in from_har_file
raise SkippableScenarioError(path, err)
transformer.scenario.SkippableScenarioError: (WindowsPath('Locust-QA-SurgeonC.har'), JSONDecodeError('Unterminated string starting at: line 195542 column 24 (char 14100343)'))

transformer --version
1.3.0

To Reproduce
Steps and input files to reproduce the behavior:

  1. Generated a Har file from Chrome for a custom Angular Application - hosted on cloud
  2. transfomer XX.har >XX.har on windows
  3. See Error:
    obj, end = self.scan_once(s, idx)
    json.decoder.JSONDecodeError: Unterminated string starting at: line 195542 column 24 (char 14100343)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\progapps\python37\lib\site-packages\transformer\cli.py", line 90, in script_entrypoint
dump(file=sys.stdout, scenario_paths=config.input_paths, plugins=config.plugins)

Expected behavior
Generate a valid py file for Locust to run this.
I was able to transform a HAR to .py file for another recording on the same Environment.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Windows 10 64 Bit
Chrome : Version 86.0.4240.111 (Official Build) (64-bit)

TransformerError.txt

@vikramuk vikramuk added the bug Something isn't working label Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant