Cannot open Casper Remote logs in Chrome

NTmatter
New Contributor II

With thanks to daniel.prk and mark.kenny from MacAdmins #jamfnation:

After running an action with Casper Remote 9.96, selecting a computer and viewing a log opens a web browser pointing at a File Reference URL of the form file:///.file/id=6571367.30118617

This only seems to be supported on Safari. Chrome throws a "File Not Found" and Firefox simply ignores the URL altogether. Please note that punching in an invalid file reference will simply crash Safari.

Workaround is fairly straightforward, just copy/paste the URL into Safari, change your default browser, or find the latest file in ~/Library/Logs/Casper Logs.

Additionally, if you really prefer Chrome, you can convert the reference into a concrete path with a short AppleScript instead.

12 REPLIES 12

emily
Valued Contributor III
Valued Contributor III

Worth noting that based on my testing this is an issue in Chrome running on Sierra (macOS 10.12). I've been going back and forth with my TAM on this since the beta days.

bpavlov
Honored Contributor

PI-003017
Effects Sierra only apparently.

uliy
New Contributor II

+1
waiting for fix

tony_schaps
Contributor

+1
Still waiting for fix...

mm13
New Contributor II

+1
Still waiting for a fix...

were_wulff
Valued Contributor II

Hey all,

We don't have an ETA on a fix; when it's fixed, it will be noted in the Release Notes.

We are aware that the issue still exists as PI-003017 is still in the open status.

Thanks!
Amanda Wulff
Jamf Support

regan
New Contributor

Has this been fixed yet?

were_wulff
Valued Contributor II

@regan ,

We make every effort to ensure that all fixed Product Issues are listed in the Release Notes.

If you do not see PI-003017 listed in the Release Notes it means that it has not yet been fixed.

Thanks!
Were Wulff
Jamf Support

Chuey
Contributor III

As long as it works in a browser - it works for me. Safari it is for viewing logs.

tony_schaps
Contributor

@Chuey That's great if Safari is your default browser, but not so great if you use Chrome.

I don't quite understand the mechanics of it, but when you click on the button to see the log, it uses a format of "file:///.file/id=1234567.12345678" which maps to a Casper log file in ~/Library/logs/Casper%20Logs/ such as
"file:///Users/[myuser]/Library/Logs/Casper%20Logs/1.01.17%20at%204.31.26%20PM.html" -- my question is:

Since Casper/Jamf Pro creates said log file, why can't it link directly to the html file instead of creating the ".file/id=" equivalent? The ".html" URL would work in all browsers.

Chuey
Contributor III

@tony.schaps Just copy and paste the URL in Safari - few extra steps but it works.

tony_schaps
Contributor

@Chuey Of course I know I can do that, that's what I've had to do to see the logs. But that's a workaround, not a solution.

I spent a few minutes researching what's going on here. The link to the log files in Casper Remote is a "File Reference URL" (also called a "bookmark" in Apple developer parlance), which helps when referencing files whose locations may change. Since these log files don't change location, I am not sure why it was coded this way.

For whatever reason, Chrome in Sierra can no longer convert the file reference URL to a Path-based URL automatically, but it's apparently simple to do in the code. For example, you can run the following Applescript in the Terminal to convert a File Reference URL to Path-based URL:

osascript -e 'get posix path of posix file "file:///.file/id=1234567.12345678" -- kthxbai'

It seems to be a simple fix, so I don't know why this has taken so long to address. If you use Casper Remote a lot, copying the File Reference URL to paste into Safari is an annoying blocker which used to work just fine. If it's not a feature you use much, that's great for you, but don't discount the annoyance experienced by those who do use it a lot.