• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    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

    opr.sidebarAction.setIcon API is broken => "Access to extension API denied."

    Opera add-ons
    2
    2
    310
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • stefanvd
      stefanvd last edited by stefanvd

      Hi there,

      I am updating my Opera extensions, Note Sidebar and Page Sidebar. However, I noticed that the API for changing the icon in the sidebar no longer works. Is this the correct API?

      I use Opera: 116.0.5366.21
      My Manifest V3 JavaScript code in the background script:

      opr.sidebarAction.setIcon({ path: "/images/icon38white.png"}, function() {
                  if (chrome.runtime.lastError) {
                    console.error(chrome.runtime.lastError);
                  } else {
                    console.log('Icon changed successfully');
                  }
      });
      

      Doc API: https://help.opera.com/en/extensions/sidebar-action-api/#method-seticon

      Screenshot of the error:
      Screenshot 2025-01-10 at 21.30.59.png

      Thanks,
      Stefan
      Browser extension developer
      www.stefanvd.net

      Reply Quote 0
        1 Reply Last reply
      • Mascot1
        Mascot1 last edited by

        When I call the opr.sidebarAction.setIcon API in a Manifest V3 extension on Mac it completely crashes opera.

        Opera: 116.0.5366.71 (Official Build) Stable (arm64)
        Revision: b25b66d9738c53e7a0c818a29d59179c026b7937-refs/branch-heads/6778@{#4325}
        OS: macOS Version 15.3 (Build 24D60)

        Reply Quote 0
          1 Reply Last reply
        • First post
          Last post

        Computer browsers

        • Opera for Windows
        • Opera for Mac
        • Opera for Linux
        • Opera beta version
        • Opera USB

        Mobile browsers

        • Opera for Android
        • Opera Mini
        • Opera Touch
        • Opera for basic phones

        • Add-ons
        • Opera account
        • Wallpapers
        • Opera Ads

        • Help & support
        • Opera blogs
        • Opera forums
        • Dev.Opera

        • Security
        • Privacy
        • Cookies Policy
        • EULA
        • Terms of Service

        • About Opera
        • Press info
        • Jobs
        • Investors
        • Become a partner
        • Contact us

        Follow Opera

        • Opera - Facebook
        • Opera - Twitter
        • Opera - YouTube
        • Opera - LinkedIn
        • Opera - Instagram

        © Opera Software 1995-