Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cca prepare failing at first hurdle (cordova-plugin-background-app) #595

Closed
g105b opened this issue Oct 7, 2015 · 4 comments
Closed

cca prepare failing at first hurdle (cordova-plugin-background-app) #595

g105b opened this issue Oct 7, 2015 · 4 comments

Comments

@g105b
Copy link

g105b commented Oct 7, 2015

After using cca create, I now change directories to the deployment and type cca prepare. Here is the output:

cca prepare
cca v0.6.0
## First-time build. Detecting available SDKs:
Android Development: SDK configured properly.
## Running Cordova Command: platform add android
Creating Cordova project for the Android platform:
    Path: platforms/android
    Package: com.your.company.AppName
    Name: AppName
    Activity: MainActivity
    Android target: android-21
Copying template files...
Android project created with cordova-android@4.0.0-dev
## Updating plugins based on manifest.json
## Running Cordova Command: plugin add cordova-plugin-background-app cordova-plugin-blob-constructor-polyfill cordova-plugin-chrome-apps-bootstrap cordova-plugin-chrome-apps-common cordova-plugin-chrome-apps-i18n cordova-plugin-chrome-apps-navigation cordova-plugin-chrome-apps-runtime cordova-plugin-chrome-apps-storage cordova-plugin-crosswalk-webview cordova-plugin-customevent-polyfill cordova-plugin-file cordova-plugin-inappbrowser cordova-plugin-network-information cordova-plugin-statusbar cordova-plugin-whitelist@1.0.0 cordova-plugin-xhr-blob-polyfill org.chromium.cca-hooks
npm http GET http://registry.cordova.io/cordova-plugin-background-app
npm http 404 http://registry.cordova.io/cordova-plugin-background-app
/home/g105b/.nvm/versions/v0.12.7/lib/node_modules/cca/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/lockfile/lockfile.js:46
      throw er
            ^
Error: 404 Not Found: cordova-plugin-background-app
    at RegClient.<anonymous> (/home/g105b/.nvm/versions/v0.12.7/lib/node_modules/cca/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:268:14)
    at Request.self.callback (/home/g105b/.nvm/versions/v0.12.7/lib/node_modules/cca/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:148:22)
    at Request.emit (events.js:110:17)
    at Request.<anonymous> (/home/g105b/.nvm/versions/v0.12.7/lib/node_modules/cca/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:876:14)
    at Request.emit (events.js:129:20)
    at IncomingMessage.<anonymous> (/home/g105b/.nvm/versions/v0.12.7/lib/node_modules/cca/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:827:12)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

FYI, here is the app's manifest.json:

{
  "manifest_version": 2,
  "name": "AppName",
  "version": "1",

  "icons": {
    "128": "icon-128.png"
  },

  "permissions": [
    "http://example-url-that-needs-loading/*"
  ],

  "app": {
    "background": {
      "scripts": ["cca-runtime.js"]
    }
  },

  "minimum_chrome_version": "40"
}
@g105b
Copy link
Author

g105b commented Oct 8, 2015

I moved to Apple Macintosh to deploy to iOS instead, assuming my PC targeting Android was set up incorrectly... same issue on Apple.

Here's the output of cca prepare:

Gregs-MacBook-Air:cca-deploy g105b$ cca prepare
cca v0.6.0
## First-time build. Detecting available SDKs:
Android Development: JDK not found. Failed to run: /usr/libexec/java_home
iOS Development: SDK configured properly.
## Running Cordova Command: platform add ios
iOS project created with cordova-ios@3.8.0
## Updating plugins based on manifest.json
## Running Cordova Command: plugin add cordova-plugin-background-app cordova-plugin-blob-constructor-polyfill cordova-plugin-chrome-apps-bootstrap cordova-plugin-chrome-apps-common cordova-plugin-chrome-apps-i18n cordova-plugin-chrome-apps-navigation cordova-plugin-chrome-apps-runtime cordova-plugin-chrome-apps-storage cordova-plugin-crosswalk-webview cordova-plugin-customevent-polyfill cordova-plugin-file cordova-plugin-inappbrowser cordova-plugin-network-information cordova-plugin-statusbar cordova-plugin-whitelist@1.0.0 cordova-plugin-xhr-blob-polyfill org.chromium.cca-hooks
npm http GET http://registry.cordova.io/cordova-plugin-background-app
npm http 404 http://registry.cordova.io/cordova-plugin-background-app
/Users/g105b/.nvm/versions/node/v0.12.7/lib/node_modules/cca/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/lockfile/lockfile.js:46
      throw er
            ^
Error: 404 Not Found: cordova-plugin-background-app
    at RegClient.<anonymous> (/Users/g105b/.nvm/versions/node/v0.12.7/lib/node_modules/cca/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:268:14)
    at Request.self.callback (/Users/g105b/.nvm/versions/node/v0.12.7/lib/node_modules/cca/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:148:22)
    at Request.emit (events.js:110:17)
    at Request.<anonymous> (/Users/g105b/.nvm/versions/node/v0.12.7/lib/node_modules/cca/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:876:14)
    at Request.emit (events.js:129:20)
    at IncomingMessage.<anonymous> (/Users/g105b/.nvm/versions/node/v0.12.7/lib/node_modules/cca/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:827:12)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)
Gregs-MacBook-Air:cca-deploy g105b$ 

@g105b
Copy link
Author

g105b commented Oct 8, 2015

FYI, I have this same issue when trying to do cca prepare on the helloworld example found in https://github.com/MobileChromeApps/mobile-chrome-app-samples.

Here is what I did to break things:

git clone git@github.com:MobileChromeApps/mobile-chrome-app-samples.git
cd mobile-chrome-app-samples/
cca create cca-deploy --link-to=helloworld/manifest.json
cd cca-deploy
cca prepare

@agrieve
Copy link
Member

agrieve commented Oct 14, 2015

Looks like you're running cca v0.6.0. Can you try updating to the latest (v0.7.4) and try again?

@g105b
Copy link
Author

g105b commented Jun 29, 2023

I haven't been able to find a version > 0.6.0 yet and it's been a while. Have a nice day.

@g105b g105b closed this as completed Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants