question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

analyze produces a broken output html report

See original GitHub issue

Describe the bug When I use analyze to create an output.html report a non-functional HTML file is created.

The same result happens with the command line on macOS and Ubuntu 20.04 LTS. I used the .NET SDK and attempted to create the report from a directory that wasn’t inside of the deployed application folder by using the dotnet tool.

To Reproduce Steps to reproduce the behavior:

$ dotnet --list-sdks
3.1.401 [/usr/share/dotnet/sdk]


$ dotnet tool install --global Microsoft.CST.ApplicationInspector.CLI 
Since you just installed the .NET Core SDK, you will need to logout or restart your session before running the tool you installed.
You can invoke the tool using the following command: appinspector
Tool 'microsoft.cst.applicationinspector.cli' (version '1.2.58') was successfully installed.


$ appinspector 
ApplicationInspector.CLI 1.2.58+6e9480b37c
© Microsoft Corporation. All rights reserved.

ERROR(S):
  No verb selected.

  analyze        Inspect source directory/file/compressed file (.tgz|zip) against defined characteristics

  tagdiff        Compares unique tag values between two source paths

  tagtest        Test (T/F) for presence of custom rule set in source

  exporttags     Export unique rule tags to view what code features may be detected

  verifyrules    Verify custom rules syntax is valid

  packrules      Combine multiple rule files into one file for ease in distribution

  help           Display more information on a specific command.

  version        Display version information.


$ pwd 
/home/rbackley/Documents/ms_application_inspector/output


$ appinspector analyze -s ../code/cyclonedx-python/ 
The output file does not have an html or htm extension and may not open properly in your browser
Analyze command running
100% source files processed
Unable to launch output.html automatically.  Set the BROWSER environment variable to your desired browser and try again or launch your browser and navigate to the file to view the report file manually.
Analyze command completed
Additional details may be found in log file at /home/rbackley/.dotnet/tools/.store/microsoft.cst.applicationinspector.cli/1.2.58/microsoft.cst.applicationinspector.cli/1.2.58/tools/netcoreapp3.1/any/appinspector.log.txt


$ ls -l 
total 172
-rw-rw-r-- 1 rbackley rbackley 152694 Sep  2 08:21 output.html
-rw-rw-r-- 1 rbackley rbackley  16532 Sep  2 08:21 output.json

$ python3 -m http.server 8000
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
127.0.0.1 - - [02/Sep/2020 08:23:48] "GET /output.html HTTP/1.1" 200 -
127.0.0.1 - - [02/Sep/2020 08:23:48] code 404, message File not found
127.0.0.1 - - [02/Sep/2020 08:23:48] "GET /favicon.ico HTTP/1.1" 404 -

After performing the above steps I opened the HTML in Chromium via Open File and via browsing to the local HTTP server created by the python line at the very end of the steps pasted above.

Expected behavior I’d like a report in a single HTML file that functions like v1.2.53.

Screenshots Please see attached.

Open File

broken_report_file

Local HTTP server

broken_report

Desktop (please complete the following information):

  • OS:
    • Ubuntu 20.04 LTS
    • macOS 10.15.6
  • Browser
    • Chromium 85.0.4183.83
  • Version
    • ApplicationInspector.CLI 1.2.58+6e9480b37c

Additional context This is a follow-up to the question I raised on #273. It looks like I will need to go more in depth and I will open a new issue to track my specific issue.

I’ll attach the actual output files in a zip, incase it helps. This is a scan of an open source tool and is safe to disclose. Archive.zip

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gfscommented, Sep 2, 2020

Great report. I can repro this on Mac OS.

0reactions
guyacostacommented, Sep 2, 2020

Windows specific file path for those missing files. Testing fix now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jenkins Creating HTML Reports But Link Broken
When run via Jenkins, it generates an HTML report, the HTML report exists, but it is unavailable in Jenkins, generating the above error....
Read more >
FastQC not making html output report.
Dear All I have latest version of Fastqc and java environment. Fastqc file does not open the program and when I run it...
Read more >
Debugging HTML - Learn web development | MDN
This webpage takes an HTML document as an input, goes through it, and gives you a report to tell you what is wrong...
Read more >
Creating reports in R | Training-modules
This function will output the R version and the versions of all libraries loaded in the R environment. The versions of the tools...
Read more >
Handling common HTML and CSS problems - MDN Web Docs
Note: HTML errors don't tend to show up so easily in dev tools, as the browser will try to correct badly-formed markup automatically;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found