Skip to content

Mac OS X Hints

Resolving ‘A problem repeatedly occurred…’ error in Safari

Update: Apparently this has happened again with Safari 14.1 on non-current MacOS releases. As of today (Apr 29), MacRumors has the package downloaders available for Catalina and Mojave:

https://www.macupdate.com/app/mac/15675/apple-safari

I can't test this for myself yet as I'm away from my Mojave iMac for a while, but hopefully it'll solve the issue as it did before.


Yesterday, after updating to Safari 14 on my Mojave-running iMac, I noticed a big problem: I couldn't load many sites that contained either a login dialog or a shopping cart. For example, I could load Target's main site, but when I tried to open the shopping cart, it wouldn't work.

I'd briefly see the page, then it would clear and reload once or twice more, and then I'd be left with an error message:

A problem repeatedly occurred with "https://www.target.com/co-cart"

This was happening on many, but not all, sites—I could login on Amazon and my bank, but not on most of our credit card sites or typical retail shopping pages. Given this happened just after installing Safari 14, I assumed it was somehow related to the new browser version—the same pages that didn't load in Safari loaded fine in every other browser I tried. But they loaded fine on Safari 14 on my Catalina MacBook Pro, so then I knew I had a Mac-specific issue…the worst kind of issue to troubleshoot.

While troubleshooting, I found that I wasn't alone, nor was this a Safari 14 issue—there are lots of reports of the same problem over many years.

After tweeting about my troubles and what I'd done to try to troubleshoot the problem, Jeff Johnson of Lapcat Software got me on the right track by suggesting that my Safari install was broken. He suggested I check the date on this Safari framework...

/System/Library/StagedFrameworks/Safari/libwebrtc.dylib

When I did, I found that the version on my iMac was much older (Jul 13, 2020) than the version on my MacBook Pro (Sep 15 2020), where Safari 14 worked as expected.

It seemed that the fix might be as simple as reinstalling Safari 14…but Apple doesn't make it easy to do that, as you can't reinstall an installed update, and they don't include recent Safari versions on their download page.

After some searching, I found MacUpdate's Apple Safari page, which contains direct links to many versions of Safari—scroll down to the section titled "What's New in Apple Safari," expand it, and you'll see download links for Safari versions back to 13.0.3.

I downloaded the Safari 14 installer1And kept a copy, just in case!, let it do its thing, and the problem is solved. The date on the framework I checked now reflects a mid-September date, which matches the same file on the MacBook Pro.

I'm annoyed that Apple's installer didn't report any issues, and I wonder what a "typical" user might have done to resolve this issue—I only got it fixed thanks to Jeff's tip and the installer links on the MacUpdate page. I can't imagine how long I would have had to talk to Apple Support before they figured out that it was a bad Safari install, and not some app or utility or other "you caused this" issue on my Mac.

So thanks, Jeff and MacUpdate, for helping me find and fix this very annoying problem with my Safari install!



Download and track Amazon purchases over time

Dec 18 2020 update: The Amazon export URL appears to be functional again, which is great news. However, the data is in a completely different format than what's provided by the Chrome extension, so it needs to be massaged to work with my spreadsheet. For now, if you want to use my workbooks, keep using the Chrome extension. I'll see about modifying the spreadsheet to work directly with Amazon's data.

Recently I was trying to enter our Amazon purchase details into Quicken—the transactions download automatically, but they're generically assigned to "Shopping." I was using Amazon's order history page to match transactions and assign categories, but it was slow and painful going given the layout of the orders page.

I thought there must be a simple way to download your Amazon purchase history—once downloaded, I could use a spreadsheet to search my transactions. As it turns out, there is a way, but it's far from simple. Nonetheless, after way too much work, I now have an Excel workbook that makes it very easy to find any of our historical transactions. I enter a year and amount on my Search sheet, and any matches appear immediately:

Getting from "this should be possible" to "it works!" was (as usual) more of a challenge than I anticipated, but it is now working as I wished.

[continue reading…]



Two silly solutions for creating numeric passcodes

This morning, I was reading about Henrique Prange's friend's stolen iPhone, and the financial damage the thieves inflicted in only a few hours time—yikes! I've got six-digit codes on all my iOS devices, which suddenly felt like not nearly enough.

I also deleted all my iCloud info from the saved website passwords, as explained in Kirk McElhearn's article for Intego. There are some good recommendations there.

Then I set out to change my iOS passcodes…and me being me, I made it way more complicated than it needed to be. But first, a bit about passcodes on iOS…

[continue reading…]



Another way to open stock charts from mop in Terminal

On Sunday, I posted about my geeky solution to my non-functional Stocks Dashboard widget in Mojave. Then earlier today, I crafted a way to view one of the tracked stock's charts with a mouse click.

A commenter asked if there were any way to view the charts using a built-in tool, as purchasing Keyboard Maestro for just this one task is expensive (and a waste of Keyboard Maestro's capabilities). And in reality, when I first started working on my solution, I started in Automator…but quickly grew frustrated by its inability to do even basic text manipulation.

But then today, I remembered I can use AppleScript in Automator to work with the text, and the solution came together quickly after that: A new Service that appears when you right-click on text in a Terminal window:

[continue reading…]



View charts for stocks in the mop Terminal app

Yesterday, I noticed that the Stocks Dashboard widget in Mojave was no longer working. I couldn't find a similar (small window, always there, only stock prices) app that did what I wanted, but I did discover mop, a Go program that runs in Terminal. Using mop and Terminal's ability to save a window layout, I was able to craft a solution that worked for me.

Then commenter smayer97 asked…

Any solution to replace the mini-graphs at the bottom of the old Dashboard widget?

I didn't pay much attention to the graphs in the widget, so I hadn't considered them in my solution. And there's no way I was going to find a tidy graphing solution that also worked in Terminal. What I came up with isn't quite as convenient as having the graphs available at all times, but it's pretty close—I just have to click on a ticker symbol while holding down some modifier keys:

As you might have guessed, this is powered by a Keyboard Maestro macro, and I love how well it works.

[continue reading…]



Go old school Terminal for stock quotes

My main machine is still running Mojave, and will be for some time—our accounting app and my scanner both rely on 32-bit code. For a very long time, I've been using the built-in Stocks widget from the Dashboard (something else that's gone in 10.15) to track stocks I own or am interested in following.

I have two displays, so I just dedicate a small corner on one of them for the Dashboard widget, which I detach from the Dashboard using an old but still functional Dashboard devmode hint. The Stocks Dashboard widget is quite narrow, and not all that tall, so it didn't take a lot of space.

But recently, it broke, as you can see in the image at right. I set out looking for a replacement—just a simple desktop app that would open a window with stock quotes. Apple's own Stocks app doesn't meet my needs—it has a huge News area you can't close. Similarly, the Stocks section of the Today area in Notification Center requires mouse movement and action on my part to see.

I took a look at any number of third-party apps, but all of them were either full-blown stock traders/managers, lived in the menu bar or Dock, or were discontinued. I finally found what I was looking for, not in a desktop application, but in mop—an open source Go program—running in Terminal.

After a bit of setup work, here's what I'm now seeing1While I wish I had bought a lot of these years ago, I didn't—these are just some sample stocks on my desktop:

Yes, the window is slightly wider than my old one2It's actually incredibly wide, but I don't need to see the other columns, but it's not as tall, and I was able to find a spot for it. If you'd like to try mop yourself, setup is relatively simple.

[continue reading…]



Send URLs to a video download app via Automator

When I find things I enjoy watching on YouTube, sometimes I want to download them—because they may go away, or I may want to watch offline. There are any number of tools out there that will do this for you, including web sites and Mac-specific apps. On the Mac side, I had been using 4K Video Downloader, but recently found VIDL, which had one big advantage for me: It comes with a Safari toolbar icon.

When I see a video I want to keep, I click the VIDL toolbar button, and VIDL launches and downloads the video. (Because it's based on the open source youtube-dl, VIDL supports a lot more sites than does 4K Video Downloader, which is also nice.)

But recently, I noticed that some of the videos I downloaded with VIDL were at 640x360 resolution, even though the source on YouTube was at least 1920x1080. I tried those same URLs in 4K Video Downloader, and I was able to download the full HD versions. There aren't many settings in VIDL, so I didn't see any obvious way to force it to get higher resolution versions1youtube-dl is supposed to get the highest-resolution version automatically, so I switched back to 4K Video Downloader…but I really missed the handy toolbar button.

It's not like it was a lot of work to copy a URL, switch to 4K Video Downloader, and paste, but it was just enough work to get annoying. If I had the skills, writing a basic extension like this for Safari should be pretty simple. But as I don't have the skills, I went looking for another solution, and I found one using Automator:

I created a new Service in Automator that sends URLs to 4K Video Downloader via the contextual menu in Safari's URL bar.

[continue reading…]



How to securely hide worksheet(s) in an Excel workbook

Important note: Please see the comments—the method I discuss here is secure from casual users. However, the Excel files are just zipped XML files, so it's possible to unzip them and open them with a text editor. When I tested with my dummy salary worksheet, I could see individual salary values, but no actual text—so there wasn't any way to associate a salary with a person. Still, the following should be considered as only a semi-safe solution.

My wife wants to create a budget spreadsheet for the various departments in her company to use. Each department would have their own tab, showing their planned yearly budget by month for the coming year. A super-simplified and unrealistic input worksheet might look like this:

The green areas are the portions that the users would fill out—probably not the department heads, but just someone in the department. Which leads to the problem: There's a worksheet called Salary Info that's used to populate the Salaries line in the workbook. (In my silly example, I just divided the total salary into four equal quarters.)

The problem is that the Salary Info worksheet contains salary information for the entire organization, and this isn't information that should be shared with everyone.The Salary Info sheet might reveal, for instance, that a coworker is leaving in three months—the coworker has told management, but the employee isn't ready to tell the entire company just yet.

So how can you distribute the workbook to all the departments, with the salary info intact, but without revealing that data to everyone?

[continue reading…]



See exactly when an app launched

Update: I guess I should have searched here before I posted this—I wrote up another solution a few years ago, and that one includes a Keyboard Maestro implementation. Whoops! As this one's another method, though, I'll leave it up.

I was working on some stuff for our upcoming Usher 2 release, and needed to know how long Usher had been running. A quick web search found this post, where one of the comments had an answer that works well in macOS:

ps -p pid -o lstart=

Replace pid with the process ID (PID) from ps -ax for the app or process in question, and you're done. But it's possible to make it even easier to use by automating the task of getting the process ID. Here's what I came up with:

ps -p `ps ax | grep [U]sher$ | cut -c 1-5` -o lstart=

The bit between the backticks gets the matching process line from ps, then uses cut to keep just the first five columns, which contain the PID.1When the shell encounters backticks, it processes the commands within those backticks before processing the rest of the command—in this case, the backticked command returns the PID.

[continue reading…]



Quickly create a nested folder structure via Terminal

Have you ever needed to create an empty folder structure with many levels of repetitively-named folders? This doesn't happen a lot, obviously, but if you try using Finder for this task, you'll quickly discover it's really tedious. But a quick trip to Terminal makes the task very fast, and it's not overly complicated.

Let's say you need a folder structure to handle reports that you'll be receiving weekly, but need to keep track of over both quarters and years. One way to handle that would be with a folder structure like this:

(Hopefully obviously, the same structure repeats within each separate year's folder.) Creating that many multi-leveled folders in Finder would be time consuming and tedious. But in Terminal, you can create the entire structure with just one command:

mkdir -p 202{0..5}/qtr{1..4}/week{1..13}

That command takes under a second on my iMac to create the entire directory structure (over 330 folders). Zoom! So how does this work?

[continue reading…]