Tangram
Tangram copied to clipboard
Not able to change user-agent in WhatsApp
Trying to switch to user-agent to Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0
.
By writing the command navigator.userAgent
in the console the output shows that the user-agent is still the same.
Tangram version
1.3.2
Linux distribution
Fedora 35
Flatpak version
1.12.2
Desktop environment
GNOME 41.1 Wayland
Can you please try if it works in Edit tab instead of Add tab?
Can you please try if it works in Edit tab instead of Add tab?
I had already tested this and just tested it again to certify. It continues using the default user-agent. :/
I'm not sure, I might have same problem with Soundcloud, can't confirm yet.
How did you get to that debug view? Like this ? >>
gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true
GTK_DEBUG=interactive ./run.sh
if yes, I think it's clearer to say debug in README.md. Anyway, not what I'm on a deadline, I'll check this out later
Do you get anything helpful in the terminal when reproducing the issue?
FYI - you need to reload the tab for the change to take effect
@naim5am
How did you get to that debug view? Like this ? >>
That's the GTK Inspector, the view in the screenshot is the web inspector - you can access it with <Ctrl>Shift+I
I can't reproduce. Please try again with Tangram 1.14 available on Flathub.
I can't reproduce. Please try again with Tangram 1.14 available on Flathub.
Quite weird that. I've actually tested it in many possible ways. I have already uninstalled it with the --delete-data flag to ensure that there is no remnant of the old version, I installed version 1.4.0 which is available on Flathub and finally, besides creating a new tab, I edited it as suggested in your last comment.
The result remains the same. Could you show a video of you playing the same?
edit: it's quite strange because it's just not working with Whatsapp.
https://user-images.githubusercontent.com/19673/142770361-0534cce0-250f-47c9-b7b5-5571d8816ab6.mp4
Ok I think I have found the issue - looks like WebkitGTK has a special user agent quirk for WhatsApp.
Can I ask why you need to change the user agent on WhatsApp ?
For reference
https://github.com/WebKit/WebKit/blob/249d5fd6931d4730efda9e89676591ac3fa02993/Source/WebCore/platform/UserAgentQuirks.cpp#L101
A simple solution would be to disable quirks when user provides a custom user agent but those quirks are usually there to fix problems so I'm not sure it's such a good idea.
Can I ask why you need to change the user agent on WhatsApp ?
It won't allow attaching photos, videos or recording voice notes unless it recognizes the browser as one of either Google Chrome, Firefor or Opera. Has anyone managed to record voice notes or send photos on WhatsApp via Tangram?
Taking pictures or recording audio won't work with Tangram anyway - no matter the user agent.
Maybe try Epiphany if it supports it - then it should be trivial to add to Tangram.
Does it still not work?