Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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 Jul 27, 2017 10:30 AM

I discovered that you only need to create the directory structure:


cd /private/var/db
sudo mv -i applepay applepay.old
sudo mkdir -p applepay/Library/Preferences
sudo chown -R _applepay:_applepay applepay
sudo pkill seld
sudo pkill nfcd


You may not even need to do that; just steps 1,2,5,6. When I did try to add a card, I had to log back in to my iCloud account after which everything worked. Based on the contents of the only file in a default install of Sierra, com.apple.stockholm.awd.plist, having macOS create a new file looks like a better idea.

45 replies
Sort By: 
Question marked as Top-ranking reply

Jul 27, 2017 10:30 AM in response to Nick Brook

I discovered that you only need to create the directory structure:


cd /private/var/db
sudo mv -i applepay applepay.old
sudo mkdir -p applepay/Library/Preferences
sudo chown -R _applepay:_applepay applepay
sudo pkill seld
sudo pkill nfcd


You may not even need to do that; just steps 1,2,5,6. When I did try to add a card, I had to log back in to my iCloud account after which everything worked. Based on the contents of the only file in a default install of Sierra, com.apple.stockholm.awd.plist, having macOS create a new file looks like a better idea.

Reply

Jun 11, 2017 3:22 AM in response to rumpadunk

FIXED / SOLUTION


Spent some more time today trying to fix the problem, it does appear to be a problem with the applepay folder I mentioned in my previous post, and some permissions which are required to use it.


Seemingly, I have now completely fixed the problem and I'm able to add new cards and use Apple Pay.


Here is how I did it in detail. Follow at your own risk!


  1. Backup (backup backup backup!) - you shouldn't lose your data, but backup anyway!
  2. Open a copy of these instructions on your phone, or print a copy.
  3. Install a new copy of Sierra on a separate partition:
    1. If you do not have a copy of the macOS Sierra installation package, go to App Store and download it.
    2. Make sure you have at least 25GB disk space free.
    3. Launch disk utility (command+space, then type "Disk Utility")
    4. Click the main disk above the Macintosh HD partition (e.g. APPLE SSD AP102J Media)
    5. Click partition
    6. Click the + at the bottom of the pie chart, change the size to something sensible (e.g. 25-50GB, depending on available space), name the partition something like "TempOS"
    7. Click Apply and wait for it to process
    8. Once downloaded, run the macOS Sierra installation file (located in Applications folder after it has downloaded). Select "Show All Disks" and select the new partition you created.
    9. Run the installation until it starts into the new OS and asks you to complete the setup. You can just make up a user account (e.g. testuser), no need to sign into iCloud or set up Touch ID or anything.
    10. You must complete the setup steps until you can see the desktop.
  4. Restart the machine into recovery mode

    From the new macOS installation, shut down, and then restart with command+R held down to boot into recovery mode.

  5. Launch terminal in recovery (Utilities→Terminal)
  6. Turn system integrity protection OFF (this allows you to modify the files which are causing a problem).

    In terminal type the following (without quotes) "csrutil disable", press enter.

  7. Change the startup disk back to "Macintosh HD" from the new "TempOS" partition. Otherwise each time you restart it will boot the new macOS installation.

    The startup disk picker is in Utilities→Startup Disk.

  8. Restart the machine, login to your account as usual
  9. Download a copy of Carbon Copy Cloner. You can use the free trial, or buy the app (it's great!)

    Download Carbon Copy Cloner | Carbon Copy Cloner | Bombich Software

  10. Show hidden files
    1. Open terminal (command+space, then type "terminal")
    2. Copy and paste (without quotes) "defaults write com.apple.finder AppleShowAllFiles YES", press enter
    3. Restart finder by either holding option and right clicking on the finder icon clicking "relaunch", or type "killall Finder" into terminal.
  11. Launch Carbon Copy Cloner and create a new task. Move to right of screen part of screen.
  12. Launch a Finder window and move to left of screen (side by side with Carbon Copy Cloner)
  13. In Finder, press "Go>Computer" in the menu bar, and open the new partitioned drive ("TempOS"), here you should see all the hidden folders (including one called Private)
  14. Navigate though the folders as follows: Private → var → db
  15. In the db folder, there should be a folder with a red no entry sign called "applepay". Drag this folder into the "Source" box in Carbon Copy Cloner.
  16. Go back to finder and click Go>Computer, then "Macintosh HD", then navigate to the same folder (Private → var → db). This time drag and drop the "applepay" folder into the "Destination" box in Carbon Copy Cloner.

    Double check you are copying FROM the new copy on TempOS to the broken copy on Macintosh HD.

  17. DO NOT be tempted to not use Carbon Copy Cloner and drag and drop / copy & paste the folder instead, this DOES NOT maintain the permissions required for the Apple Pay process to use the folder and it will not work. Only Carbon Copy Cloner copies while maintaining the required permissions.
  18. Make sure you have a backup of your applepay folder (you don't need it but just to be safe):
    1. You may already have a backup of this folder if you have backed up before you started. Alternatively:
    2. Either run another Carbon Copy Cloner task from the Macintosh HD applepay folder to a safe folder (e.g. Desktop). You can then turn SafetyNet OFF.
    3. Or: leave the SafetyNet feature ON. This will make carbon copy cloner create a backup of the file in a folder called CCC_SafetyNet
    4. Again, DO NOT simply drag and drop / copy & paste the applepay folder, it will lose the special permissions.
  19. Run the Carbon Copy Cloner task by clicking "Clone".
  20. Once completed, restart the system into recovery (hold down command+R when the computer is booting up)
  21. Turn System Integrity Protection back ON
    1. In recovery launch terminal (Utilities→Terminal)
    2. Type (without quotes) "csrutil enable", then press enter
    3. Restart the machine, login
  22. Test Apple Pay
    1. Launch system preferences, and go to "Wallet & Apple Pay". Try to add a card there. You may need to sign into iCloud again.
    2. If it works → 🙂, if it doesn't → 😢
  23. Put everything back together again...
  24. Turn hidden files back off
    1. Launch terminal (cmd+space, then type "terminal"),
    2. Copy and paste (without quotes) "defaults write com.apple.finder AppleShowAllFiles NO", press enter
    3. Restart finder by either holding option and right clicking on the finder icon clicking "relaunch", or type "killall Finder" into terminal.
  25. Delete the new macOS partition
    1. Launch disk utility (command+space, then type "Disk Utility")
    2. Click the main disk above the Macintosh HD partition (e.g. APPLE SSD AP102J Media)
    3. Click partition
    4. Click the new "TempOS" partition part of the pie chart
    5. Click the "-" button
    6. Click "Apply"
    7. CONFIRM that it is NOT "Macintosh HD" you are deleting!! → Click "Partition"
  26. Presto, you're done!
Reply

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)
Reply

May 2, 2017 2:39 PM in response to mpt-matthew

Thanks for replying, glad to know it's not just me as not much exists because of it being a new product and the likelihood of this all happening so quick. I was told that internal dev is working on something. Whatever the findings/outcome are, I'll post for you (and all potential future people) to see.

Reply

May 9, 2017 1:39 AM in response to rumpadunk

Exact same issue here. I chatted to Apple support and passed them a link to this discussion. They couldn't find any open tickets relating to it. Has the issue been fixed for you? They couldn't resolve the issue for me and have raised another ticket and I had to send them some engineering logs too. Hopefully it'll get fixed with the next OS update.

Reply

May 9, 2017 5:17 PM in response to rumpadunk

Hi there,


I'm in the same boat. I bought a new macbook pro w/ touchbar and had to get the logic board replaced. I restored from a time machine backup and have the same infinite loop issue that you have when trying to reset apple pay and add a card.


I have contacted Apple support and they said that they are forwarding this issue to their engineers and that it could take a few days. The individual that I spoke to said he hasn't seen / heard of this issue before, so i referred him to this thread.


Have you made any headway on your end dealing with Apple? I'll share here if I find a solution.

Reply

May 9, 2017 5:42 PM in response to rumpadunk

From viewing the console output when this happens, it seems like some record of Apple pay is stored on disk which is triggering the message, but the secure enclave hardware is empty (as it's a new machine) so fails to remove it, so the process fails. If we could determine where the Apple pay configuration is stored we might be able to remove it manually and it would work. I've not got that far yet though.

Reply

May 9, 2017 6:35 PM in response to philimanjaro

Also, just to be clear on what I have tried so far...


- An Apple employee had be sign out of my iCloud account on my computer (System Preferences > iCloud > Sign Out, then once signed out, try to see if i encountered the same Apple Wallet/Pay Issue. It didn't make a difference.


- They had me boot into safe mode and try the same steps as the first method. It didn't make a difference.


- They had me verify that i was running the latest stable MacOS version. (10.12.4 at the time of this writing)

Reply

May 14, 2017 5:47 PM in response to rumpadunk

Any luck yet? My progress with the Apple Care support guys has been halted. It doesn't look like any progress is being made, even though I've encouraged them to look at this thread and figure out the correlation between my issues and the others that have posted here.


I'm not about to wipe my Mac clean and start fresh just to get a built-in Apple function to work...especially when the only reason I am in the position is because the new Macbooks had hardware issues that required repair. I even used Apple's Time Machine for backup and restoring my system (doing everything by the book!)


Definitely frustrating.

Reply

May 28, 2017 4:43 PM in response to rumpadunk

I still have an active ticket open with a senior engineer. He has called me back a few times now with some random things to try, but none of them have worked. It sounds like they don't know the cause of the issue. Fortunately, he said that they are looking at "a few other cases" of people having similar issues, so hopefully, they are all working on ours together to determine the cause.


I'll keep you posted if I hear back with any new news. Thanks everyone for chiming in and keeping us updated.

Reply

May 31, 2017 6:52 PM in response to rumpadunk

Okay all, I have some unfortunate news.


Apple's engineer got back to me and told me that there were TWO options left to try:


- Contact my bank that the credit card for Apple Pay was issued through and have them manually revoke all of my Apple Pay tokens across all my devices.


OR


- Wipe the machine, DO NOT restore from a time machine back. Clean install.



My bank revoked all of the tokens for my Apple Wallet, and that did not make a difference with the error message on my computer. I restarted the computer, I signed out of iCloud and back in, etc...it didn't make a difference.


So now, the only way to fix this after all of this time going back and forth with Apple is by performing a clean install and NOT using Time Machine to assist me. So I can't use Time Machine (Apple Product) to restore functionality of Apple Pay (Apple Product), and I only had to take this Macbook in for repair because of a faulty logic board (Apple's fault).


Wow. Thanks Apple.


Apparently... Logic board replacement == Not being able to use Time Machine to restore your data if you want to maintain use of Apple Pay.


My advice to you guys...if you need a repair on your Macbook, but your Macbook is still functional enough to manually remove the Apple Pay/Apple Wallet settings using System Preferences and Apple ID's website...do that FIRST before creating your time machine backup and before taking it into Apple. My guess is that this would prevent this issue from reoccurring under similar circumstances.


I'm not going to have the time to wipe this system for quite a long time due to my work schedule, either.


I hope the rest of you have better luck with a resolution from the Apple's engineers than I did!

Reply

May 31, 2017 11:03 PM in response to philimanjaro

This is not really acceptable.

I can't see how this is the only solution?


Can you confirm with them that since all new MacBooks (except MBP13 without touchbar) have the SSD attached to the logic board, there is no situation where you could lose your data and not have the logic board replaced?

Not like previously where my HDD could fail and I use time machine to save the day.

If time machine / time capsule product is not compatible with this, would it not create a legal issue of being mis-sold the item.

I understand you can't use time machine on a brand new machine (I.e. After an upgrade), but if all incidents of data recovery equal "new machine", then it renders the product useless.


Where is the Apple Pay data stored? I had my finger print sensor replaced at the same time as the logic board for comparability apparently??


I used third party software to restore as well (carbon copy cloner). There MUST be a file somewhere which is causing the issue - the engineer simply hasn't looked hard enough!

Reply

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.