getsentry / sourcemaps.io Goto Github PK
View Code? Open in Web Editor NEWWeb-based Source Map validator
Home Page: https://sourcemaps.io/
License: Apache License 2.0
Web-based Source Map validator
Home Page: https://sourcemaps.io/
License: Apache License 2.0
The sroucemapsio-www
bucket is hard-coded in the Makefile. Perhaps it needs to read:
diff --git a/Makefile b/Makefile
index 2e268c2..991eae4 100644
--- a/Makefile
+++ b/Makefile
@@ -61,7 +61,7 @@ deploy-config: echo-exports
# Deploy static website
deploy-www: deploy-config build-www
gsutil -m rsync -R -d client/build gs://${GCLOUD_WWW_BUCKET}
- gsutil web set -e index.html gs://sourcemapsio-www
+ gsutil web set -e index.html gs://${GCLOUD_WWW_BUCKET}
gsutil acl ch -u AllUsers:R gs://${GCLOUD_WWW_BUCKET}
Webpack generates source maps with external file URI that are prefixed with webpack://
, e.g. webpack:///app/javascript/index.js
. AFAICT, these are symbolic references to sources that existed on the users local filesystem, but are probably not on the web.
The tool is currently trying to download these, resulting in errors like:
Error: Invalid protocol: webpack: at Request.init
See discussion in webpack/webpack#2395
When I try to debug a source map that an inline data URL source map, I get UnableToFetchSourceMapError
.
Is support for inline source maps planned?
It would be fantastic if you could extract the validator part of this service out into a CLI, so it can be used without needing files to be internet accessible
There is this project https://github.com/ben-ng/sourcemap-validator, however I get vastly different results when using this.
e.g. URLs that point to 127.0.0.1
.
Right now the app silently logs this error (source) but never invokes the request callback, so it never provides feedback to the user that the address is unreachable.
Example from logs:
{ Error: connect ECONNREFUSED 127.0.0.1:8080 at Object.exports._errnoException (util.js:1020:11) at exports._exceptionWithHostPort (util.js:1043:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14) code: 'ECONNREFUSED', errno: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8080 }
We should probably just have a generic UnknownRequestError
report item.
The validator labels this as just a warning, because the token B
is conveniently found inside a different token (_instrumentBreadcrumbs
) on the same line:
This is because we're just doing a naive substring match to see if the token appears somewhere on the line. We should validate that it matches a complete token.
The process throws an exception and fails.
If you try to enter www.example.com/file.js
it chokes.
Is it possible the source map for the dist files are broken on this release? Or is it some sort of compatiblity issue?
Validating raven.min.js throws multiple errors.
can it validate .map files?
It'd be very convenient if this tool could take a URL to a webpage and give source map results for every resource found on it.
There's a couple ways to do it:
-G
and load .SourceMaps
from the artifacts written to disk. This is also using headless chrome, but Lighthouse does all the heavy lifting for you.Some source maps appear to point to the same location multiple times. The validator will happily re-validate these mappings, repeating errors users have already seen before.
For example, angular.min.js:
Would be very useful to have this as a module to use in a CI / test environment. https://github.com/ben-ng/sourcemap-validator isn't ideal because it only returns the first error, and also I believe the implementation here is more detailed.
How do you use Sentry?
Sentry SaaS (sentry.io) or self-hosted/on-premise (which version?)
Which SDK and version?
e.g: JavaScript 5.11.1, .NET 1.2.0
Anything but a SourceMapNotFoundError.
It says "SourceMapNotFoundError: Unable to locate a source map in http://www.ternaviationgroup.dreamhosters.com/wp-content/themes/tern-aviation-group/dist/css/app.css". Under Resolutions it includes "Add a//# sourceMappingURL= declaration". If you look at the CSS source it has a sourceMappingURL= declaration at the end: /*# sourceMappingURL=app.css.map */
. The URL http://www.ternaviationgroup.dreamhosters.com/wp-content/themes/tern-aviation-group/dist/css/app.css.map is valid. Does it need to be an absolute path?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.