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

Error when running cordova prepare #8

Open
nero120 opened this issue Sep 6, 2017 · 4 comments
Open

Error when running cordova prepare #8

nero120 opened this issue Sep 6, 2017 · 4 comments

Comments

@nero120
Copy link

nero120 commented Sep 6, 2017

Running cordova prepare on a fresh clone of a cordova project that uses your plugin results in the following error:

Failed to restore plugin "com.borismus.webintent" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin com.borismus.webintent@https://github.com/cordova-misc/cordova-webintent.git via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Failed to get absolute path to installed module

Any chance you could fix the plugin definition so we don't have to go hunting through the one hundred and eighty three forks or add yet another one to get this to work? Thanks!

@jab
Copy link
Contributor

jab commented Sep 6, 2017

The error you quoted mentions an issue with the plugin spec in your config.xml, but you didn't include that line from your config.xml.

Here's what we're using: <plugin name="com.borismus.webintent" spec="https://github.com/cordova-misc/cordova-webintent.git#v1.1.0" />

Does that work for you?

As your error message says, it could also be a transient issue with the network connection.

@nero120
Copy link
Author

nero120 commented Sep 6, 2017

Thanks for the quick response, but unfortunately no it results in the same error. My project uses 18 cordova plugins all of which restore without error except for this one, so the problem must be with the plugin definition. Note that to run the plugin I ran the command on your readme, which did not add the version 1.1.0 to the spec url:

cordova plugin add https://github.com/cordova-misc/cordova-webintent.git

It does add successfully but when you run cordova prepare from fresh (i.e. nothing in Platforms or Plugins folder) it fails with the above error.

Try deleting the contents of your Platforms and Plugins folders and then running cordova prepare and see if you get the same error?

@DanielRiera
Copy link

Hi @nero120

Try:
package.json base folder app.

Search "com.borismus.webintent"

replace code to make it look like this
...
"cordova-plugin-whitelist": "~1.2.1", "cordova-webintent": "git+https://github.com/cordova-misc/cordova-webintent.git", "com.borismus.webintent": "https://github.com/cordova-misc/cordova-webintent.git" }
...

Try prepare again

@nero120
Copy link
Author

nero120 commented Dec 6, 2017

Hi @DanielRiera,

apologies for the late response. I made the changes as you suggested, cleared down the platforms and plugins folders, then ran cordova prepare but it still fails when trying to restore the plugin:

Failed to restore plugin "com.borismus.webintent" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin com.borismus.webintent@https://github.com/cordova-misc/cordova-webintent.git via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Failed to get absolute path to installed module

Any other ideas?

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

3 participants