Cordova config.xml problem when used git url in spec

Hi guys,
I’m with problems in the step cordova archive with a plugin that using Git url at config.xml

<widget>
 .....
  <plugin name="newrelic-cordova-plugin" spec="https://github.com/rennanc/newrelic-cordova-plugin.git">
          <variable name="IOS_APP_TOKEN" value="*****" />
          <variable name="ANDROID_APP_TOKEN" value="*****" />
      </plugin>
  <engine name="android" spec="^7.0.0" />
 <engine name="ios" spec="^4.5.4" />
 </widget>

I builded at local, but when i pass to bitrise happened this error:

Discovered plugin “newrelic-cordova-plugin” in config.xml. Adding it to the project
Failed to restore plugin “newrelic-cordova-plugin” from config.xml. You might need to try adding it again. Error: Failed to fetch plugin git+https://github.com/newrelic/newrelic-cordova-plugin.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
–save flag or autosave detected
Saving ios@~4.5.4 into config.xml file …
cordova failed, error: exit status 1
| |
±–±--------------------------------------------------------------±---------+
| x | cordova-archive@1.0.1 (exit code: 1) | 374 sec |
±–±--------------------------------------------------------------±---------+
| Issue tracker: …/github.com/bitrise-community/steps-cordova-archive/issues |
| Source: GitHub - bitrise-steplib/steps-cordova-archive

I not found the solution for the step of bitrise.

1 Like

Thanks for reporting the issue, we’ll check it ASAP! :slight_smile:

2 Likes

The same issue presents itself when loading a plugin from file:

<plugin name="com.mirasense.scanditsdk.plugin" spec="./scandit/scandit-barcodescanner-phonegap_5.5.2" />

Bitrise output:

Discovered plugin "com.mirasense.scanditsdk.plugin" in config.xml. Adding it to the project
Failed to restore plugin "com.mirasense.scanditsdk.plugin" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin file:./scandit/scandit-barcodescanner-phonegap_5.5.2 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

loading if from spec="scandit/scandit-barcodescanner-phonegap_5.5.2" gave the same result

1 Like

for me cordova-plugin-statusbar failed as @ippMobile described. After checking my package.json I saw that the value for this plugin was a git url. I changed it to a version number and then Bitrise succeeded in installing that plugin.

For my local plugin I removed the file: prefix in package.json which fixed the issue for that plugin.

It completes the installation of plugins successfully now :smiley:

1 Like

Thanks for reporting @stevengunneweg! :wink:

@ippMobile can you try this and let us know if it helps?

Unfortunally not, because the NewRelic don’t released any version at github, with this i cant use version in “spec” because the npm cant find it. While this feature is not resolved, i need build this manually. I will try with long way mode, using a pure Mac Machine with bitrise.

@ippMobile can you please copy paste the related bitrise.io build’s URL? We’ll need more log to be able to debug this.

For sure, https://www.bitrise.io/build/40d1728c791476ac

Thanks.

I have the same problem

Failed to restore plugin “cordova-fabric-plugin” from config.xml. You might need to try adding it again. Error: Failed to fetch plugin git+https://github.com/spitfire2903/FabricPlugin.git via registry.

The URL is https://www.bitrise.io/build/ed3b26d2cf4a8bcd

Hello there, could you add --verbose to the Options to append to the ionic-cli build command?
so we could get some more logs and get something useful from the error? because unfortunately the issue you have is not the same as the thread opened :thinking: