Unable to add Apple Pay wallet after restoring a Time Machine Backup

I had a new 2016 MacBook Pro with Touchbar that had ApplePay on it and was being backed up via TimeMachine. 1 month after I had it (December 23rd), it completely died and Apple issued a full refund. I placed a new order and received a new 2016 MacBook Pro with Touchbar. After I restored the TimeMachine backup, I went to ApplePay to add my cards again (via system preferences). I got a message stating "Apple Pay is already configured on this disk for another Mac." It gives the option to "Reset Apple Pay and Add Card...". After I click that and authenticate with my password or fingerprint (tried both ways many times), it goes back to the same popup so it looks like it's not fully resetting ApplePay.


Basically, I need to kill the existing ApplePay data and reset it so I can use it on the new Mac. This is a bug and I had a ticket opened but the senior technician has stopped responding to me because he does not have a solution.

The Apple ticket is *******

<Personal Information edited by Host>

MacBook Pro (15-inch, Late 2016), macOS Sierra (10.12.4)

Posted on Apr 21, 2017 1:13 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 28, 2018 4:14 PM

To resolve this issue, it requires a little bit of playing with the filesystem so here's the obligatory warning: THIS IS MESSING WITH SYSTEM FILES. DO NOT EXECUTE ANY OF THIS IF YOU ARE NOT SURE WHAT YOU ARE DOING AND DO NOT HAVE A BACKUP OF YOUR DATA. TYPING THE COMMANDS WRONG MAY CAUSE SERIOUS ISSUES WITH YOUR MAC.

If you recently had your Macbook Pro (Touch Bar) repaired (possibly with a logic board replacement), and restored from Time Machine backup, you might find yourself unable to use Apple Pay on Mac. The system will report “Apple Pay is already configured on this disk for another Mac” and ask you to “Reset Apple Pay and Add Card”. If you try to do so by authorizing it using fingerprint or password, it will immediately drop you back to the original “Apple Pay is already configured on this disk for another Mac” prompt, going back into this cycle ad infinitum.

The issue is that there is an Apple Pay cache at /private/var/db/applepay/ on the system that has been invalidated, but it seems to be unable to delete this cache properly. It will keep trying to refresh this cached data, and fail to do so.

To fix this endless loop, you need to first clear out all the files (but not the folders) inside /private/var/db/applepay/. Open Terminal.app and enter the following commands:

In the terminal app, type the following commands:

sudo -s

mv /private/var/db/applepay/Library/Caches/* ~/.Trash/

mv /private/var/db/applepay/Library/Preferences/* ~/.Trash/

pkill seld; pkill nfcd;

Explanation of the commands:

sudo -s (will actually get you to a root shell - note that the password is the same as your system)

mv commands (will moves the staled files in the trash)

pkil commands (will kill the related cache servers)

Then:

– Wait a few seconds for the relevant servers to boot themselves up again. Then, go back to System Preferences, hit Add Card…

– It will fail the first time with a mysterious error. That’s fine. Hit Add Card again…

– On this second try, it will say “Apple Pay is already configured on this disk for another Mac”.

– When you hit “Reset Apple Pay and Add Card” for the final time, it will actually break past the loop, and you will get to re-enter your Apple Pay card information without further issue.

It’s a relatively easy fix. Let's hope that Apple will fix this in an upcoming MacOS release.

45 replies

Jun 11, 2017 9:58 AM in response to rumpadunk

If you have a backup of the "applepay" folder before before you set up, maybe that would work. I'm not sure how easy it would be to copy across while keeping the permissions as carbon copy cloner does.

I didn't have that option as I had Apple Pay set up before my logic board packed in and didn't backup the "applepay" folder before restoring from my pre-failure backup.


I actually tried to perform a non-fresh re-install of macOS. It didn't work. I assume you'd have to format your partition and re-install a completely fresh copy, and then manually install and bring everything across from a backup. That would be a nightmare!

Jun 12, 2017 5:29 AM in response to mpt-matthew

mpt-matthew and rumpadunk,


As I stated earlier, using mpt-matthew's shared Apple Pay folder didn't work for me...likely because of unique attributes associated and assigned on a per-machine basis. However, I followed mpt-matthew's entire process to fresh install MacOS on another partition, ccc the folder over to my current install, and boom, it worked beautifully. The steps he laid out were meticulously beautiful and worked like a charm.


Wow, and to think I was SO CLOSE to install a fresh version of MacOS on my system over something that could very well be fixed by Apple. I agree with Mpt-matthew's recommendation in that the "Reset Apple Pay and Add Card" button needs to be fixed to perform the equivalent of what this remediation accomplishes...especially since most (if not ALL) of us are getting our Macbooks and Logic Boards replaced due to a manufacturing defect (Apple's Fault!).


Well done, mpt-matthew...great investigative and troubleshooting work! Thank you!

Jun 12, 2017 5:20 PM in response to mpt-matthew

Another solution, slightly easier if you have parallels.


Backup

Install macOS in a new parallels VM.

Install parallels tools

Open Terminal in the VM

Type:

sudo cp -r /private/var/db/applepay /Volumes/SharedFolders/Home/

(I think SharedFolders is correct from memory...if not, type 'ls /Volumes/' to see a list of directories in Volumes, the Shared mount being one)


On the host mac, in Terminal


sudo mv /private/var/db/applepay{,2}

sudo mv ~/applepay /private/var/db/

sudo chown -R _applepay:_applepay /private/var/db/applepay

sudo pkill seld

sudo pkill nfcd

Open Apple pay and add a card. I got an error the first time, but the second time it worked as normal, including adding a card after a reboot, and the cards appear in Safari.


In fact it might work just copying the applepay directory from another Mac, moving it in place, and running

sudo chown -R _applepay:_applepay /private/var/db/applepay

sudo pkill seld

sudo pkill nfcd

Oct 28, 2017 8:54 AM in response to John Benninghoff

I opened 'Terminal' and inputed the steps that John Benninghoff suggested and Apple Pay is now working. There are a couple of notes based on how Terminal responded to each step.





  1. cd /private/var/db (Worked)
  2. sudo mv -i applepay applepay.old (Terminal replied that 'no file exists' but I continued inputing the steps)
  3. sudo mkdir -p applepay/Library/Preferences (Worked)
  4. sudo chown -R _applepay:_applepay applepay (Worked)
  5. sudo pkill seld (Worked)
  6. sudo pkill nfcd (Worked)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Unable to add Apple Pay wallet after restoring a Time Machine Backup

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.