Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

313
Views
Chrome Extension "Uncaught Type Error: Cannot read properties of undefined (reading 'query') error". query property there was a mistake

I am trying to develop an extension for chrome. I did the necessary operations in the Process.js file. The codes worked but I got an undefined query error. This error did not prevent the code. There was a problem only in the share part in Google Slides. what do you think is the reason?

The system is working, but how can I prevent that warning?

Please help me.

Share google slides button not working. It works when I remove the plugin.

process.js

chrome.tabs.query({active: true, lastFocusedWindow: true}, tabs => {
    let url = tabs[0].url;
    url = url.replace('//', ';;').replace(/[/]/g, ';');
    let pageTitle = tabs[0].title;
    pageTitle = pageTitle.replaceAll("'", '*');
    pageTitle = pageTitle.replaceAll('"', '**');
    pageTitle = pageTitle.replace('//', '__').replace(/[/_]/g, '_');

});

google Slides and chrome extension image

chrome extension error log image

manifest.json

{
  "name": "DergiPark",
  "description": "This is a DergiPark Product. Powered by DergiPark.",
  "content_scripts": [
    {
      "js": [
        "/js/jquery.min.js",
        "/js/alert_util.js",
        "process.js"
      ],
      "css": [
        "/css/bootstrap.css"
      ],
      "matches": [
        "http://*/*",
        "https://*/*"
      ]
    }
  ],
  "version": "1.0",
  "manifest_version": 3,
  "background": {
    "service_worker": "background.js"
  },
  "icons": {
    "48": "icons/DP-02.png",
    "128": "icons/DP-02.png"
  },
  "action": {
    "default_icon": {
      "16": "icons/DP-02.png",
      "24": "icons/DP-02.png",
      "32": "icons/DP-02.png"
    },
    "default_popup": "popup.html"
  },
  "permissions": [
    "activeTab", "tabs"
  ]
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I tried the whole process by changed. I moved the js codes to background.js and the error was resolved.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!