Cordova error: Failed to fetch plugin

I just successfully updated an old Meteor 1.6.x app to Meteor 1.10.2. This app uses Meteor packages that reference Cordova packages via Cordova.depends. The packages are on Github, so I reference them with a Github URL:

  "com.concats.cordova-plist-patches": ""

According to the Meteor docs, this should still work:

However, if I try to run the app on my iPhone, the build crashes with this error message:

 While adding plugin
   to Cordova project:
   Cordova error: Failed to fetch plugin                                      via registry.
   Probably this is either a connection problem, or plugin spec is incorrect.

The commit link seems to be valid, but still… What is interesting here is that the /tarball part of the URL has been dropped.

I tried to set the URL to this link instead:

but this resulted in this error:

Meteor no longer supports installing Cordova plugins from arbitrary tarball URLs. You can either add a
   plugin from a Git URL with a SHA reference, or from a local path. (Attempting to install from

which is funny because the docs tell you otherwise. At least it is unclear to me what an “non-arbitrary tarball URL” should be?

Also, adding .git to the link does not work```

In this case, I get the fetch error again. Where exactly can I find the documentation how a “Git URL with a SHA reference” has to look like?

1 Like

Update, as a reference for others.

The only workaround I found so far:

  • Add the Cordova plugins as sub-modules to my project. I’m using the /imports folder for this, assuming it won’t be packaged unless the files are referenced from the project, which would be the case for the /private folder.
  • Reference the plugins in .meteor/cordova-plugins directly, as file URLs:

This lowers the modularity benefits you have with Meteor packages, but at least it works.

1 Like