smartlook / cordova-smartlook

Official Smartlook SDK plugin for Cordova Android and iOS.
https://www.smartlook.com
MIT License
9 stars 6 forks source link

Plugin doesn't install anymore #16

Closed webfletch closed 4 years ago

webfletch commented 4 years ago

Plugin used to install fine but now there is the following error (this also happens when trying to use Ionic AppFlow to build the App which fails to install the plugin when it previously installed without any problems):

Error: Failed to fetch plugin https://github.com/smartlook/cordova-smartlook.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

Tried all of the following and they all return the same error:

cordova plugin add https://github.com/smartlook/cordova-smartlook.git
cordova plugin add @danieleisenhardt/cordova-plugin-smartlook
ionic cordova plugin add https://github.com/smartlook/cordova-smartlook.git
ionic cordova plugin add @danieleisenhardt/cordova-plugin-smartlook
SenNeonoveNoci commented 4 years ago

Hi @webfletch,

you are using some 3rd party made Smarlook plugin @danieleisenhardt/cordova-plugin-smartlook we cannot guarantee this will work.

Our official plugin and installation guide is described here: https://smartlook.github.io/docs/sdk/ionic/

webfletch commented 4 years ago

I am not using a third party plugin, I literally only tried that one because I saw it on another (open) issue on this repository that someone had suggested using instead (I simply listed it as something I have tried because I didn’t want someone suggesting using that which doesn’t work anyway). Your plugin has got the problem and your plugin is the one I am trying to use.

SenNeonoveNoci commented 4 years ago

@webfletch I have tried instaling our Cordova plugin:

cordova plugin add https://github.com/smartlook/cordova-smartlook.git

just like this and everything works fine. Your project is an Ionic project?

SenNeonoveNoci commented 4 years ago

I have researched a bit and found this. Please try using a --nofetch option there might be some compatibility issue between Cordova versions.

webfletch commented 4 years ago

I have managed to resolve this locally on my development PC by running the following to remove the plugin:

npm rm @ionic-native/smartlook
ionic cordova plugin rm cordova-plugin-smartlook

I then deleted any references to SmartLook from my config.xml, package.json and package-lock.json files. Then ran the following to reinstall SmartLook:

ionic cordova plugin add https://github.com/smartlook/cordova-smartlook.git
npm install @ionic-native/smartlook

One thing I noticed after doing the above is that in my config.xml it changed from: <plugin name="cordova-plugin-smartlook" spec="git+https://github.com/smartlook/cordova-smartlook.git" /> To this (notice the removal of "git+" at the start of the URL): <plugin name="cordova-plugin-smartlook" spec="https://github.com/smartlook/cordova-smartlook.git" />

The App still doesn't build within Ionic AppFlow due to an issue with SmartLook but I have contacted Ionic to see if they can shed any light on why this might be.

webfletch commented 4 years ago

On further inspection of the error message within Ionic AppFlow this looks like it is related to CocoaPods, indicating something must have changed relating to CocoaPods within the SmartLook plugin since 17th July 2020 which is the last time I was able to run a successful build using Ionic AppFlow.

webfletch commented 4 years ago

For anyone reading this that is using Ionic AppFlow using the build instance "2020-08-10" which has support for Cocoapods 1.9.0 seems to have resolved the problem:

https://ionic.zendesk.com/hc/en-us/articles/360052827773-2020-08-10-New-iOS-builder-with-Cocoapods-1-9-0-support-