jack-mil / bing-rewards

A script to automate daily Bing rewards points
MIT License
177 stars 23 forks source link

Mobile user agent ignored #30

Closed jack-mil closed 1 year ago

jack-mil commented 1 year ago

For me it still does not work on either Chrome or Brave (Edge seems to ignore completely mobile user agent). Tried to change user agents, still no luck I even ran:

taskkill /f /im "chrome.exe"
taskkill /f /im "brave.exe"

before the script. Browser opens, does searches in mobile view, but I still see 0/60 mobile searches. Maybe agents need to be updated? This is my config:

{
    "desktop-count": 34,
    "mobile-count": 40,
    "load-delay": 1.5,
    "search-delay": 2,
    "search-url": "https://www.bing.com/search?q=",
    "desktop-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 Edg/83.0.478.37",
    "mobile-agent": "Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Mobile Safari/537.36 Edge/18.19041",
    "browser-path": "C:\\Users\\G\\AppData\\Local\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
}

Originally posted by @N190392 in https://github.com/jack-mil/bing-rewards/issues/13#issuecomment-1525170102

jack-mil commented 1 year ago

@N190392 I am bringing this issue into it's own thread so the other does not get polluted. Can you give me some more information about your setup? What operating system and browser versions are you working with? Are the desktop rewards being counted? Anything else unusual about your setup?

N190392 commented 1 year ago
N190392 commented 1 year ago

I did some digging. Okay, so Chromium does not work even when manually launching --user-agent argument. But it detects it correctly. (https://www.whatismybrowser.com/detect/what-is-my-user-agent/). May it be because Chromium is phasing out User Agents for Client Hints (https://developer.chrome.com/articles/user-agent-client-hints/)?

So I did a manual test with Firefox:

  1. about:config
  2. type: general.useragent.override; select: string; +
  3. Value: "Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Mobile Safari/537.36 Edge/18.19041"
  4. Mobile gets counted.

Question for @jack-mil For this to work with Firefox, app would need to get updated. As Firefox does not support User Agent launch argument string, the profiles must be specified. So programs should be launched like this. C:\Program Files\WindowsApps\Mozilla.Firefox_112.0.2.0_x64__n80bbvh6b1yt2\VFS\ProgramFiles\Firefox Package Root\firefox.exe -p "default" C:\Program Files\WindowsApps\Mozilla.Firefox_112.0.2.0_x64__n80bbvh6b1yt2\VFS\ProgramFiles\Firefox Package Root\firefox.exe -p "mobile"

So it requires some setting up. Like making "Mobile" profile

  1. about:profiles
  2. Create a New Profile Mobile
  3. Doing the steps mentioned above for the new profile.

That means that the config file should get 2 new variables (default profile name, extra mobile profile name).

jack-mil commented 1 year ago

I would like to support Firefox as I use that mainly, I couldn't originally because as you mentioned, there is no command line argument for setting the user agent string.

Oddly, I am using the same version of Chrome as you (Version 112.0.5615.138), and I was able to receive mobile award points. Maybe it's an issue on the Bing/ MS account side?

( bing-rewards --mobile --count 1) image

N190392 commented 1 year ago

During testing I also had that suspicion that problem lies on Microsoft's end. Everything worked until it just... stopped without any changes and with mobile UA. And none of the Chromium browsers does the trick, only Firefox. For example, even Bing is different (instead of 150/100/20 like in your screenshot, I have 90/12/60 points available).

jack-mil commented 1 year ago

That is very curious. I have noticed the "rewards level" influences the daily quota. That screenshot is level 2

N190392 commented 1 year ago

IMG_8646 It must be region dependent.

rahul-s-bhatt commented 1 year ago

Hey there, the issue with the mobile agent seems solved if you open Edge and then manually end that task. Then you spin up the mobile agent via parameters with a count of 2-3 to check if it works (usually does for me).

jack-mil commented 1 year ago

Interesting observation. You can use the --nowindow and --noexit args to go along with this. Strange how Edge is acting

gdwnldsKSC commented 1 year ago

disregard. taskkill fixed.

jack-mil commented 1 year ago

Closing this for now, but pinning for future reference if anomalies keep cropping up.