Do more on the web, with a fast and secure browser!

Download Opera browser with:

  • built-in ad blocker
  • battery saver
  • free VPN
Download Opera

Starting from Opera 64 onAuthRequired does not work for XHR requests

  • Steps to reproduce the problem:

    1. Extension has following listener in background page:
      chrome.webRequest.onAuthRequired.addListener(onAuthChromeHandler, {urls: ["<all_urls>"]}, ["asyncBlocking"]);
    2. Permissions contains "proxy", "storage", "webRequest", "webRequestBlocking", "notifications", "<all_urls>"
    3. Make a request with XHR with Basic Auth challenge (or set a proxy with proxy auth challenge and make a xhr request)

    What is the expected behavior?
    onAuthChromeHandler can provide credentials for the basic auth challenge.

    What went wrong?
    onAuthChromeHandler is called but provided credentials are ignored.

    Did this work before?
    Yes, opera 63 works just fine

    Does this work in other browsers?
    Yes, Chrome works as expected and same behaviour as Opera 63

    I have made a simple extension to demonstrate this bug:
    https://drive.google.com/open?id=1jSygBV1c-dY88ZTRoIlKBEQg122lvNWh
    This extension basically makes a xhr request to a url with basic auth challenge

    1. Download extension and install it on Opera 64 or Opera 65

    2. Open background page

    3. Wait 5 seconds until xhr request is made

    4. On Opera 64/65 you will see that every 5 seconds you will get 401 which means onAuthRequired was not able to answer the challenge

    5. RUN the same extension on Opera 63 and it works without any issue (Also on Chrome no problems)

    We have currently a extension with 1 million active users using this combination. And it does NOT work on Opera anymore (Starting from Opera 64).
    It seems like Bug Regression. On Opera 63 and Chrome it works without problems.

  • Any update on this? This seems to be a significant bug at least for extension which use this kind of auth.

  • Is anybody reading these forum posts from Opera Devs? Or is this the wrong place for reporting Regression bugs.

Log in to reply