Wikitude / wikitude-cordova-plugin

Wikitude's Augmented Reality Plugin for Cordova - working together with the Wikitude SDK library for Android and iOS. Provides image recognition and tracking, geo-based augmente reality and 3D rendering and animations in an augmented reality scene
https://www.wikitude.com
Other
199 stars 182 forks source link

npm install error #122

Closed pauwlsky closed 4 years ago

pauwlsky commented 7 years ago

First off, thanks for all your hard work

Recently I started getting an error on npm install. The install will hang locally, hasn't timed out yet. On Buddy build I am getting an error specific to cloning this repo though:

basically repeating:


    npm ERR! git clone /Users/buddybuild/.npm/_git-remotes/git-https-github-com-Wikitude-wikitude-cordova-plugin-git-e8ff2c50 /var/folders/hw/gvtl1ld52tg2d734kysw_s900000gn/T/npm-1617-f2f8e780/git-cache-36989b51/e6130cfd448ea0fb3e1f6021dfe2d6fba269be37: done.

    npm ERR! git clone /Users/buddybuild/.npm/_git-remotes/git-https-github-com-Wikitude-wikitude-cordova-plugin-git-e8ff2c50 /var/folders/hw/gvtl1ld52tg2d734kysw_s900000gn/T/npm-1617-f2f8e780/git-cache-36989b51/e6130cfd448ea0fb3e1f6021dfe2d6fba269be37: Downloading src/ios/WikitudeSDK.framework/WikitudeSDK (215.25 MB)

    npm ERR! git clone /Users/buddybuild/.npm/_git-remotes/git-https-github-com-Wikitude-wikitude-cordova-plugin-git-e8ff2c50 /var/folders/hw/gvtl1ld52tg2d734kysw_s900000gn/T/npm-1617-f2f8e780/git-cache-36989b51/e6130cfd448ea0fb3e1f6021dfe2d6fba269be37: Error downloading object: src/ios/WikitudeSDK.framework/WikitudeSDK (82f972165026b14650f5176f5c32274b1125d447617b80cb3ce48f9b3eef0f92)

    npm ERR! git clone /Users/buddybuild/.npm/_git-remotes/git-https-github-com-Wikitude-wikitude-cordova-plugin-git-e8ff2c50 /var/folders/hw/gvtl1ld52tg2d734kysw_s900000gn/T/npm-1617-f2f8e780/git-cache-36989b51/e6130cfd448ea0fb3e1f6021dfe2d6fba269be37: 

    npm ERR! git clone /Users/buddybuild/.npm/_git-remotes/git-https-github-com-Wikitude-wikitude-cordova-plugin-git-e8ff2c50 /var/folders/hw/gvtl1ld52tg2d734kysw_s900000gn/T/npm-1617-f2f8e780/git-cache-36989b51/e6130cfd448ea0fb3e1f6021dfe2d6fba269be37: Errors logged to /private/var/folders/hw/gvtl1ld52tg2d734kysw_s900000gn/T/npm-1617-f2f8e780/git-cache-36989b51/e6130cfd448ea0fb3e1f6021dfe2d6fba269be37/.git/lfs/objects/logs/20170714T155619.297071621.log

    npm ERR! git clone /Users/buddybuild/.npm/_git-remotes/git-https-github-com-Wikitude-wikitude-cordova-plugin-git-e8ff2c50 /var/folders/hw/gvtl1ld52tg2d734kysw_s900000gn/T/npm-1617-f2f8e780/git-cache-36989b51/e6130cfd448ea0fb3e1f6021dfe2d6fba269be37: Use `git lfs logs last` to view the log.

    npm ERR! git clone /Users/buddybuild/.npm/_git-remotes/git-https-github-com-Wikitude-wikitude-cordova-plugin-git-e8ff2c50 /var/folders/hw/gvtl1ld52tg2d734kysw_s900000gn/T/npm-1617-f2f8e780/git-cache-36989b51/e6130cfd448ea0fb3e1f6021dfe2d6fba269be37: error: external filter git-lfs smudge %f failed 2

    npm ERR! git clone /Users/buddybuild/.npm/_git-remotes/git-https-github-com-Wikitude-wikitude-cordova-plugin-git-e8ff2c50 /var/folders/hw/gvtl1ld52tg2d734kysw_s900000gn/T/npm-1617-f2f8e780/git-cache-36989b51/e6130cfd448ea0fb3e1f6021dfe2d6fba269be37: error: external filter git-lfs smudge %f failed

    npm ERR! git clone /Users/buddybuild/.npm/_git-remotes/git-https-github-com-Wikitude-wikitude-cordova-plugin-git-e8ff2c50 /var/folders/hw/gvtl1ld52tg2d734kysw_s900000gn/T/npm-1617-f2f8e780/git-cache-36989b51/e6130cfd448ea0fb3e1f6021dfe2d6fba269be37: fatal: src/ios/WikitudeSDK.framework/WikitudeSDK: smudge filter lfs failed

    npm ERR! git clone /Users/buddybuild/.npm/_git-remotes/git-https-github-com-Wikitude-wikitude-cordova-plugin-git-e8ff2c50 /var/folders/hw/gvtl1ld52tg2d734kysw_s900000gn/T/npm-1617-f2f8e780/git-cache-36989b51/e6130cfd448ea0fb3e1f6021dfe2d6fba269be37: warning: Clone succeeded, but checkout failed.

    npm ERR! git clone /Users/buddybuild/.npm/_git-remotes/git-https-github-com-Wikitude-wikitude-cordova-plugin-git-e8ff2c50 /var/folders/hw/gvtl1ld52tg2d734kysw_s900000gn/T/npm-1617-f2f8e780/git-cache-36989b51/e6130cfd448ea0fb3e1f6021dfe2d6fba269be37: You can inspect what was checked out with 'git status'

    npm ERR! git clone /Users/buddybuild/.npm/_git-remotes/git-https-github-com-Wikitude-wikitude-cordova-plugin-git-e8ff2c50 /var/folders/hw/gvtl1ld52tg2d734kysw_s900000gn/T/npm-1617-f2f8e780/git-cache-36989b51/e6130cfd448ea0fb3e1f6021dfe2d6fba269be37: and retry the checkout with 'git checkout -f HEAD'

    npm ERR! git clone /Users/buddybuild/.npm/_git-remotes/git-https-github-com-Wikitude-wikitude-cordova-plugin-git-e8ff2c50 /var/folders/hw/gvtl1ld52tg2d734kysw_s900000gn/T/npm-1617-f2f8e780/git-cache-36989b51/e6130cfd448ea0fb3e1f6021dfe2d6fba269be37: 

    npm ERR! git clone /Users/buddybuild/.npm/_git-remotes/git-https-github-com-Wikitude-wikitude-cordova-plugin-git-e8ff2c50 /var/folders/hw/gvtl1ld52tg2d734kysw_s900000gn/T/npm-1617-f2f8e780/git-cache-36989b51/e6130cfd448ea0fb3e1f6021dfe2d6fba269be37: 

removing the plugin from my local repo package.json resolves the local install. Is anyone else having this issue?

Thanks for the support!

pauwlsky commented 7 years ago

Was able to resolve this issue. Someone had previously setup our package.json:

"com.wikitude.phonegap.WikitudePlugin": "https://github.com/Wikitude/wikitude-cordova-plugin.git"

I removed and reinstalled with npm, updating to:

"com.wikitude.phonegap.wikitudeplugin": "^6.1.0"
danielguttenberg commented 7 years ago

I'm afraid there is currently an issue with the 7.0.0 release of the plugin:

With this release we updated the iOS Framework to support bitcode. As a consequence, the contained library file grew to be 200+ MiB in size. Since GitHub enforces a maximum file size limit of 100 MiB, we are required to use the Git LFS (Large File Storage) extension.

While that works just fine when using Git directly, npm does not seem to be able to handle it, outputting the error messages you posted previously.

So, if you'd like to use the 7.0.0 release, you'd have to clone the repository manually or download it from https://www.wikitude.com/download/ and then run cordova add plugin on the local path.

Note that downloading the repository as a zip file from GitHub will not work, as the file stored with the LFS extension will not be resolved correctly.

I'm hoping to have a solution for this issue soon.

Daniel

AndreasSchacherbauerWikitude commented 7 years ago

Hi @all, We just released a solution to the problem a few moments ago. Please let us know if you still have issues installing the Wikitude Cordova plugin, thx!

iryna-kovalchuk commented 7 years ago

Hi @AndreasSchacherbauerWikitude !

I was not able to install the plugin directly with cordova plagin add ... and had to clone the repository locally yesterday.

AndreasSchacherbauerWikitude commented 7 years ago

Hi @iryna-kovalchuk, Are you using a macOS or Windows machine? In case it was macOS, could you send me the install log?

Best regards, Andreas

iryna-kovalchuk commented 7 years ago

I'm sorry to bother, I've just resolved this issues a few minutes ago.

The issues was not on the plugin side, it's Cordova 7.0 release changes. It requires --nofetch flag.

So in Cordova app this should be cordova plugin add https://github.com/Wikitude/wikitude-cordova-plugin.git --nofetch

But somehow this still fails if adding a plugin in terms of Ionic app. But I guess it's an issue for Ionic not for Wikitude

ionic cordova plugin add https://github.com/Wikitude/wikitude-cordova-plugin.git --nofetch

> cordova plugin add https://github.com/Wikitude/wikitude-cordova-plugin.git --save
✖ Running command - failed!
[ERROR] An error occurred while running cordova plugin add https://github.com/Wikitude/wikitude-cordova-plugin.git 

        --sav... (exit code 1):

        Error: Failed to fetch plugin https://github.com/Wikitude/wikitude-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
jorgemejia commented 7 years ago

Any solution for this ? I have the same problem :(

AndreasSchacherbauerWikitude commented 7 years ago

Hi @jorgemejia, How do you install our Cordova plugin? Is the error coming from git or from our install script?

Best regards, Andreas

iryna-kovalchuk commented 7 years ago

Hi @AndreasSchacherbauerWikitude

BTW, it still crashes sometimes while installing without --nofetch flag.

iryna-kovalchuk commented 7 years ago

And what is the install script?

AndreasSchacherbauerWikitude commented 7 years ago

Hi @iryna-kovalchuk, The WikitudeSDK.framework contains a file that is too large for GitHub, so we split it into multiple smaller ones which are combined back when our Cordova plugin is installed. This script is called 'configure_wikitude_sdk_framework.sh'.

iryna-kovalchuk commented 7 years ago

OK, got it. But I don't have to run the script locally, it's done automatically while the plugin is installed, right?

AndreasSchacherbauerWikitude commented 7 years ago

exactly ;)

xyboox commented 6 years ago

Hi, on macOS I can't install the plugin from git and if I install it from local directory I can't build the project. Error is about unavailable path to /platforms/android/res I'm using Ionic and cordova 8 ( both latest version as of today - 28th Dec, 2017 ). Anything I should be aware of, specifically?

AndreasSchacherbauerWikitude commented 6 years ago

Hi @xyboox, We're not supporting Ionic officially but we can have a brief look at it as soon as our developers are back from there holidays next week.

Best regards, Andreas

DenisG0 commented 6 years ago

Hello, So i ran into the same error while attempting to build generate my sample app. It stops at the section: Fetching plugin from default GitHub master Error: Failed to fetch plugin https://github.com/Wikitude/wikitude-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. Error: npm: Command failed with exit code 1 Error output: So i downloaded the wikitude cordova plugin and dropped it into the plugins folder of my sample app. When i run the app on phonegap developer it loads up correctly except executing features shows this error Loading AR web view failed. Failed to load Architect Wolrd. File was not found or readable.. Is there something i can do to fix this problem? Is there another way to point the plugin source in the sample generator so it will build the app correctly? Thank you.

bhumin3i commented 6 years ago

Bhumins-Mac-mini:AR-ionic3 bhumin$ ionic cordova plugin add https://github.com/Wikitude/wikitude-cordova-plugin.git

cordova plugin add https://github.com/Wikitude/wikitude-cordova-plugin.git --save

stuck at this command

CookieCookson commented 5 years ago

So after following the instructions in this thread I can see why people are having big problems! If you install the plugin via git it downloads the repo and its entire history... which equates to 1.39gb!

screen shot 2019-02-13 at 17 11 24

Essentially the plugin author needs to do proper releases each time a new update is done (the last version was 8.0.0 https://www.npmjs.com/package/com.wikitude.phonegap.wikitudeplugin and we are now on 8.2.0) so the latest version which can be installed properly is 8.0.0 by doing cordova plugin add com.wikitude.phonegap.wikitudeplugin@8.0.0.

This way it only downloads what it needs via a published package instead of the entire source repository.

@AndreasSchacherbauerWikitude would it be possible for you to publish the 8.2.0 release to npm?

Also I suggest changing ALL installation instructions to install using this method, and massively recommend against installing directly from NPM.

jtkeyva commented 5 years ago

Same issue when trying to install sample app where it hangs at: Fetching plugin from default GitHub master Any luck?

CookieCookson commented 5 years ago

@jtkeyva either do (for v8.0.0)

cordova plugin add com.wikitude.phonegap.wikitudeplugin@8.0.0

or for latest (v8.2.0 at time of writing)

git clone https://github.com/Wikitude/wikitude-cordova-plugin.git ../wikitude-cordova-plugin
cordova plugin add ../wikitude-cordova-plugin
erichstark commented 5 years ago

@CookieCookson thanks

pnagele commented 4 years ago

We will reflect this in the setup guide. Thanks for working on this. As it seems to be resolved, I'm closing this issue.