Possible problem with sourcemaps when actual code is eval'ed

broth

Posted on
Aug 18 2016

Hi all,

I am experiencing a problem very similar to this issue: https://raygun.com/forums/thread/47508#58773

Within Chrome Dev Tools, everything seems to work fine; it finds the unminified file via the source map,

Chrome Dev Tools

but in Raygun it can't seem to find the source maps:


Source map comments were not detected in the following minified files. 
Please ensure your minified files include the "//# sourceMappingURL=..." 
comment on a separate line at the end of your file.
https://mysite.com/app/resources.js:1:71), <anonymous>

Note that although the error message from raygun says that it can't find the sourceMappingURL comment at the end of resources.js file, as you can see from the above screenshot, that the comment does exist (albeit partially behind the tooltip).

The one thing that we are doing different from the majority of other apps is that our app is a SPA (Single Page App) designed to work offline (our customer base works in remote oil field locations where there is usually no connectivity). We use a cache manifest that caches what is essentially a bootstrap script (resources.js). That script checks if we are online/offline and if the main codebase is already cached. Then the script loads the main codebase and it does an "eval" on the code (yes, this is one instance when "eval" is not "evil").

Like I said, in Chrome Dev Tools everything works fine. I have a feeling that Raygun doesn't know how to handle the eval'ed code from resources.js.

I've tried specifying the minified file in the "Js Source Map Center" as both from https://mysite.com/app/resources.js and as https://mysite.com/app/main-built.js, but neither one works (same error for both specifications).

Any ideas would be greatly appreciated.

Thanks, Bob


Deleted User

Posted on
Dec 27 2016

Hello Bob!

I wanted to check in with you to see if you were still having an issue with the source maps not being detected by Raygun. If so, please let us know and we'll start looking into it immediately.

Thank you for your patience,

Jesse, Developer Evangelist at Raygun


Reply