Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8393993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:57:01+00:00 2026-06-09T19:57:01+00:00

I am trying to create my first chrome extensions, here is my manifest.json {

  • 0

I am trying to create my first chrome extensions, here is my manifest.json

{
    "name": "share2twitter",
    "version": "0.1",
    "manifest_version": 2,
    "browser_action":{
        "default_icon": "icon.png",
        "default_popup": "index.html"
    },
    "background": {"page": "index.html"},
    "permissions": [
        "https://www.googleapis.com/*",
        "tabs"
        ],
    "content_scripts": [{
        "matches": [ "http://*/*", "https://*/*" ],
        "js": [ "jquery.min.js","index.js" ]
    }],
    "content_security_policy": "script-src https://www.googleapis.com/urlshortener/ 'self'; object-src 'self'; connect-src https://www.googleapis.com/"

}

https://github.com/kracekumar/share2twitter/blob/master/manifest.json and in debug mode I get the following error .

Refused to load script from 'https://www.googleapis.com/urlshortener/v1/url?callback=jQuery17108621194534935057_1344774835421&{%22longUrl%22:%22https://groups.google.com/a/chromium.org/forum/?fromgroups' because of Content-Security-Policy.

I looked into reference for mappy, stackoverflow.com and google official docs, nothing worked out. So I am asking help here.

Expected behaviour:
When I click on the extension , it tries to connect to goo.gl url shortner and displays alert box.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:57:03+00:00Added an answer on June 9, 2026 at 7:57 pm

    Paths in source URLs are not allowed in Content Security Policy values. You’ll need to use this in your manifest:

    "content_security_policy": "script-src https://www.googleapis.com 'self'; object-src 'self'; connect-src https://www.googleapis.com"

    A Chromium bug has been filed (and has some ongoing work) to better warn in this situation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create my first hello world described here: http://developer.chrome.com/trunk/apps/first_app.html but I
I am trying to create my first Chrome extension - a duplicate of the
I am trying to create an options page for a Chrome extension. The first
I'm trying to create my first app with AngularJS. It looks neat, but there's
I am trying to create my first custom Print Dialog in C#. I found
I'm trying to create my first data mart. I am creating my dimension table
I am trying to create my first GUI application using (Java + Eclipse +
I'm using opengl and trying to create a first person camera. All examples use
I'm new to NHibernate and trying to create my first mapping. I have created
I am trying to create a crawler that crawl first 100 pages on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.