Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1.5 continuously crashes and restarts every 5 seconds on Mac #40

Closed
CharlesButcher opened this issue Sep 21, 2014 · 38 comments
Closed

Comments

@CharlesButcher
Copy link

Sincere apologies if I'm out of date here, but 1.1.5 is giving me just the same issues as described in #37.

2014-09-21 21:29:04.080 com.apple.launchd[1]: (com.prey.agent[11805]) Exited with code: 1
2014-09-21 21:29:04.080 com.apple.launchd[1]: (com.prey.agent) Throttling respawn: Will start in 8 seconds

Prey.log is not very informative. All it says is:

PREY 1.1.5 spreads its wings!
 Running under Node v0.10.28 with PID 11748 on a ia32 mac system as prey

This is on an ancient Mac mini (early 2009, Intel Core Duo, OS 10.9.5). I also have Prey 1.1.5 on a Mac mini 2011 and it's working fine.

sudo bin/prey config upgrade informs me that 1.1.5 is the latest version. As I said, sorry if I've got this wrong – I can see you are up to 1.2.2, but I'm not capable of compiling my own. In fact the "Try the new beta" link on the control panel still seems to point to 1.1.4…

@tomas
Copy link
Contributor

tomas commented Sep 22, 2014

Hey Charles,

Thanks for the heads up. This is a known bug. We haven't upgraded the links yet because we've been super testing the 1.2.x branch before releasing it publicly.

That said, a few minutes ago we just green lighted version 1.2.3 for public release. 1.2.3 fixes this one as well as numerous other things, as you can see on the Releases section. I can send you the download links in a while so you can try it out.

@tomas
Copy link
Contributor

tomas commented Sep 23, 2014

@CharlesButcher
Copy link
Author

Hi Tomás

Thanks so much! I'm glad I wasn't making a stupid mistake. However, after a successful install and a restart things don't look happy:

2014-09-23 09:31:00.425 shutdown[29159]: reboot by prey: 
2014-09-23 09:31:54.122 com.apple.launchd[1]: (com.prey.agent[67]) getpwnam("prey") failed
2014-09-23 09:31:54.123 com.apple.launchd[1]: (com.prey.agent[67]) Exited with code: 3
2014-09-23 09:31:54.123 com.apple.launchd[1]: (com.prey.agent) Throttling respawn: Will start in 7 seconds
2014-09-23 09:31:58.072 com.apple.launchd[1]: (com.prey.agent) Throttling respawn: Will start in 3 seconds
2014-09-23 09:31:59.165 com.apple.launchd[1]: (com.prey.agent) Throttling respawn: Will start in 2 seconds
2014-09-23 09:32:01.787 com.apple.launchd[1]: (com.prey.agent[119]) Job failed to exec(3). Setting up event to tell us when to try again: 2: No such file or directory
2014-09-23 09:32:01.787 com.apple.launchd[1]: (com.prey.agent[119]) Job failed to exec(3) for weird reason: 2

prey.log is empty. Is there any more information I can send you that would be helpful?

@tomas
Copy link
Contributor

tomas commented Sep 23, 2014

Holy shmoly! That doesn't look good.

The getpwnam line suggests that the prey user doesn't exist. The weird thing is that it should have been successfully created during installation; otherwise you should have received an error and wouldn't have been able to complete the process.

Is there a /tmp/prey-install.log around? What happens if you run id prey from the command line? And what does a ls -al /usr/lib/prey render?

@CharlesButcher
Copy link
Author

Tomás

You wrote:

Is there a /tmp/prey-install.log around?

I don’t think so:

square:tmp geraldine$ ls
launch-XOT2IS       launchd-155.m4qimu
launch-py5zQF       launchd-294.k85OBv
square:tmp geraldine$ ls -a
.           launch-XOT2IS       launchd-155.m4qimu
..          launch-py5zQF       launchd-294.k85OBv

What happens if you run id prey from the command line?

square:tmp geraldine$ id prey
uid=503(prey) gid=80(admin) groups=80(admin),12(everyone),61(localaccounts),401(com.apple.sharepoint.group.1),402(com.apple.sharepoint.group.2),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),398(com.apple.access_screensharing),399(com.apple.access_ssh)

And what does a ls -al /usr/lib/prey render?

square:tmp geraldine$ ls -al /usr/lib/prey
total 8
drwxr-xr-x    4 prey  wheel   136 21 Sep 21:15 .
drwxr-xr-x  250 root  wheel  8500 19 Sep 15:19 ..
lrwxr-xr-x    1 prey  wheel    28 21 Sep 21:15 current -> /usr/lib/prey/versions/1.1.5
drwxr-xr-x    4 prey  wheel   136 23 Sep 09:29 versions

I installed 1.2.3 on the 2011 Mac mini, where 1.1.5 previously seemed to be OK, and  tried the same procedure. There, /tmp/ has an empty file named prey-config-1411462631702.log and timestamped to coincide with the new install. The terminal commands produce pretty much the same results, i.e. we have a user uid=509(prey) and it looks as if 1.1.5 is still the current version.

Charles

On 23 September 2014 at 10:06:36, Tomás Pollak ([email protected]) wrote:

Holy shmoly! That doesn't look good.

The getpwnam line suggests that the prey user doesn't exist. The weird thing is that it should have been successfully created during installation; otherwise you would have received an error and wouldn't have been able to complete the process.

Is there a /tmp/prey-install.log around? What happens if you run id prey from the command line? And what does a ls -al /usr/lib/prey render?=

@tomas
Copy link
Contributor

tomas commented Sep 23, 2014

Hmm, that's weird. Are you sure the installation process went through successfully? Did you get to see the green icon saying "We're all good"?

It would also help to know what are the contents of /Library/LaunchDaemons/com.prey.agent.plist.

@CharlesButcher
Copy link
Author

The installer said everything was fine, but clearly it isn’t. For one thing there is no com.prey.agent.plist on the Mac mini 2009.

Can I uninstall and try again? I tried the uninstaller from 0.6.3, which said it had worked, but it didn’t. I guess 1.1.5 and later versions put different things in different places.

On the other machine – the Mac mini 2011 – I’d guess that com.prey.agent.plist is OK:

ExitTimeOut 5 KeepAlive SuccessfulExit Label com.prey.agent ProgramArguments /usr/lib/prey/current/bin/prey RunAtLoad UserName prey WorkingDirectory /usr/lib/prey/current

On 23 September 2014 at 18:10:57, Tomás Pollak ([email protected]) wrote:

Hmm, that's weird. Are you sure the installation process went through succesfully? Did you get to see the green icon saying "We're all good"?

It would also help to know what are the contents of/Library/LaunchDaemons/com.prey.agent.plist.

@tomas
Copy link
Contributor

tomas commented Sep 23, 2014

Hi Charles,

The plist looks good, but that's the one from version 1.1.5, not the one from 1.2.3 -- which should include a WatchPaths directive, and set an ExitTimeOut of 20 seconds. What OSX version are you running on them? Is it possible that you ran the 1.1.5 installer by mistake, instead of the one from the link I sent?

The 0.6.3 uninstaller will remove files from /usr/share/prey, while the new installer puts them on /usr/lib/prey. If you need to perform a full cleanup, you'd need to run the following commands:

 sudo launchctl unload /Library/LaunchDaemons/com.prey.agent.plist
 sudo rm -f /Library/LaunchDaemons/com.prey.agent.plist
 sudo rm -Rf /usr/lib/prey
 sudo rm -f /etc/prey/prey.conf

Those commands take care of unloading and removing the daemon configuration (com.prey.agent), remove the installed files and finally the configuration file in /etc/prey.

@CharlesButcher
Copy link
Author

Hi Tomás

Thanks. I'm getting out of my depth here, but I think the install script is only partly working.

To simplify matters I'm now working on only one of the two machines (the Mac mini 2011). Going on from what I reported yesterday, I found that /usr/lib/prey/versions/ contained both 1.1.5 and 1.2.3, but /usr/lib/prey/current was pointing to 1.1.5.

So I used all the rm commands you gave, and checked that there was no trace of Prey anywhere. Then I re-installed 1.2.3 and got the green tick.

Now /usr/lib/prey/ looks fine:

  charles:~ charles$ ls -al /usr/lib/prey/versions/1.2.3/
  total 96
  drwxr-xr-x   9 root  wheel    306 22 Sep 23:58 .
  drwxr-xr-x   3 prey  wheel    102 22 Sep 23:59 ..
  -rw-r--r--   1 root  wheel   3699 22 Sep 23:58 README.md
  drwxr-xr-x   4 root  wheel    136 22 Sep 23:58 bin
  drwxr-xr-x   9 root  wheel    306 22 Sep 23:58 lib
  -rw-r--r--   1 root  wheel  35147 22 Sep 23:58 license.txt
  drwxr-xr-x  41 root  wheel   1394 22 Sep 23:58 node_modules
  -rw-r--r--   1 root  wheel   2346 22 Sep 23:58 package.json
  -rw-r--r--   1 root  wheel   1011 22 Sep 23:58 prey.conf.default

But:

  • /private/etc/prey is empty
  • /private/tmp/ contains only prey-config-1411549261060.log, which has the correct timestamp but is empty
  • /Library/LaunchDaemons does not contain com.prey.agent.plist

Can I try to put this right from the Terminal? From your script it looks as if the next step should be a prey config hooks post_install command or some such, but I can't make it work.

@mauricioschneider
Copy link
Contributor

Charles,

You can run the post install hooks as follows: /usr/lib/prey/current/bin/prey config hooks post_install

@CharlesButcher
Copy link
Author

Mauricio

Thank you. The installer did not create a current alias, so I ran sudo /usr/lib/prey/versions/1.2.3/bin/prey config hooks post_install :

  Creating user prey...
  prey user already exists!
  prey already seems to have impersonation privileges. Skipping...
  Creating config dir: /etc/prey
  Touching log file: /var/log/prey.log
  Setting permissions on /usr/lib/prey
  Setting permissions on /etc/prey
  Setting permissions on /var/log/prey.log
  Setting permissions on /usr/lib/prey/versions
  Running "config activate" as prey
  Error! Command failed: env: node: No such file or directory

But node exists in /usr/lib/prey/versions/1.2.3/bin ! I tried aliasing /1.2.3 to current, but that didn't work. Does it have to be a symlink, or does the problem lie somewhere else?

@mauricioschneider
Copy link
Contributor

Yes, it has to be a symlink. sudo ln -s /usr/lib/prey/versions/1.2.3 /usr/lib/prey/current.

It's weird though, because the v1.2.3 installer sets up everything in my case, symlink included.

@CharlesButcher
Copy link
Author

Thanks Mauricio. Symlink now in place, but sudo /usr/lib/prey/current/bin/prey config hooks post_installgenerates an identical error to the one above.

  ls -al /usr/lib/prey/versions/1.2.3/bin 
  total 21792
  drwxr-xr-x  4 root  wheel       136 22 Sep 23:58 .
  drwxr-xr-x  9 root  wheel       306 22 Sep 23:58 ..
  -rwxr-xr-x  1 root  wheel  11152132 22 Sep 23:58 node
  -rwxr-xr-x  1 root  wheel       537 22 Sep 23:58 prey

charles$ /usr/lib/prey/current/bin/node -v
v0.10.32

@CharlesButcher
Copy link
Author

Just confirmed identical behaviour on the other Mac mini (2009):

  • rm x3 as above to delete everything
  • ran 1.2.3 installer and got green tick
  • /usr/lib/prey/versions/1.2.3 / in place but no symlink
  • made symlink to current
  • prey config hooks post_installgives same error message
  • node has same file size and version number

@mauricioschneider
Copy link
Contributor

Does any suspicious log appear in Console when running the installation?

@CharlesButcher
Copy link
Author

I don't think so. prey.log says only:

/bin/sh: /private/var/root/prey.sh: No such file or directory

and if I type "prey" to filter "All Messages" there is nothing apart from the terminal commands I've typed. Nothing for "node" either.

@mauricioschneider
Copy link
Contributor

That's weird. Is that the file /var/log/prey.log? The reference to prey.sh is quite strange, since that's the script of the bash version of Prey (v0.6.3), and is not in any way related to node.

@tomas
Copy link
Contributor

tomas commented Sep 24, 2014

Hi Charles,

Thanks for the patience! I think I know what's going on, thanks to this line when you ran the post_install hooks:

Error! Command failed: env: node: No such file or directory

I'll take a look at this now and let you guys know what I find.

As for the prey.sh error messages, those are probably appearing because of the old crontab line still present. What does a sudo crontab -l render?

@tomas
Copy link
Contributor

tomas commented Sep 24, 2014

Hi Charles,

Thanks to your input we were able to find and exterminate the dreaded bug. We just produced a fresh set of packages that addresses this issue and an additional one spotted by @mauricioschneider. You can download 1.2.4 from this URL:

https://s3.amazonaws.com/prey-releases/node-client/1.2.4/prey-mac-1.2.4-x64.pkg

Let us know how it goes!

@CharlesButcher
Copy link
Author

Tomás and Mauricio

Thanks for all your hard work on this. 1.2.4 is looking much more promising: the Configurator ran as part of the install process, /private/etc/prey/prey.conf is now in place and looks good, /Library/LaunchDaemons/com.prey.agent.plist in place, current symlink to 1.2.4, etc etc. But:

2014-09-25 12:03:43.854 com.apple.launchd[1]: (com.prey.agent[32491]) Exited with code: 1
2014-09-25 12:03:43.854 com.apple.launchd[1]: (com.prey.agent) Throttling respawn: Will start in 4 seconds

Mauricio asked: "As for the prey.sh error messages, those are probably appearing because of the old crontab line still present. What does a sudo crontab -l render?"

sudo crontab -l
*/25 * * * * /private/var/root/prey.sh > /var/log/prey.log 2>&1

Is there a way to kill that?

@mauricioschneider
Copy link
Contributor

Hello Charles,

You can get rid of the crontab entry by running sudo crontab -r.

Could you please attach the content of the file /var/log/prey.log to check if there's any clues regarding the respawn of the process? While doing QA I ran into some issues that would force the process to restart but those were already addressed by Tomás in v.1.2.4.

@CharlesButcher
Copy link
Author

Thanks Mauricio. Some stuff here that might help. Since it keeps refreshing, I had to be quick to copy it. Hope I caught enough :-)

 PREY 1.2.4 spreads its wings!
 Current time: Thu Sep 25 2014 16:00:28 GMT+0100 (BST)
 Running under Node v0.10.32 with PID 61831 on a x64 mac system as prey

 info Thu, 25 Sep 2014 15:00:29 GMT [triggers] Watching: connection, network, power
 info Thu, 25 Sep 2014 15:00:29 GMT [actions] Starting trigger: connection
 info Thu, 25 Sep 2014 15:00:29 GMT [actions] Running: connection
 info Thu, 25 Sep 2014 15:00:29 GMT [actions] Starting trigger: network
 info Thu, 25 Sep 2014 15:00:29 GMT [actions] Starting trigger: power
 info Thu, 25 Sep 2014 15:00:29 GMT [actions] Running: network
 info Thu, 25 Sep 2014 15:00:29 GMT [actions] Running: power
 info Thu, 25 Sep 2014 15:00:29 GMT [control-panel] Queueing check-ins every 20 minutes.
 notice Thu, 25 Sep 2014 15:00:29 GMT [control-panel] Checking for existing port mappings...
 info Thu, 25 Sep 2014 15:00:29 GMT Plugin loaded: control-panel
 info Thu, 25 Sep 2014 15:00:29 GMT 1 plugins loaded with 0 errors.
 info Thu, 25 Sep 2014 15:00:29 GMT Initialized.
 info Thu, 25 Sep 2014 15:00:30 GMT [control-panel] No previously mapped ports found.
 info Thu, 25 Sep 2014 15:00:30 GMT [control-panel] Attempting to map external port 30335
 info Thu, 25 Sep 2014 15:00:31 GMT [control-panel] Port 30335 mapped. Starting push handler.
 critical Thu, 25 Sep 2014 15:00:33 GMT UNCAUGHT EXCEPTION: Cannot read property '1' of null
 info Thu, 25 Sep 2014 15:00:33 GMT Gracefully shutting down. Will self-destruct in 5 secs.
 notice Thu, 25 Sep 2014 15:00:33 GMT [control-panel] Turning off push notifications.
 warn Thu, 25 Sep 2014 15:00:33 GMT [control-panel] Unmapping port 30335 in router.
 info Thu, 25 Sep 2014 15:00:33 GMT [actions] Stopping: connection
 info Thu, 25 Sep 2014 15:00:33 GMT [actions] Stopping: network
 info Thu, 25 Sep 2014 15:00:33 GMT [actions] Stopping: power
 info Thu, 25 Sep 2014 15:00:33 GMT [hooks] Unregistering hooks.
 info Thu, 25 Sep 2014 15:00:34 GMT [control-panel] Succesfully unmapped.

@mauricioschneider
Copy link
Contributor

Thas is indeed helpful. But it would be even more helpful to have the debugging log, here's how to get it:

  1. Unload Prey daemon: sudo launchctl unload /Library/LaunchDaemons/com.prey.agent.plist
  2. Run prey in debug mode: sudo /usr/lib/prey/current/bin/prey -D

If you get something like the following,

The Prey agent is running. Good job!
 It has been live for 79.91 minutes, under process ID 93.
 To trigger actions or retrieve information, log in to your Prey account at https://preyproject.com
 For additional configuration options, please run `prey config`.

then run sudo kill -9 ID, where ID es the id of the process, in this case 93 (which would make sudo kill -9 93) and then repeat the second step. Most likely this won't happen, since the first step should take care of killing the process for you.

After following the previous steps you'll get a nicely syntax highlighted log and you'll have plenty of time to copy/paste it. After you're done, you can close the process by pressing ctrl+C.

Finally, if you want to re-enable Prey's daemon, run sudo launchctl unload /Library/LaunchDaemons/com.prey.agent.plist.

Thanks for all your help and patience in helping us improving Prey :), we really appreciate it.

@CharlesButcher
Copy link
Author

Mauricio

As you'll see, debug mode immediately triggered the log display, and when I tried to kill the process I guess it had already terminated. Anyway, I hope this helps.

  charles:/ charles$ sudo launchctl unload /Library/LaunchDaemons/com.prey.agent.plist
  Password:
  charles:/ charles$ sudo /usr/lib/prey/current/bin/prey -D

    ████████████████ ████████████████ ████████████████ ██            ██
    ██            ██ ██               ██            ██ ██            ██
    ██            ██ ██               ████████████████ ██            ██
    ██            ██ ██               ██               ██            ██
    ████████████████ ██               ████████████████ ████████████████
    ██                                                               ██
    ██                                                 ████████████████

    PREY 1.2.4 spreads its wings!
    Current time: Thu Sep 25 2014 16:15:50 GMT+0100 (BST)
    Running under Node v0.10.32 with PID 67809 on a x64 mac system as root

      error Thu, 25 Sep 2014 15:16:03 GMT Error: socket hang up
       info Thu, 25 Sep 2014 15:16:03 GMT [triggers] Watching: connection, network, power
       info Thu, 25 Sep 2014 15:16:03 GMT [actions] Starting trigger: connection
       info Thu, 25 Sep 2014 15:16:07 GMT [actions] Running: connection
       info Thu, 25 Sep 2014 15:16:07 GMT [actions] Starting trigger: network
       info Thu, 25 Sep 2014 15:16:07 GMT [actions] Starting trigger: power
      debug Thu, 25 Sep 2014 15:16:10 GMT [providers] Fetching active_access_point_name
      debug Thu, 25 Sep 2014 15:16:10 GMT [providers] Fetching private_ip
      debug Thu, 25 Sep 2014 15:16:10 GMT [hooks] Hook triggered: connected
       info Thu, 25 Sep 2014 15:16:10 GMT [actions] Running: network
       info Thu, 25 Sep 2014 15:16:10 GMT [actions] Running: power
      debug Thu, 25 Sep 2014 15:16:10 GMT [control-panel] Sending GET request #1 to https://solid.preyproject.com
       info Thu, 25 Sep 2014 15:16:10 GMT [control-panel] Queueing check-ins every 20 minutes.
     notice Thu, 25 Sep 2014 15:16:10 GMT [control-panel] Checking for existing port mappings...
       info Thu, 25 Sep 2014 15:16:10 GMT Plugin loaded: control-panel
       info Thu, 25 Sep 2014 15:16:10 GMT 1 plugins loaded with 0 errors.
       info Thu, 25 Sep 2014 15:16:10 GMT Initialized.
       info Thu, 25 Sep 2014 15:16:11 GMT [control-panel] No previously mapped ports found.
       info Thu, 25 Sep 2014 15:16:11 GMT [control-panel] Attempting to map external port 30335
       info Thu, 25 Sep 2014 15:16:12 GMT [control-panel] Port 30335 mapped. Starting push handler.
      debug Thu, 25 Sep 2014 15:16:12 GMT [control-panel] Attempt #1 took 2.621 seconds.
   critical Thu, 25 Sep 2014 15:16:13 GMT UNCAUGHT EXCEPTION: Cannot read property '1' of null
      debug Thu, 25 Sep 2014 15:16:13 GMT TypeError: Cannot read property '1' of null
      at Gateway.<anonymous> (/usr/lib/prey/versions/1.2.4/node_modules/entry/lib/index.js:310:65)
      at IncomingMessage.<anonymous> (/usr/lib/prey/versions/1.2.4/node_modules/entry/lib/gateway.js:127:30)
      at IncomingMessage.emit (events.js:117:20)
      at _stream_readable.js:943:16
      at process._tickCallback (node.js:419:13)
      debug Thu, 25 Sep 2014 15:16:13 GMT [control-panel] Fetching instructions...
      debug Thu, 25 Sep 2014 15:16:13 GMT [control-panel] Sending GET request #1 to https://solid.preyproject.com
      debug Thu, 25 Sep 2014 15:16:13 GMT [control-panel] Attempt #1 took 0.496 seconds.
       info Thu, 25 Sep 2014 15:16:15 GMT Gracefully shutting down. Will self-destruct in 5 secs.
      debug Thu, 25 Sep 2014 15:16:15 GMT Unloading plugins.
      debug Thu, 25 Sep 2014 15:16:15 GMT Unloading control-panel plugin...
     notice Thu, 25 Sep 2014 15:16:15 GMT [control-panel] Turning off push notifications.
       warn Thu, 25 Sep 2014 15:16:15 GMT [control-panel] Unmapping port 30335 in router.
      debug Thu, 25 Sep 2014 15:16:15 GMT Stopping actions.
       info Thu, 25 Sep 2014 15:16:15 GMT [actions] Stopping: connection
       info Thu, 25 Sep 2014 15:16:15 GMT [actions] Stopping: network
       info Thu, 25 Sep 2014 15:16:15 GMT [actions] Stopping: power
      debug Thu, 25 Sep 2014 15:16:15 GMT Unloading hooks.
       info Thu, 25 Sep 2014 15:16:15 GMT [hooks] Unregistering hooks.
      debug Thu, 25 Sep 2014 15:16:15 GMT Canceling reports.
      debug Thu, 25 Sep 2014 15:16:15 GMT Unwatching triggers.
      debug Thu, 25 Sep 2014 15:16:15 GMT Cleaning up temporary files.
       info Thu, 25 Sep 2014 15:16:16 GMT [control-panel] Succesfully unmapped.
      debug Thu, 25 Sep 2014 15:16:16 GMT Plugin unloaded: control-panel
       info Thu, 25 Sep 2014 15:16:16 GMT Shutdown complete. Have a jolly good day sir.

  charles:/ charles$ sudo kill -9 67809
  kill: 67809: No such process
  charles:/ charles$ 

@mauricioschneider
Copy link
Contributor

Indeed, once you close the debug mode (ctrl+c), that process in particular is no longer running.

This log is very useful, since it shows exactly where the software is crashing:

at Gateway.<anonymous> (/usr/lib/prey/versions/1.2.4/node_modules/entry/lib/index.js:310:65)
      at IncomingMessage.<anonymous> (/usr/lib/prey/versions/1.2.4/node_modules/entry/lib/gateway.js:127:30)
      at IncomingMessage.emit (events.js:117:20)
      at _stream_readable.js:943:16
      at process._tickCallback (node.js:419:13

Now, we just have to wait for Tomás to show up :), his timezone is UTC-7 if I recall well. Hopefully, he'll have an idea of what might be going wrong or where to look.

@tomas
Copy link
Contributor

tomas commented Sep 25, 2014

Hey guys,

This is an easy bug. That bug is caused by the router not returning a valid response to the 'getExternalIPAddress' command. It's an easy fix, though, since there's numerous other ways around it. I'll get it fixed in a sec.

-- Tom

@tomas
Copy link
Contributor

tomas commented Sep 25, 2014

Just out. This should do it.

https://s3.amazonaws.com/prey-releases/node-client/1.2.5/prey-mac-1.2.5-x64.pkg

Thanks for the inmense patience Charles!

@CharlesButcher
Copy link
Author

Great work!

 PREY 1.2.5 spreads its wings!
 Current time: Thu Sep 25 2014 19:59:49 GMT+0100 (BST)
 Running under Node v0.10.32 with PID 69891 on a x64 mac system as prey

    info Thu, 25 Sep 2014 18:59:57 GMT [triggers] Watching: connection, network, power
    info Thu, 25 Sep 2014 18:59:57 GMT [actions] Starting trigger: connection
    info Thu, 25 Sep 2014 18:59:57 GMT [actions] Running: connection
    info Thu, 25 Sep 2014 18:59:57 GMT [actions] Starting trigger: network
    info Thu, 25 Sep 2014 18:59:57 GMT [actions] Starting trigger: power
    info Thu, 25 Sep 2014 18:59:57 GMT [actions] Running: network
    info Thu, 25 Sep 2014 18:59:57 GMT [actions] Running: power
    info Thu, 25 Sep 2014 18:59:57 GMT [control-panel] Queueing check-ins every 20 minutes.
  notice Thu, 25 Sep 2014 18:59:57 GMT [control-panel] Checking for existing port mappings...
    info Thu, 25 Sep 2014 18:59:57 GMT Plugin loaded: control-panel
    info Thu, 25 Sep 2014 18:59:57 GMT 1 plugins loaded with 0 errors.
    info Thu, 25 Sep 2014 18:59:57 GMT Initialized.
    info Thu, 25 Sep 2014 18:59:57 GMT [control-panel] No previously mapped ports found.
    info Thu, 25 Sep 2014 18:59:57 GMT [control-panel] Attempting to map external port 30335
    info Thu, 25 Sep 2014 18:59:58 GMT [control-panel] Port 30335 mapped. Starting push handler.
    info Thu, 25 Sep 2014 18:59:59 GMT [control-panel] Updating notification ID...
  notice Thu, 25 Sep 2014 19:00:01 GMT [control-panel] Ready to receive push notifications.

Compared to Prey 1.1.3 on my Android phone, the Mac doesn't seem very responsive – the web control panel says it's offline, and I haven't been able to get a test message through. But I guess that's a discussion for elsewhere. Seriously, people, thanks!

@tomas
Copy link
Contributor

tomas commented Sep 25, 2014

Hi Charles,

Looking at your log file, it seems like your router does have push notification support. This means that you should be able to trigger commands in real-time using the new Beta UI. Is this not the case?

And thanks to YOU, by the way!

@mauricioschneider
Copy link
Contributor

Cool! We're glad it's finally working :). Thanks for helping us with it.

Compared to Prey 1.1.3 on my Android phone, the Mac doesn't seem very responsive – the web control panel says it's offline, and I haven't been able to get a test message through. But I guess that's a discussion for elsewhere. Seriously, people, thanks!

It's mainly a UI issue, we are working on the way the connection status of the devices is displayed. Usually, if you send an instructions (alarm, message, screen lock), it should take between 30 seconds to 1 minutes for the device to execute it.

@CharlesButcher
Copy link
Author

Mauricio:

Usually, if you send an instructions (alarm, message, screen lock), it should take between 30 seconds to 1 minutes for the device to execute it.

Tomás:

Looking at your log file, it seems like your router does have push notification support. This means that you should be able to trigger commands in real-time using the new Beta UI. Is this not the case?

When I tried sending a message to my phone, which is connected to the same router, it showed up within a couple of seconds. So I'd say that push is working in that case. And a request for a new location works within 30s or so.

But with the Mac, any request for a location or a message just seems to time out. I'm assuming it should be possible to query the web interface from the machine you're actually searching for?

I also tried 1.2.5 on the 2009 Mac mini ("Why bother to protect this?", I hear you cry) and am not sure it installed properly. The main system log says:

  2014-09-25 20:41:28.421 CoreServicesUIAgent[5629]: Saving rejection record:
  Rejected URL=file:///Users/geraldine/Desktop/prey-mac-1.2.5-x64.pkg
  App URL=file:///System/Library/CoreServices/Installer.app/

and prey.log says only:

 PREY 1.2.5 spreads its wings!
 Running under Node v0.10.32 with PID 5682 on a x64 mac system as prey

and no more. What do you think?

@tomas
Copy link
Contributor

tomas commented Sep 25, 2014

That's pretty weird. What does Console say? Any prey-config log files in /tmp that might give a better idea of what's going on?

@mauricioschneider
Copy link
Contributor

 2014-09-25 20:41:28.421 CoreServicesUIAgent[5629]: Saving rejection record:
  Rejected URL=file:///Users/geraldine/Desktop/prey-mac-1.2.5-x64.pkg
  App URL=file:///System/Library/CoreServices/Installer.app/

This is most likely related to an OS X security feature. Try going to Preferences -> Security & Privacy (click the lock to make changes) and see if the setting "Allow apps downloaded from:" has the "Mac App Store and identified developers" option selected.

@CharlesButcher
Copy link
Author

Tomás:

That's pretty weird. What does Console say?

Only that line about Rejected URL, as above.

Any prey-config log files in /tmp that might give a better idea of what's going on?

No, only a 2-byte prey.pid

Mauricio:

This is most likely related to an OS X security feature. Try going to Preferences -> Security & Privacy (click the lock to make changes) and see if the setting "Allow apps downloaded from:" has the "Mac App Store and identified developers" selected.

Good idea, though that setting was already in place. But I did have to "option-open" the installer because the 2009 Mac mini somehow thought it was not from a registered developer, so something odd is happening. It may be the Mac mini; I bought it only a week ago with 10.9.2 installed (it's now on 10.9.5), and I won't be entirely happy till I've done a clean install. Basically it runs fine but there are one or two network-related behaviours I don't understand.

I have to take a break now and get some paid work done, but I may come back to you on this in a few days if I can't work out what is happening. And as I said, I'm sure Prey is not working properly on the Mac mini 2011, even though we've cracked the install problem. One step at a time, though, and thanks again for your excellent help.

@ghost
Copy link

ghost commented Dec 16, 2014

Hi, @CharlesButcher. Just checking on this. Version 1.3.3 was released a while ago, and I was wondering if you're still having trouble.

@CharlesButcher
Copy link
Author

Fabián

It's good of you to check, but I'm sorry to report that I decided to rely
on Find My Mac when I couldn't get Prey to work. These are old Mac minis
that can't take advantage of Prey's ability to send photos, and the risk of
losing them is small.

If I had a laptop I'd be using Prey for sure :-)

Season's greetings

Charles Butcher
On 16 Dec 2014 20:14, "Fabián Núñez" [email protected] wrote:

Hi, @CharlesButcher https://github.com/CharlesButcher. Just checking on
this. Version 1.3.3 was released a while ago, and I was wondering if you're
still having trouble.


Reply to this email directly or view it on GitHub
#40 (comment)
.

@ghost
Copy link

ghost commented Dec 17, 2014

Sorry to read that, but thanks for letting us know. I'm closing this issue, then.

Please feel free to try Prey again at any time 👍

@ghost ghost closed this as completed Dec 17, 2014
@CharlesButcher
Copy link
Author

Thanks. Prey is protecting two Android phones in this household and I'm
sure I'll be back to the Mac version before too long.

Keep up the great work!

Charles

mobile +44 (0)777 119 3620
On 17 Dec 2014 12:40, "Fabián Núñez" [email protected] wrote:

Sorry to read that, but thanks for letting us know. I'm closing this
issue, then.

Please feel free to try Prey again at any time 👍


Reply to this email directly or view it on GitHub
#40 (comment)
.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants