WebEngineProfile useragent strange behavior
-
Hello there! I'm trying to run Whatsapp web in a WebEngineView (as a plasmoid), so I changed the useragent:
WebEngineView { id: webview anchors.fill: parent url: "https://web.whatsapp.com" profile: WebEngineProfile{ httpUserAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36" //Chrome user agent } } Button{ id: reload text: "reload" onClicked: { webview.reload() } }
so when I run the plasmoid it correctly shows whatsapp login QR code, I can login and start messaging without a flaw
but whenever I refresh the page clicking the refresh button, it says "whatsapp works with chrome 60+, update your browser"why is this happening? The user agent is still the same because if I go to a site like this it says my useragent is the one I set in httpUserAgent even after reloading
any idea?
EDIT: even if I build a normal QT quick application (not as a Plasmoid) this happens, so it's not a plasmoid problem
-
Hi,
What if you set just chrome as user agent ?
-
That's a bit too short I think. The serial number is missing.
-
@SGaist I tried with
Chrome/103.0.0.0
but I think it does not recognize it, it says immediately to use another browser
that string I put in the first example is my default browser user agent string and on that browser it works fineIt's really strange that it works just until I reload the page, I don't know what could it cause this problem
-
@SGaist I tried with
Chrome/103.0.0.0
but I think it does not recognize it, it says immediately to use another browser
that string I put in the first example is my default browser user agent string and on that browser it works fineIt's really strange that it works just until I reload the page, I don't know what could it cause this problem