Switching into Migration Assistant corrupts BTT settings

Describe the bug
BTT has the option to Inverse scrolling for normal mice only, which I have been using for a while. However, today this feature stopped working for me, which I noticed the by the undesired natural scrolling behavior my mouse exhibited. I navigated into BTT's mouse settings, but the feature was still enabled. Disabling & re-enabling didn't work, neither did restarting BTT or the OS itself. Furthermore, while BTT's main mouse speed settings were still having an effect, the mouse speed while holding [modifier keys] was no longer functional either.

Not sure what else to try, I started messing around with different versions of BTT. After some trial and error, I noticed that the latest BTT version in which scroll inversion worked for me was the latest 2.7xx version (specifically 2.764). Starting with version 2.800, the scroll inversion and mouse speed changing were not working. The currently latest version (2.819) has the same issue, as well as some of the 2.8xx versions in between.

Not sure if this is related. but I also noticed that BTT's Window Snapping feature stopped working sometime on the 2.8xx branch. (Presumably this started with 2.800 too, though I haven't tested this thoroughly.)

Affected input device:

  • Regular (non-Magic) mouse. Specifically Logitech G900, though others exhibited the same behavior.

Device information:

  • Type of Mac: MacBook Pro (15-inch, 2018)
  • macOS version: 10.14.4 (18E226)
  • BetterTouchTool version: 2.800-2.819

Additional information:

  • macOS Scroll direction is set to Natural (System Settings > Mouse and System Settings > Trackpad)
  • Accessibility permissions have been granted for BetterTouchTool (System Settings > Security & Privacy)

Please let me know if there is any additional information I can provide.

window snapping should definitely still be working. Maybe you accidentally disabled it?

Are you sure the 2.7xx versions still work with the inverse scrolling? I thought that was broken by a recent macOS update, but I haven't looked into it yet.

Hey Andres,

Window snapping was definitely enabled, as was scroll inversion. However, I've got another update on this. TL;DR at the bottom if anyone else ever encounters this.

So about an hour ago, both scroll reversing and window snapping now also stopped working again, but while running version 2.764. Upgrading back to 2.8xx did not help; both reverse scrolling and window snapping were still broken. Using the Reset ALL settings button in the app did not fix this either.

What is interesting is the timing when these features stopped working: In both cases, this occurred directly after using macOS's Migration Assistant to transfer data to another machine. The first time, I suppose I was already using a 2.8xx version already. I then downgraded to 2.764, with which the features were working again (even after reboots). When later today I fired up the Migration Assistant to transfer data again and booted back in, both features stopped working again. (Note that I am not talking about the machine I transferred data to; only the machine I was transferring data from.)

I started messing with ~/Library/Application Support/BetterTouchTool. I noticed that after deleting this folder and restarting BTT, both features were working just fine again, both in 2.7xx and 2.8xx. After deleting several files & reverting, I pinpointed the issue to the main data store file, btt_data_store.version_2_819_build_1099.

I have no idea why this file started acting up. It would seem as though using Migration Assistant somehow messed with it? What led me to this conclusion is the following:

  • Initially I was (most likely) already using the latest version. After using the Migration Assistant once, the current data store file presumably got mis-configured in some way. BTT UI still showed window snapping and scroll inversion to be enabled, and toggling either setting would (visually) persist. However, maybe some mis-configuration in the data store file resulted in these features not functioning?
  • When I reverted to a 2.7xx build, I suspect that BTT either reverted to an older (still infact) data store file, or created a new one. Both features started working again! When trying a 2.8xx build, that build might have read the corrupted 2.8xx data store files again, with neither feature working.
  • After switching to the migration assistant again, transferring files, and quitting back out, both features stopped working again. Switching between 2.7xx and 2.8xx didn't help this time, presumably because now the data store for both branches (again though they are version-specific, not branch-specific?) were somehow invalid.

This makes no sense, as Migration Assistant shouldn't be modifying anything. Maybe it has to do with how BTT is shut down when switching into Migration Assistant that causes it to hiccup?

I am also not sure why the Reset ALL settings button did not help, when manually deleting the local settings folder did. I suspect one of two reasons:

  • Either this settings reset feature does not actually reset everything.
  • Or it usually does reset everything by writing to the data store file, but because said file was somewhat mis-configured, it failed to properly reset its content.

I know that the reset button certainly did not fully reset everything. While in the UI all gestures were gone, a hexdump of the data store file still revealed references to trackpad gestures for selected applications I had previously set.

I'll do some more testing to see if I can replicate this. In any case, it would seem that triggering this bug requires a rather rare series of steps or initial configuration.

TL;DR: BTT settings somehow got messed up, causing scroll inversion, window snapping, and likely other features to no longer function. I deleted ~/Library/Application Support/BetterTouchTool, restarted BTT (and re-enabled features if necessary), everything went back to normal.

¯\_(ツ)_/¯

Ah that's very interesting.
Migration assistant has recently caused issues for some users, I think it might have a bug that causes the file permissions to break on some systems and for some files. I'll try to investigate this further.

Okay, this was easier to replicate (and avoid) than expected.

Following the Migration Assistant suspicion, I did the following:

Round 1

  • Fully reset BBT settings by deleting ~/Library/Application\ Support/BetterTouchTool.
  • Start BTT. Features are working.
  • Fully close BBT by using BTT's Close BTT button or hitting CMD+Q.
  • Open Migration Assistant, then hit continue. This will log you out.
  • Once in Migration Assistant, hit Quit, and hit Quit again.
  • Log back into your account.

After the steps above, BTT was still working as expected. Window snapping and scroll inversion were functioning properly.

Round 2

  • Fully reset BBT settings by deleting ~/Library/Application\ Support/BetterTouchTool.
  • Start BTT. Features are working.
  • This time, do not fully close BBT. Instead, only close the window, e.g. via CMD+W.
  • Open Migration Assistant, then hit continue. This will log you out.
  • Once in Migration Assistant, hit Quit, and hit Quit again.
  • Log back into your account.

This time, the features were no longer working. The steps in both cases are identical, with the only difference being that in Round 2 BTT was still running in the background when switching to Migration Assistant. When ls-ing the ~/Library/Application\ Support/BetterTouchTool and comparing before/after, I noticed that:

  • The permissions haven't changed (644, same owner/group).
  • While two of the three data store files for the current version seem to have been untouched, (same modified time), the data store file ending in -wal has clearly been modified; its file size also increased significantly (503K to 616K).

With that in mind, I suspect that this may have to do with how BTT shuts down when Migration Assistant quits all apps and switches the OS into migration mode. Maybe this is something that can be accounted for, but IDK how you would even test for that.