wtfaremyinitials / osa-imessage

Send and receive iMessages with nodejs
MIT License
324 stars 54 forks source link

Can't read messages on Mojave 10.14.2 #27

Closed Synchroneyes closed 2 years ago

Synchroneyes commented 5 years ago

Hi, I'm using Mojave 10.14.2 and i can't read messages. I get this error: (node:12727) UnhandledPromiseRejectionWarning: Error: SQLITE_CANTOPEN: unable to open database file (node:12727) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:12727) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I'm using the example about imessage.listen().on("message")

otisdog8 commented 5 years ago

You'll need to disable System Integrity Protection or add the executable to the Full Disk Access tab in Security & Privacy > Privacy > Full Disk Access. I think it is because MacOS is now much stricter about access to system files.

dwelch2344 commented 5 years ago

For those looking to turn off System Integrity Protection:

  1. Restart and hold down Command-R to boot into Recovery Mode.
  2. Click Utilities.
  3. Select Terminal.
  4. Type csrutil disable.

Alternatively, I found adding both my Node binary, as well as my terminal, to Full Disk Access seemed to be enough for most dev