cannot find chrome extension manifest file

1,118 views
Skip to first unread message

Abdullah Bakhach

unread,
Feb 4, 2017, 2:56:07 PM2/4/17
to Chromium-discuss


background 

I'm learning how to build a chrome extension app, and I'm following the instructions in [this](https://developer.chrome.com/extensions/app_identity) tutorial (you can see my code [here](https://github.com/abbood/chrome-extension-sandbox/tree/3-use-identify-api)). 

The instructions in the [copy key to your manifest](https://developer.chrome.com/extensions/app_identity#copy_key) 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. 

The instructions state that this manifest.json file must exist in the user data directory, in my case (mac):

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

a folder corresponding to my chrome extension app id should show up there

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](https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/identity#readme) 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. 

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 <kbd>Load unpacked extension..</kbd> button. 

consider this (my app is documentivly, and the tutorial app is identity api sample):



If I go to 



    ~/Library/Application Support/Google/Chrome

and search for the folder containing my app's 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.

If I search for the app id of google drive (lmjegmlicamnimmfhcmpkclmigmmcbeh), I find the folder in the `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:

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

returns nothing! 

ideas?




  [1]: https://i.stack.imgur.com/pggsm.png


PhistucK

unread,
Feb 4, 2017, 3:02:42 PM2/4/17
to abdullah...@gmail.com, Chromium-discuss
During development, the application/extension ID is persistent as long as you load the application/extension from the same path, if I remember correctly. So during development, you can just register a Google OAuth application for that ID.
Once you decide to put your application/extension in the Chrome Web Store, you publish it only to testers (or anyone with a link), install it and get the web store generated key using the instructions you followed.

Alternatively, you can pack your application using the "Pack extension" button and install it by dragging the generated file into chrome:extensions. This will generate a key.pem file that you can later re-use for future updates to your locally packed application.


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

Reply all
Reply to author
Forward
0 new messages