Note: attempting to run this from now on might result (eventually) in a ban of your phone number used in the PoC of using WhatsApp. The code has not been updated for over a month now, which results in easier detection by WhatsApp.
WhatsSpy Public might stop tracking due to some unforseen reason. This will show up in the timeline page, this is why you need to keep a look on this page.
ConnectionException: Connection Closed!
There can be various reasons for a "connection closed" error. One of the most common problems is a unreliable internet connection, bad hardware or a busy network.
If it keeps disconnecting with this message in a short timespan, this will probably be due to WhatsApp, you can fix this in the following ways:
A very common solution is to disconnect for 24 hours. After this timespan start the tracker again and wait at least 4 hours before trying to shut it down again (in case it keeps happening). Most of the time this fixes the problem.
Make sure you run update 1.5.5 or higher (which has some error handling and communication improvements).
Open /var/www/whatsspy/api/data.php and change 'keep-alive' => 20]; to a lower value (like for example 'keep-alive' => 10];. Save file and restart the tracker (Rpi image users: bash /home/pi/whatsspy-public-startup, normal users: screen -r, kill tracker (Ctrl + c) and start it again).
If none of these problems helped you can silence the connection errors, for this you need to set/add $whatsspyErrorHandling = ['ignoreConnectionClosed' => true]; to your config.php. These connection errors will cause some inaccurate tracking but tries to immediate re-connect to WhatsApp (and also prevent large amount of tracker closed messages in the timeline).
Either the phonenumber is wrong, secret is wrong or your account has been disabled by WhatsApp. Make sure you do not need use a free SMS service. You need a legitimate phonenumber. Also make sure you entered your phonenumber correct.
Try to re-generate the secret and verify the phonenumber:
Insert your number and secret in $whatsappAuth.
number needs to be without any prefix 0's. 0031 06 xxx becomes 31 6 xxx (no 0's prefix for both the country code and phonenumber itself).
number may only contain digits. Spaces, plus or any other special character are NOT accepted. Example: 316732174 is correct
secret You obtained this in the chapter 2.3) Retrieve the secret for a secondary WhatsApp account.
If you are sure that the information is correct, and you retried to register, try to use another phone number. It is very likely that your account has been banned.
LoginFailureException after a long succesfull tracking session
You might have a temporary account ban from WhatsApp. It is advised to use two accounts so that you can switch between accounts if you get this error. Switch to another account or stop the tracker for at least one day and try again.
Tree length did not match received length!
Restart the tracker. If this does not work wait a few hours and try again. This is an unknown problem caused at WhatsApp side.