-
Notifications
You must be signed in to change notification settings - Fork 193
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
[Bug]: WhatsApp wrong message count #230
Comments
Update : the count isn't stuck at 88 but starts at this number and increments. I now have two messages so it now shows 90 |
@victorbnl Is this something you would be able to debug? As this would be really hard to debug without experiencing the same issue. |
It is indeed. I tried to understand how the script works and it seems that it:
The issue could be that not only is the new message count a span[aria-label], the name and last message excerpt are too So for each chat But again this is from my understanding of how the script works. Also maybe it would help to know what |
I can confirm that before, only the message count for each conversation had a
@victorbnl Updating the selector in the script to |
Just to shed some light, until about 5 minutes ago I've been using Ferdi. This particular issue was the reason I've looked into Ferdi again and realized it's unmaintained and found this project. EDIT. Whoops, seems like you guys have figured that out as well 😂 Sorry |
I have two conversations with phone numbers which start by respectively 33 and 55 which sum is indeed 88, so I can confirm this is the issue! |
I have the same issue. I get a 3 or 4 digit number of unread messages, in reality it is 0. The number changes when I scroll through my contact list. |
Exactly ... I can confirm as soon the message start with a number that number is added to the unread counter of the whatsapp icon. When I archive that specific chat the unread counter disappears again (because it is zero). Tried to apply the fix as being suggested nathanaelhoun but I couln't get it to work. I run Ferdium on a mac and I edited the file whatsapp.tar.gz in directory /Applications/Ferdium.app/Contents/Resources/app.asar.unpacked/recipes but that didn't solve the problem. |
@ursie If you want to apply it without building, you can modify the file in |
afaik see and test this fix works for me. I have scrolled through my conversations and the unread counter stays on the number as it should be. |
Thank you! That worked for getting rid of the fake numbers. |
I found out the issue also happens if:
Archiving conversations with these cases solves the issue for now. |
If you don't want to archive your chats, you can also add the people to your contact list from whom you received that last message. |
I'm using this fix in webview.js const unreadSpans = parentChatElem.querySelectorAll('span[aria-label]:not(span[aria-label=""])'); |
i'm sorry, i did not pay attention |
@leandrogehlen How did you apply the latest version of the recipe? Did you have to clone it locally? |
Hmm, it should show a blue dot as indirect message anyway...
@calvinwyoung It has been shipped on the last nightlies but if you are using the stable release and want that fix in before the next update for you, you can modify the |
I have tried |
I have tried to update manually to v3.4.7 but it is quite confusing to determine how many and which are the exact files that I have to edit/replace. I have done it following the link, but it doesn't work, it doesn't mark the number of unread messages, so I have to go back to the second manual fix that worked for me, posted by @ysoudy above |
How do we get this fix? (Without needing to manually change values) |
At the moment you can't just update the recipe directly at the moment (cf my previous answer about that). So either you wait for the release or you get your hands just a bit dirty by updating the @akatarmo The best way is to take the updated |
Hi, @Alphrag Thanks, everything is fine now, with the file you have put in the link. https://github.com/ferdium/ferdium-recipes/blob/main/recipes/whatsapp/webview.js I don't know where the hell I copied-pasted a webview.js with 98 lines (when it should have 80) that I understood was the new one. |
Thank you, the fix from the PR seems to be working so far. One question: now that I have manually updated my recipe, will it still auto-update on the next release ? If not, what must I do to go back to stock once the release version has the PR ? |
When you update the app, it looks at the version of all the services you are using and compare them with the version packaged within the app. If the packaged version is higher, it will replace the files of the local recipe with the one from the app. So, as long as you do not change the version number in the |
Hi guys. WhatsApp has stopped working today for me on Ferdium. Although I try to reload, I can't connect, it keeps waiting for the dot code for login. I have removed the service and added it again, the problem persists. However, if I set WhatsApp as Custom Service, everything is fine, can login with de dot code, but I don't have the unread message notification in the Windows status bar (neither in the Ferdium WhatsApp icon service, at left). Does anyone else have this problem? |
Hello, thanks for answering @nathanaelhoun This receipe 3.4.8 #247 fixed the logging problem, but the wrong message counter problem came back again. After installing and uninstalling several times, finally with receipe 3.4.7 it works again, I don't know how or why. |
I'm reopening this issue given that I too have the same problem with the message count again with the latest recipe (3.4.8). |
Have you also tried updating the webview.js as @akatarmo suggested? (Link is this one https://github.com/ferdium/ferdium-recipes/blob/main/recipes/whatsapp/webview.js) One I had to replace was in this directory |
Hey @hakanalpp thank you for trying to help out! After talking with @Alphrag and @vraravam I concluded that this was a problem with my local, manly related to some toggle being off which previously wasn't (this is an known issue that users will face in the next stable release most likely). As a future reference for anyone checking this issue, make sure you have this toggle on! I'm closing this issue back again as the cause of the issue is not related to the WA message count. |
the fix has worked for me on windows 10 and 11 (change line 19 in webview.js to const unreadSpans = parentChatElem.querySelectorAll('span[aria-label]:not(span[aria-label=""])'); ) Version: 6.2.0 |
seems like new recipe also counting Archived chat. |
I am still dealing with this issue (I see a badge with “927”). I think I have done all the right things:
The problem appears to be that the WhatsApp service settings says “Recipe version 3.4.5”, when at least 3.4.7 is required for this to be fixed. Considering I’m on the current version of Ferdium, why do I not have the latest recipies? I actually uninstalled/re-installed Ferdium to see if that would do it, but no luck. The console has a lot of messages about Ferdium. I could help diagnose if I knew what to look for. In particular, these four lines repeat every 5 seconds:
Copying the latest webview.js contents into my local one “fixed” it, but the problem I’m concerned about is not having current recipes in general. How do I know if they’re out of date (without having to look up a bug)? Is it possible to force a fetch of the new versions and get an error if updating them fails? |
Recipes are bundled within the Ferdium installer and so are auto-upgraded only with each new nightly/beta/stable release of the app. There's a discussion thread about decoupling this behavior so that the recipes can be independently released and upgraded without having to upgrade the app itself. As with other ideas, there aren't any contributors who are working on this atm |
Thank you! I found a solution on my MacBookPro M1 in Sonoma. Go to folder: Rename file webview.js as webview._old.js Download & replace file with this file: webview.js Restart Franz. Good Luck for all!! |
Preflight Checklist
Ferdium Version
6.2.1-nightly.39
Recipe Name
whatsapp
Recipe Version
3.4.6
Last Known working version of the recipe
No response
Steps to reproduce
Just create a WhatsApp service and use it I guess (I think it's due to updates to the website and not specific to my setup)
Expected Behavior
The message count shows the correct count which is in my case 0 messages
Actual Behavior
The message count shows 88 messages
Screenshots
Additional Information
No response
The text was updated successfully, but these errors were encountered: