[SOLVED] Minified app filename

I am trying to work out rollbar error reporting. Apparently it needs source map and minified app name. The source is not a problem, but I can not find the filename of the app.
Anybody knows how to get the minified app filename?

Assuming that you need to obtain that app’s name on the client: it’s in a <script> tag in <body>. Look for the one that ends with ?meteor_js_resource=true

Not exactly sugar, because I need that name when I am uploading source map, but close. Thx!

I’m not sure how you deploy your app, but if you do have access to your bundle before or after deployment, you should programmatically find the only .js file under bundle/programs/web.browser and/or under bundle/programs/web.browser.legacy, respectively. That’s your app.

I’ve looked into the rollbar docs, but I didn’t find why you might need the minified app’s filename in the first place. If you intend to use it as a unique string for rollbar’s “version”, you could consider using Meteor.gitCommitHash instead, in full or maybe just a substring of it.

Because it asks for it. This is how I upload the source map.

curl https://api.rollbar.com/api/1/sourcemap    \
	-F access_token=server token    \
	-F environment=env   \
	-F version=can be git hash or git version   \
	-F minified_url=https://www.hundredgraphs.com/7147755bab692b95fc3a07df90deec6a16165538.js \
	-F source_map=@location of app.js.map

If you give rollbar just a top location, it complains there is no src map for the minified file. I can get out the minified name from the server after the push, but prefer it to be automated during the push. Version is coming from git hash, no problem.

Oh, and I am using mup. Maybe it does minifying on the server? I never looked into details. The app.js in web.browser folder doesn’t have the minified file name.

Now it makes sense. I am aware of mup, but don’t use it myself, I never looked into the details of deployment. In worst case you can write a little script to run via ssh on the target system to find out the minified app’s name in the directory where it gets installed. It feels like a hack though.

Or just parse a top location after the install and get it from there, still a hack of course. It never got to me that it could be a mup issue. At least I know how to fix it in the future. As for know I will just get that name after the install.

Thx again