Ferdi: "WhatsApp works only with Google Chrome 49+" at startup only in Ferdi 5.5.0-gm.2

Created on 19 Apr 2020  ยท  18Comments  ยท  Source: getferdi/ferdi

" are comments from us and won't be
visible in your bug report, so please don't put any text in them.
-->
WhatsApp just continually says "WhatsApp works with Google Chrome 49+"

To Reproduce

Add WhatsApp service
Enable it.

It should allow you to use WA

Screenshots

Desktop:


Debug information: https://debug.getferdi.com/...

Additional context

bug low priority service-specific

Most helpful comment

We have already received reports (#601, #598), identified the issue and are working on it (see #536)).

I will pin this issue though so new users hopefully look into this issue instead of creating a new one every time.

If you are experiencing this issue, please do the following:

  • You will need to change a file in the WhatsApp recipe (no worries, it's simple copy-and-paste - there isn't anything you can do wrong!). If you don't already know where the recipe folder is, following these instructions:

    1. Open Ferdi's settings using the cog in the bottom left corner

    2. In the left sidebar choose "Your services"

    3. Choose your WhatsApp service. If you have multiple ones, choose any one of those - the changes will be used across all instances

    4. Scroll down and click on "Open user.css"

      Screenshot 2020-04-19 at 16 27 04

    5. We don't need the generated "user.css" file - this is just to help you get to the right folder. This should have opened your Finder or File Explorer inside a folder named "whatsapp".

  • Open the "index.js" file inside this folder with any text editor (e.g. text edit on mac)
    Screenshot 2020-04-19 at 16 30 46
    Screenshot 2020-04-19 at 16 32 59
  • Replace the contents of this file with the following code:
"use strict";

module.exports = Franz => class Messenger extends Franz {
  overrideUserAgent() {
    return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36";
  }
};

Make sure that there is no other text in this file except the code above!

  • Save the file and restart Ferdi

Your WhatsApp service should now work again.

All 18 comments

Same here!

We have already received reports (#601, #598), identified the issue and are working on it (see #536)).

I will pin this issue though so new users hopefully look into this issue instead of creating a new one every time.

If you are experiencing this issue, please do the following:

  • You will need to change a file in the WhatsApp recipe (no worries, it's simple copy-and-paste - there isn't anything you can do wrong!). If you don't already know where the recipe folder is, following these instructions:

    1. Open Ferdi's settings using the cog in the bottom left corner

    2. In the left sidebar choose "Your services"

    3. Choose your WhatsApp service. If you have multiple ones, choose any one of those - the changes will be used across all instances

    4. Scroll down and click on "Open user.css"

      Screenshot 2020-04-19 at 16 27 04

    5. We don't need the generated "user.css" file - this is just to help you get to the right folder. This should have opened your Finder or File Explorer inside a folder named "whatsapp".

  • Open the "index.js" file inside this folder with any text editor (e.g. text edit on mac)
    Screenshot 2020-04-19 at 16 30 46
    Screenshot 2020-04-19 at 16 32 59
  • Replace the contents of this file with the following code:
"use strict";

module.exports = Franz => class Messenger extends Franz {
  overrideUserAgent() {
    return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36";
  }
};

Make sure that there is no other text in this file except the code above!

  • Save the file and restart Ferdi

Your WhatsApp service should now work again.

Fixed in v5.5.0-gm.2 ๐Ÿ™

@kytwb :
I got the same error in v5.5.0-gm.2

whatsapp_chrome_bug

But after reloading the service, it started working.

Debug information:
debug.txt

Tested in Windows 10.

@sampathBlam Thanks! I had this happen too, and a service reload works as well. Should we re-open only if it's becoming a blocking issue like it was before (when no reload would fix it)?

@kytwb : I see this happening everytime I start Ferdi. Is it the same for you as well ? If it is the case for everyone, I would recommend to reopen the issue.

@sampathBlam you are right, it's happening everytime I start Ferdi as well.
Re-opened! ๐Ÿ™

@sampathBlam you are right, it's happening everytime I start Ferdi as well.
Re-opened! ๐Ÿ™

Can be reproduced if you disable and the enable the service as well. A temporary dirty fix would be go to back to the set interval loop that was present in the recipe which we removed. But finding the root cause would be helpful

Even placing the User Agent is not working. I use 2 WhatsApps and when one works the other goes back to the 49+ version message.

2020-04-25_18h26_28

I will take this up and provide more inputs.

@kytwb - This issue is addressed in the recipes repo - https://github.com/getferdi/recipes/pull/140

ferdi_603_fix

The overrideUserAgent() hook in recipes set the user-agent header only after the webview has been loaded initially. This is the reason whatsapp works when we reload the service and possibly the recipe developer put in a setInterval(reload(), 1000) hoping that the user-agent would be set correctly during subsequent reloads.

But now, I used the new modifyRequestHeaders() hook that we introduced a couple of days back so that recipes can use it to pass in request headers which will be sent before the actual request is being sent.

For users to test this, this new functionality needs to go into 5.5-gm-3 I guess.

@mahadevans87 Thank you! The modifyRequestHeaders change really is going to unblock a lot of the service-specific issues users were reporting before. I think we can wait for 5.5.0 to ship that fix. One of the feature we want to include in 5.5.0 is https://github.com/getferdi/server/issues/14 so we don't have to release new versions to provide updates to recipes.

Closing for now ๐Ÿ™ It will be fixed in the next release, until then, the fixes above should work for those experiencing the same issue (try manually reloading the service via the WhatsApp icon right-click context menu, or edit the recipe as per https://github.com/getferdi/ferdi/issues/603#issuecomment-616146387).

@mahadevans87 @sampathBlam erratum, my last comment isn't valid anymore, latest update regarding the next release at https://github.com/getferdi/ferdi/issues/536#issuecomment-619562782 ๐Ÿ™

If you still experience problems with whatsapp after 5.5.0 stable, please clear your cache by going to Ferdi settings and restart Ferdi. You might need to re-login to all the services after you clear cache.

@kytwb which makes me think, we should provide a service specific "clear cache" functionality.

@mahadevans87 Agreed. In addition to "clear cache", I think it could be interesting to review what's missing to bring up the service settings on par with all the applicable global settings.

This worked for me thanks!

Currently experiencing this issue
WhatsApp asking for chrome to be updated to 60+

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ammarmalhas picture ammarmalhas  ยท  3Comments

adithshenoy picture adithshenoy  ยท  3Comments

ammarmalhas picture ammarmalhas  ยท  3Comments

sbienkow picture sbienkow  ยท  3Comments

AP-Hunt picture AP-Hunt  ยท  3Comments