andrey-leshenko / WaTracker

Track your friends' and enemies' WhatsApp activity.
MIT License
90 stars 23 forks source link

Not working with contacts without conversation #17

Open lore132 opened 6 years ago

lore132 commented 6 years ago

Hello!

In the case I don't have an open conversation with the contact, it only records the online users when you have opened the contact on smartphone and/or the program itself (WhatsApp Web). So it does not recognize all the updates when the chat it's not opened or not an active conversation.

I guess, this results from updates from WhatsApp itself? Do you have any idea, what to do to get it work again for contacts with no open conversation?

Thanks a lot in advance.

Community1Systems commented 6 years ago

I’m getting again: {"type":"wa_presence_update","value":("id":"xxxxxxxxxx@x.xx","online":true,"time":1525625862}} Message dropped because the port is closed

So no longer recording any number, in the contacts or not

Dit007 commented 6 years ago

My first thought with the contacts was then probably wrong! Must really be on the non-active chat window? As soon as I open a contact without writing a message, and I got him only in the contacts, it keeps track of the number for a while. The contact must have been online at least once in the active window on the smartphone. Only web it's not enough! Thus, there is still hope that there will be a solution to this problem.

Dit007 commented 6 years ago

Is there something new already? Do not you think? I found the following in another post:

Update 06-05-2018: it looks like WhatsApp has changed the API a little. Because of that, the script does not show online / offline statuses. As so as I have the time, I'll look into it '

it works so far with current chats that is already fixed. Just stop if there was no conversation, the "contact" must be permanently open on the phone, then the tracking works. Still missing the "app"

infahash commented 6 years ago

There must be a way to do this. because I had run extension like this on my local pc and on a digitalocean droplet. In middle of april after change of whatsapp extension on my local pc has stopped working because I reload web page every morning. But extension running on my droplet worked for 5 days. then I have to reload whatsapp web because of crash. then the extension on my droplet stopped showing online contacts. so I can guess backend still responding to get online status of contacts without chat initialized. I'm hard working to find solution for this problem. (sorry for my bad English)

jbrocks commented 6 years ago

Found a little workaround: You need to interact with that contact. For example block the contact if you do not want to start a conversation, so WA starts recognizing it. But of course not a real solution :P

Edit: Actually I do not know the code or API, just saw and tried this extension a few minutes ago, but maybe there might be something like a variable for interaction set to "true" or "false".

infahash commented 6 years ago

@jbrocks Thanks for your info. I'm finding a solution to get this done without initializing a chat. I'll try this. but I guess this is not a permanent solution. It can be same thing like open chat window for a contact. It's working only for few minutes. Anyway.... let us know your result.

EDIT : I'm working on this since few days. according to my test, end to end encryption key need to initialized before check that number online or offline

sevetseh28 commented 6 years ago

Been trying to figure it out as well without success. Please if anyone finds a way keep us posted. I already tried opening chat conversation in mobile phone, blocking and unblocking but no online status updated. Only works if end-to-end encryption key is generated. There must be a way to generate it without sending a message...

infahash commented 6 years ago

@karopass If we send message to a person, still we cant get presence info from whatsapp web untill message delivered. because end-to-end encryption key initialize when he received the message.

infahash commented 6 years ago

@karopass Yowsup is not good for me. I got banned too many numbers when using Yowsup. I stop using it then

infahash commented 6 years ago

@karopass @Dit007 Is something happen on whatsapp web. Since few hours Store object and related objects are not available. Is the same thing happen to anyone?

Dit007 commented 6 years ago

R.I.P. Whatsapp tracker i believe?

I used an alternative client. Its called GBWhatsapp. There is a logging function integrated but it's not Really working well I hope that there is another solution for this nice tracker here ...?! An App on the Playstore has announced that the app should run from 01.06 again? Cant belive it so far, after many changes they made in Whatsapp!

Dit007 commented 6 years ago

I use it as an normal user. That's all I got :-/ I hope that the project here find a solution...or some other projects on github...

Edit:Gbwhatsapp it's not an alternative. Because the loging function do not work very well. :-/

Dit007 commented 6 years ago

@karopass Do you get something new already? Thanks for response

mertxkaan commented 6 years ago

They found a good solution

https://github.com/mukulhase/WebWhatsapp-Wrapper/issues/217

Dit007 commented 6 years ago

@mertxkaan Can you help me? I am currently a little confused because I do not know exactly what to do? Do I have to apply the code of karopass in the java console and the normal Whatsapp-Web client? Or must i use the API WebWhatsapp from mukulhase? Would it be possible to implement the whole in this project?

Thanks for the support

infahash commented 6 years ago

@Dit007 open whatsapp web on chrome. then copy paste the code to javascript console and you are done. you can access Store.Wap object as old whatsapp.

Dit007 commented 6 years ago

@InfaSoftLanka @karopass THX for youre help. Im getting it right now but im looking for the online/offline Status. How can we do this to track a number or is this still an issiue? window.Store.Presence.find(nr+ '@c.us').then(function(r){ console.log(r)})" didnt work for me or i make something wrong?!? Nothing show up in the console when i came online with the number i want to track....

infahash commented 6 years ago

@Dit007 Yes. Still we have the same problem. when we use Store.Presence.find() it will not dealing with server. It getting the stored presence model that containing online/offline. the presence model online/offline data updating when web socket receive presence available/unavailable message. to get presence available/unavailable message we have to subscribe that presence model's id. but the problem on whatsapp web is if we subscribe presence model, It will work only if chat initialized.(after change of May) on android if we open chat window for any contact app will subscribe for it and whatsapp web gettting presence available/unavailable message. but it's working only for 10min's after chat initialized and you need to be online on your phone. .........There are Many more things i have found. but no time to tell everything. we are finding solution for this problem.

Dit007 commented 6 years ago

@InfaSoftLanka Thank you for your answer and I hope you will soon find a solution. I also try to find something but first has to get deep into the topic. Are you doing an update here if you know something new or in which subject are you doing that?

Thanks and Greetings

infahash commented 6 years ago

@Dit007 I have tried many things on whatsapp web. but It's a useless thing because their server not responding for whatsapp web calls. So I have moved to reverse Engineering. With gbwhatsapp I get my thing done. but there is an issue with network communication on gbwhatsapp. So I moved to official whatsapp apk and I'm getting bad-token error because they are validating their apk signature. I appreciate if any one here that I can get help.

Dit007 commented 6 years ago

What kind of network error you get on GBWhatsapp. The logging function on GBWhatsapp is working but the same Problem as the normal Whatsapp. You have to open the conversation all the time to get it work properly without communicate with the contact. When you have still a conversation, the logging works correctly. But onley for one Day. Then the app clear the log an starts a new day from beginning :-/ I have tried it with the app that called onLog. This app still work really nice. Bute after the Testperiod you have to buy a License. I hope WhatsClock is comming back. The announced that they will be back on 01.06.18. But when the apps get it, then theire have a soloution for the Problem i think.

Community1Systems commented 6 years ago

Can the following updated scripts match WaTracker’s open issues: https://github.com/LoranKloeze/WhatsAllApp https://github.com/Ronaldo3rw/WhatsAppJava https://github.com/ahll/whatsapp-web-botframework

Community1Systems commented 6 years ago

5 Best Whatsdog Alternative Apps To Check WhatsApp Last Seen https://www.techuntold.com/whatsdog-alternative-apps/

tetradox commented 6 years ago

there must be a solution :-(

Dit007 commented 6 years ago

As far as I know no, no solution so far! Was a really good extension and a pity that so far nothing was found to get this program up and running again :-/

dbarochiya commented 6 years ago

I was trying to use my old project which uses Store.Presence.find( item + '@c.us') but it didn't worked , after some research I found below code in an answer on stack overflow.This works for me but I have to manually enter code into console first and then inject my script.I don't know any technical details , hope you will figure out something.

And one more thing , I am working on ML project in which I need online/offline data of some whats-app users so in case if you are reading this can you please help me out if you already have some data collected or know where can I get it would be great for me.

// Returns promise that resolves to all installed modules
function getAllModules() {
    return new Promise((resolve) => {
        const id = _.uniqueId("fakeModule_");
        window["webpackJsonp"](
            [],
            {
                [id]: function(module, exports, __webpack_require__) {
                    resolve(__webpack_require__.c);
                }
            },
            [id]
        );
    });
}

var modules = getAllModules()._value;

//  Automatically locate modules
for (var key in modules) {
 if (modules[key].exports) {
        if (modules[key].exports.default) {
            if (modules[key].exports.default.Wap) {
                store_id = modules[key].id.replace(/"/g, '"');
            }
        }
    }
 }

}, 5000);

function _requireById(id) {
return webpackJsonp([], null, [id]);
}
// Module IDs
var store_id = 0;
var Store = {};

function init() {
 Store = _requireById(store_id).default;
 console.log("Store is ready" + Store);
}

setTimeout(function() {
 init();
}, 7000);
tetradox commented 6 years ago

@Dhruv34788 @Dit007 @infahash @sevetseh28 @jbrocks online / offline Is there a solution?

Osandakj commented 6 years ago

Hello! If you're looking for something that notifies you when a selected contact (one at a time) is online, this 2 years old script plays an audible alert as well as pushes a browser notification in such event. (Similar to GBWhatsapp but for web) greasyfork[DOT]org/en/scripts/17410-whatsapp-online-notifier/code I'm not quite sure if this works for contacts without conversations though. Neither it keeps track of activity of the past except for notification, and doesn't work with all contacts. Hope it helps in some way. Good day!

dbarochiya commented 6 years ago

@oltanalkan
means I need to know weather at given time user was online or not.

Community1Systems commented 6 years ago

WhatsApp online notifier is an amazing plugin indeed! it works just plain unfortunately on just one contact at a time and no recording thank you for that

Community1Systems commented 6 years ago

So, is Chatwatch the option? Should I subscribe $$$ a package?!

AdamSmith1020 commented 6 years ago

@infahash @karopass Did you find a solution for subscribing to contacts presence without conversation? I have tried everything possible and searched the net but with no success. Could you please share the solution? Many thanks in advance.