roku-report-analyzer
v0.3.11
Published
Analyze roku crashlogs and leverage sourcemaps to translate pkg paths into original file paths
Downloads
116
Keywords
Readme
roku-report-analyzer
Leverage sourcemaps to translate pkg paths from Roku crash logs into original file paths
Description
The purpose of roku-report-analyzer (rra) is to standardize the roku crash log reports that get emailed to you directly from roku on a regular basis. Those crashlogs normall include the file paths in the format pkg:/source/main.brs(10)
or yourcomplib:/components/SomeComponent.xml(12)
.
Goals
- translate device locations (
pkg:/source/main.brs(10)
) into source code locations (C:/projects/YourRokuApp/src/source/main.brs(10)
). - leverage source maps for transpiled projects (such as those built by BrighterScript)
- flatten the report folder structure
- use globs for finding many crashlogs
- automatically unzip crashlog folders
Installation
Local Install
We recommend installing roku-report-analyzer locally within your project as a devDependency. This way, you can ensure the tool always works with a specific project.
npm install roku-report-analyzer -D
Usage
Basic usage
A simple project
npx rra ./crashlogs/AwesomeRokuApp_A50.zip --projects ./projects/AwesomeRokuApp
Multiple crashlogs
rra supports globs for finding crashlogs, and supports zips as well as unzipped folders. You can specify as many globs as you wish.
npx rra ./app1/crashlogs/**/*.text ../downloads/**/*.text ./crashZips/*.zip --projects ./projects/AwesomeRokuApp
Multiple projects
Perhaps your project is assembled from multiple source projects
npx rra ./crashlogs/AwesomeRokuApp_A50.zip --projects ./projects/AwesomeRokuApp_base ./projects/AwesomeRokuApp_overrides1 ./projects/AwesomeRokuApp_overrides2
Component libraries
If you use component libraries, those file paths will be prefixed by the sg_component_libs_provided
value from the manifest. By default, we will look for that value in each project's manifest file. However, you can set it manually by adding it to the front of your project path separated by a colon (i.e. somecomplib:./projects/path/to/complib
).
npx rra ./crashlogs/AwesomeRokuApp_A50.zip --projects pkg:./projects/AwesomeRokuApp yourcomplib:./projects/complib
You can also use javascript string-style regular expressions to match multiple sg_component_libs_provided
prefixes. For example:
npx rra ./crashlogs/AwesomeRokuApp_A50.zip --projects pkg:./projects/AwesomeRokuApp "(complib1|complib2):./projects/complib"
cwd
You can override the current working directory like this:
npx rra --cwd C:/wherever ./crashlogs/**/*.zip --projects ./projects/CoolApp
Truncation
Be aware, roku crashlogs will truncate some paths to a max of 120 characters. In this situation, we have no way to properly match paths back to their original locations. For this reason, we recommend that you limit all of your final paths to a maximum of 120 characters.
Help
Run the --help
command to view all the available options
npx rra --help