简体   繁体   English

找不到chrome扩展清单文件

[英]cannot find chrome extension manifest file

background 背景

I'm learning how to build a chrome extension app, and I'm following the instructions in this tutorial (you can see my code here ). 我正在学习如何构建chrome扩展应用程序,并且正在按照教程中的说明进行操作(您可以在此处查看我的代码)。

The instructions in the copy key to your manifest section states that it's important to keep their application id constant and in order to do that, they must copy the key in the installed manifest.json to the source manifest. 清单密钥复制到清单部分中的说明指出,保持其应用程序ID恒定很重要,为了做到这一点,他们必须将已安装 manifest.json中的密钥复制到源清单。

The instructions state that this manifest.json file must exist in the user data directory, in my case (mac): 指令指出此manifest.json文件必须存在于用户数据目录中,在我的情况下(mac):

~/Library/Application\ Support/Google/Chrome/Default/Extensions

a folder corresponding to my chrome extension app id should show up there 对应于我的chrome扩展应用ID的文件夹应显示在此处

problem 问题

I couldn't find my folder in that directory. 我在该目录中找不到我的文件夹。 By failing to include they key in the manifest file as they did in the chrome identity example then evey time I click on the sign in button, it simply opens a new tab and prompts the user to enter their email/password, but then the extension never gets the token. 由于没有像在chrome身份示例中那样将其包括在清单文件中,然后我没有点击登录按钮,它只是打开了一个新标签并提示用户输入电子邮件/密码,但是扩展名却没有永远不会获得令牌。

what I have tried 我尝试过的

I realized that there are many app id folders that exist on the said directory, but they are only for the apps I installed from google chrome webstore (ie google docs etc).. but not any of the apps I loaded by checking the developer mode checkbox then clicking on the Load unpacked extension.. button. 我意识到在上述目录中存在许多应用程序ID文件夹,但它们仅适用于我从google chrome webstore安装的应用程序(例如google docs等)..但不适用于通过检查开发人员模式加载的任何应用程序复选框,然后单击“ 加载解压的扩展名..”按钮。

consider this (my app is documentivly, and the tutorial app is identity api sample): 考虑一下(我的应用程序是文档化的,而教程应用程序是Identity api示例):

在此处输入图片说明

If I go to 如果我去

~/Library/Application Support/Google/Chrome

and search for the folder containing my app's id: 并搜索包含我的应用程序ID的文件夹:

find . | grep cmfbnommmmeccnkbochkfakncgnebckn

I get 我懂了

3521:./Default/IndexedDB/chrome-extension_cmfbnommmmeccnkbochkfakncgnebckn_0.indexeddb.leveldb
3522:./Default/IndexedDB/chrome-extension_cmfbnommmmeccnkbochkfakncgnebckn_0.indexeddb.leveldb/000003.log
3523:./Default/IndexedDB/chrome-extension_cmfbnommmmeccnkbochkfakncgnebckn_0.indexeddb.leveldb/CURRENT
3524:./Default/IndexedDB/chrome-extension_cmfbnommmmeccnkbochkfakncgnebckn_0.indexeddb.leveldb/LOCK
3525:./Default/IndexedDB/chrome-extension_cmfbnommmmeccnkbochkfakncgnebckn_0.indexeddb.leveldb/LOG
3526:./Default/IndexedDB/chrome-extension_cmfbnommmmeccnkbochkfakncgnebckn_0.indexeddb.leveldb/LOG.old
3527:./Default/IndexedDB/chrome-extension_cmfbnommmmeccnkbochkfakncgnebckn_0.indexeddb.leveldb/MANIFEST-000001
7747:./Profile 1/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn
7748:./Profile 1/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn/def
7749:./Profile 1/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn/def/GPUCache
7750:./Profile 1/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn/def/GPUCache/data_0
7751:./Profile 1/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn/def/GPUCache/data_1
7752:./Profile 1/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn/def/GPUCache/data_2
7753:./Profile 1/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn/def/GPUCache/data_3
7754:./Profile 1/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn/def/GPUCache/index
7793:./Profile 1/Web Applications/_crx_cmfbnommmmeccnkbochkfakncgnebckn
7794:./Profile 1/Web Applications/_crx_cmfbnommmmeccnkbochkfakncgnebckn/Profile 1 cmfbnommmmeccnkbochkfakncgnebckn.app
7795:./Profile 1/Web Applications/_crx_cmfbnommmmeccnkbochkfakncgnebckn/Profile 1 cmfbnommmmeccnkbochkfakncgnebckn.app/Contents
7796:./Profile 1/Web Applications/_crx_cmfbnommmmeccnkbochkfakncgnebckn/Profile 1 cmfbnommmmeccnkbochkfakncgnebckn.app/Contents/Info.plist
7797:./Profile 1/Web Applications/_crx_cmfbnommmmeccnkbochkfakncgnebckn/Profile 1 cmfbnommmmeccnkbochkfakncgnebckn.app/Contents/MacOS
7798:./Profile 1/Web Applications/_crx_cmfbnommmmeccnkbochkfakncgnebckn/Profile 1 cmfbnommmmeccnkbochkfakncgnebckn.app/Contents/MacOS/app_mode_loader
7799:./Profile 1/Web Applications/_crx_cmfbnommmmeccnkbochkfakncgnebckn/Profile 1 cmfbnommmmeccnkbochkfakncgnebckn.app/Contents/PkgInfo
7800:./Profile 1/Web Applications/_crx_cmfbnommmmeccnkbochkfakncgnebckn/Profile 1 cmfbnommmmeccnkbochkfakncgnebckn.app/Contents/Resources
7801:./Profile 1/Web Applications/_crx_cmfbnommmmeccnkbochkfakncgnebckn/Profile 1 cmfbnommmmeccnkbochkfakncgnebckn.app/Contents/Resources/app.icns
7802:./Profile 1/Web Applications/_crx_cmfbnommmmeccnkbochkfakncgnebckn/Profile 1 cmfbnommmmeccnkbochkfakncgnebckn.app/Contents/Resources/en-US.lproj
7803:./Profile 1/Web Applications/_crx_cmfbnommmmeccnkbochkfakncgnebckn/Profile 1 cmfbnommmmeccnkbochkfakncgnebckn.app/Contents/Resources/en-US.lproj/InfoPlist.strings
9484:./Profile 2/IndexedDB/chrome-extension_cmfbnommmmeccnkbochkfakncgnebckn_0.indexeddb.leveldb
9485:./Profile 2/IndexedDB/chrome-extension_cmfbnommmmeccnkbochkfakncgnebckn_0.indexeddb.leveldb/000003.log
9486:./Profile 2/IndexedDB/chrome-extension_cmfbnommmmeccnkbochkfakncgnebckn_0.indexeddb.leveldb/CURRENT
9487:./Profile 2/IndexedDB/chrome-extension_cmfbnommmmeccnkbochkfakncgnebckn_0.indexeddb.leveldb/LOCK
9488:./Profile 2/IndexedDB/chrome-extension_cmfbnommmmeccnkbochkfakncgnebckn_0.indexeddb.leveldb/LOG
9489:./Profile 2/IndexedDB/chrome-extension_cmfbnommmmeccnkbochkfakncgnebckn_0.indexeddb.leveldb/MANIFEST-000001
10348:./Profile 2/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn
10349:./Profile 2/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn/def
10350:./Profile 2/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn/def/GPUCache
10351:./Profile 2/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn/def/GPUCache/data_0
10352:./Profile 2/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn/def/GPUCache/data_1
10353:./Profile 2/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn/def/GPUCache/data_2
10354:./Profile 2/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn/def/GPUCache/data_3
10355:./Profile 2/Storage/ext/cmfbnommmmeccnkbochkfakncgnebckn/def/GPUCache/index

so none of the folders appear in the Default/Extensions directory as instructed by the tutorial. 因此,按照本教程的说明,这些文件夹都不会出现在“ Default/Extensions目录中。

If I search for the app id of google drive (lmjegmlicamnimmfhcmpkclmigmmcbeh), I find the folder in the Default/Extensions 如果我搜索谷歌驱动器的应用程序ID(lmjegmlicamnimmfhcmpkclclmmmmcbeh),则会在Default/Extensions找到该文件夹

2572:./Default/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh
2573:./Default/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0
2574:./Default/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/_metadata
2575:./Default/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/_metadata/computed_hashes.json
2576:./Default/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/_metadata/verified_contents.json
2577:./Default/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/background.js
2578:./Default/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images
2579:./Default/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images/drive-sync16.png
2580:./Default/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images/drive-sync256.png
2581:./Default/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images/drive-sync64.png
2582:./Default/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/manifest.json
5092:./External Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh.json
6552:./Profile 1/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh
6553:./Profile 1/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0
6554:./Profile 1/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/_metadata
6555:./Profile 1/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/_metadata/computed_hashes.json
6556:./Profile 1/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/_metadata/verified_contents.json
6557:./Profile 1/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/background.js
6558:./Profile 1/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images
6559:./Profile 1/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images/drive-sync16.png
6560:./Profile 1/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images/drive-sync256.png
6561:./Profile 1/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images/drive-sync64.png
6562:./Profile 1/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/manifest.json
9027:./Profile 2/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh
9028:./Profile 2/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0
9029:./Profile 2/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/_metadata
9030:./Profile 2/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/_metadata/computed_hashes.json
9031:./Profile 2/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/_metadata/verified_contents.json
9032:./Profile 2/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/background.js
9033:./Profile 2/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images
9034:./Profile 2/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images/drive-sync16.png
9035:./Profile 2/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images/drive-sync256.png
9036:./Profile 2/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images/drive-sync64.png
9037:./Profile 2/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/manifest.json
11067:./Profile 3/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh
11068:./Profile 3/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0
11069:./Profile 3/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/_metadata
11070:./Profile 3/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/_metadata/computed_hashes.json
11071:./Profile 3/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/_metadata/verified_contents.json
11072:./Profile 3/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/background.js
11073:./Profile 3/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images
11074:./Profile 3/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images/drive-sync16.png
11075:./Profile 3/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images/drive-sync256.png
11076:./Profile 3/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/images/drive-sync64.png
11077:./Profile 3/Extensions/lmjegmlicamnimmfhcmpkclmigmmcbeh/3.2_0/manifest.json

What's interesting is that there is no manifest.json to be found anywhere in any of the directories of my installed app.. consider this: 有趣的是,在我已安装的应用程序的任何目录中的任何位置都没有找到manifest.json

~/Library/Application Support/Google/Chrome$ find . grep manifest.json | grep cmfbnommmmeccnkbochkfakncgnebckn

returns nothing! 什么都不返回!

ideas? 想法?

While working on unpacked version you can skip the step for adding the key to your manifest file, but be sure to add the oAuth key to the manifest file and also use the extension key while creating Credentials for the oAuth. 使用解压缩版本时,您可以跳过将密钥添加到清单文件的步骤,但是请确保将oAuth密钥添加到清单文件,并在为oAuth创建凭据时使用扩展密钥。

You can test your extension without uploading it on a webstore. 您可以测试扩展程序,而无需将其上传到网上商店。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM