How to test a Chrome App locally?

263 views
Skip to first unread message

张华

unread,
Jun 3, 2014, 4:47:27 AM6/3/14
to chromi...@chromium.org
I've generated a crx package locally. When I drag it into chrome://apps page, Chrome reports a warning 'Apps, extensions, and user scripts cannot be added from this website.'.

If I drag the crx package into chrome://extensions page, it works well on the extensions page. However, I can't see the icon on the apps page. Hence, I'm still not able to launch the app.

I'm wondering if Google has enhanced the security check so that I must upload my app to the Google store and download it from there. Otherwise, I can't launch the app.

Anyone has any ideas? Thanks a lot.

PhistucK

unread,
Jun 3, 2014, 5:06:30 AM6/3/14
to 张华, Chromium Apps
When you load it as an unpacked extension (I know it is an application, but I think it is the same in this regard), does it work?
chrome:extensions
Tick "Developer mode" on the right top corner.
Click on "Load unpacked extension..." and select the folder that contains manifest.json.


PhistucK


--
You received this message because you are subscribed to the Google Groups "Chromium Apps" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-app...@chromium.org.
To post to this group, send email to chromi...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-apps/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

张华

unread,
Jun 3, 2014, 5:24:36 AM6/3/14
to chromi...@chromium.org, yuezhi...@gmail.com
No, it doesn't. BTW, my manifest.json looks like below:

{
   "manifest_version": 2,
   ...
   "background": {
      "scripts": ["main.js"],
      "persistent": false
   },
   "permissions": [
      "storage",
      "webview",
      "fullscreen"
   ],
   ...
}

If I enclose 'background' into 'app' scope like below, I'm able to upload the app in the Chrome://extensions page and is able to see the app in the apps tab.

{
   "manifest_version": 2,
   ...
   "app": {
      "background": {
         "scripts": ["main.js"],
         "persistent": false
      }
   },
   "permissions": [
      "storage",
      "webview",
      "fullscreen"
   ],
   ...
}

But the problem with above manifest.json is I'm not able to package the app into crx on the Linux platform. When I run following command on Linux 64 machine:

/opt/google/chrome/google-chrome --pack-extension=XXX --pack-extension-key=XXX

I always get error "Either 'app.launch.local_path' or 'app.launch.web_url' is required.".

PhistucK

unread,
Jun 3, 2014, 5:30:43 AM6/3/14
to 张华, Chromium Apps
Looks like you have not structured your manifest well.
Look at the various examples at https://github.com/GoogleChrome/ (anything that ends with -app, I guess) for reference implementations.


PhistucK
Reply all
Reply to author
Forward
0 new messages