← Back to team overview

touch-packages team mailing list archive

[Bug 1509262] Re: Browser stop working while watching a video on Youtube

 

This appears to be a bug in oxide, where the user agent overrides are not used for redirections (e.g. HTTP 302).
I can reproduce locally with the following standalone code:

== server.py ==

#!/usr/bin/python3
# -*- coding: utf-8 -*-

import http.server as http
import threading

class HTTPRequestHandler(http.BaseHTTPRequestHandler):
    def do_GET(self):
        if self.path == "/foo":
            self.send_response(302)
            self.send_header("Location", "http://localhost:8080/bar";)
            self.end_headers()
            self.wfile.write(b"foo")
        elif self.path == "/bar":
            self.send_response(200)
            self.send_header("Content-Type", "text/plain")
            self.end_headers()
            self.wfile.write(b"bar")
        else:
            self.send_error(404)

if __name__ == '__main__':
    server = http.HTTPServer(("", 8080), HTTPRequestHandler)
    server.allow_reuse_address = True
    server.serve_forever()


== client.qml ==

import QtQuick 2.4
import com.canonical.Oxide 1.9

WebView {
    url: "http://localhost:8080/foo";
    context: WebContext {
        userAgent: "default"
        userAgentOverrides: [
            ["^http:\/\/localhost:8080\/foo", "overridden1"],
            ["^http:\/\/localhost:8080\/bar", "overridden2"],
        ]
    }
}

Then run `python3 server.py` in one terminal, monitor network traffic
with e.g. wireshark, and in another terminal run `qmlscene client.qml`.

The request to "/foo" has the first override as expected, but it
redirects to "/bar" and the corresponding request still has the first
override, instead of the second one.

** Also affects: oxide
   Importance: Undecided
       Status: New

** Changed in: webbrowser-app (Ubuntu)
       Status: Confirmed => Invalid

** Summary changed:

- Browser stop working while watching a video on Youtube
+ UA override not used on redirect

** Changed in: oxide
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to webbrowser-app in Ubuntu.
https://bugs.launchpad.net/bugs/1509262

Title:
  UA override not used on redirect

Status in Canonical System Image:
  Confirmed
Status in Oxide:
  Confirmed
Status in webbrowser-app package in Ubuntu:
  Invalid

Bug description:
  How to reproduce on Aquaris E4.5:

  - open the web browser
  - search for a song on google
  - click on a youtube video
  - while page is loading turn up the volume to maximum
  - when page is completely loaded tap on video to make it start

  
  What should happen:
  - music video should start at maximum volume

  What really happens:
  - music video don't start, even if you continue to tap on it

  How to fix:

  - close the web browser
  - open the web browser
  - wait for the page to reload
  - play music video

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1509262/+subscriptions