Code Monkey home page Code Monkey logo

Comments (28)

abinasp avatar abinasp commented on August 17, 2024 4

I found a workaround by removing the single line "com.synconset.imagepicker": "~2.1.8" from package.json. And "com.synconset.imagepicker": { "PHOTO_LIBRARY_USAGE_DESCRIPTION": "Add multiple photos" } shows warning while execute the commands like: cordova platform add android and cordova run android.
It worked for me. But we need to inform this to ionic team, i believe it's a bug.

from imagepicker.

benpoucareformance avatar benpoucareformance commented on August 17, 2024 4

@azeemse Yes, the only way I found is just about android package version, you need to downgrade at android 6.3.0.

Here are my notes on this subject (you don't need to do it for ios if you don't have any problem):

Check versions (see /config.xml or command "$ ionic info"):

  • android : 6.3.0
  • ios : 4.5.2

Steps:

  • Delete subfolders /plugins
  • Delete platforms with commands:
$ ionic cordova platform rm android
$ ionic cordova platform rm ios
  • Force delete /platform folder if needed

Run prepare command:

$ ionic cordova prepare

Reinstall platforms:

$ ionic cordova platform add [email protected]
$ ionic cordova platform add [email protected]
  • On IOS platform, The GoogleService-Info.plist file can be wrong:
    => copy this file:
    /platform/ios/MyApp/Resources/GoogleService-Info.plist
    => paste and replace this one:
    /platform/ios/MyApp/Resources/Resources/GoogleService-Info.plist

  • IOS again, check the "value" attributes in config files (iTunes Connect will refuse the package without it) :

-- config.xml

<plugin name="com.synconset.imagepicker" spec="~2.1.8">
        <variable name="PHOTO_LIBRARY_USAGE_DESCRIPTION" value="Allows users to select a profile picture for their profile." />
</plugin>

-- package.json

"com.synconset.imagepicker": {
"PHOTO_LIBRARY_USAGE_DESCRIPTION": "Allows users to select a profile picture for their profile."
}

It's a big waste of time, for sure.

from imagepicker.

azeemse avatar azeemse commented on August 17, 2024 3

Actually, it's not a Cordova version issue but a telerik image picker plugin issue I guess, they aren't update it to the new folder tree of Cordova Android version

If so then at least Ionic should update their documentation with some verified image picker. They are still using the Telerik image picker in their docs.

https://ionicframework.com/docs/native/image-picker/

from imagepicker.

Bleno avatar Bleno commented on August 17, 2024 2

@qw1210p Was the same workaround commented by @2010abinas .

removing the single line "com.synconset.imagepicker": "~2.1.8" from package.json.

It worked for me, but I think not be the best solution.

from imagepicker.

abinasp avatar abinasp commented on August 17, 2024 1

in Ionic2 if you are using any existing project and you do npm install, after that time just remove the com.synconset.imagepicker plugin from package.json and config.json as well. Because the com.synconset.imagepicker is not present in npm directory that's why we get error.
After doing all the set up then install com.synconset.imagepicker plugin, it will work perfect.

from imagepicker.

romain10009 avatar romain10009 commented on August 17, 2024 1

Hi guys, follow the infos here, no need to downgrade cordova. It works on 7.1.0
Cordova hook for Manifest.xml

from imagepicker.

djabif avatar djabif commented on August 17, 2024

any update on this?

from imagepicker.

QaseemLodhi avatar QaseemLodhi commented on August 17, 2024

How can solve this issue?
Any idea?

from imagepicker.

Bleno avatar Bleno commented on August 17, 2024

@2010abinas It's solved for me

from imagepicker.

qw1210p avatar qw1210p commented on August 17, 2024

@Bleno ,can you share the soluation of this problem?

from imagepicker.

Kevin-Chinem avatar Kevin-Chinem commented on August 17, 2024

When i run ionic package build android got this error:

Discovered plugin "com.synconset.imagepicker" in config.xml. Adding it to the project
Fetching plugin "com.synconset.imagepicker@~2.1.8" via npm
Failed to restore plugin "com.synconset.imagepicker" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin com.synconset.imagepicker@~2.1.8 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: Registry returned 404 for GET on https://registry.npmjs.org/com.synconset.imagepicker

These problems are related? imagepicker plugin doesn't install on ionic cloud build.

from imagepicker.

fission1110 avatar fission1110 commented on August 17, 2024

Every time ionic does an android build it parses the config.xml and adds all the plugins that it finds to the packages.json dependency list.

Discovered plugin "com.synconset.imagepicker" in config.xml. Adding it to the project

In this case, that's the wrong behavior because com.synconset.imagepicker is not a npm plugin.

Then when you do an npm update it fails because this isn't a valid plugin.

npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/com.synconset.imagepicker
npm ERR! 404
npm ERR! 404 'com.synconset.imagepicker' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

The work around is to remove com.sysconset.imagepicker from the package.json every time you do a build and try to not check it in to your VCS system. Annoying.

This doesn't seem like a "bug" on the ionic side, but rather a poorly thought out feature to keep the config.xml and packages.json in sync.

This is also currently a massive gaping security vulnerability because anyone can, right now, register the com.synconset.imagepicker name on the npm registry and put whatever code they want on there.

from imagepicker.

Ottunger avatar Ottunger commented on August 17, 2024

Hmmm not working for me. Any command such as:

    ionic cordova emulate android
    ionic cordova build android --prod

Will fail because of trying to inject it:

    Discovered plugin "com.synconset.imagepicker" in config.xml. Adding it to the project
    Failed to restore plugin "com.synconset.imagepicker" from config.xml. You might need to try adding it again.
    Error: Failed to fetch plugin com.synconset.imagepicker@~2.1.8 via registry.
    Probably this is either a connection problem, or plugin spec is incorrect.
    Check your connection and plugin name/version/URL.
    Error: cmd: Command failed with exit code 1 Error output:
    npm ERR! code E404
    npm ERR! 404 Not Found: com.synconset.imagepicker@~2.1.8

    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\Gregoire\AppData\Roaming\npm-cache\_logs\2017-09-16T11_02_50_304Z-debug.log

If this is really needed, please make sure the package name is OK, or remove the dep.

from imagepicker.

djabif avatar djabif commented on August 17, 2024

@EddyVerbruggen please any help with this? Thanks

from imagepicker.

EddyVerbruggen avatar EddyVerbruggen commented on August 17, 2024

@djabif I'd be happy to use a PR but I don't have the time to do much more atm.

from imagepicker.

aelshemy16 avatar aelshemy16 commented on August 17, 2024

Same issue faced after removing android platform try to re add it again and found this error

`Installing "com.synconset.imagepicker" for android

Error during processing of action! Attempting to revert...

Failed to install 'com.synconset.imagepicker': Error: Uh oh!
ENOENT: no such file or directory, open '/Applications/XAMPP/xamppfiles/htdocs/stadna/stadna-mobile/platforms/android/AndroidManifest.xml'
at Error (native)
at Object.fs.openSync (fs.js:642:18)
at Object.fs.readFileSync (fs.js:510:33)
at Object.parseElementtreeSync (/Applications/XAMPP/xamppfiles/htdocs/stadna/stadna-mobile/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27)
at new AndroidManifest (/Applications/XAMPP/xamppfiles/htdocs/stadna/stadna-mobile/platforms/android/cordova/lib/AndroidManifest.js:29:20)
at AndroidProject.getPackageName (/Applications/XAMPP/xamppfiles/htdocs/stadna/stadna-mobile/platforms/android/cordova/lib/AndroidProject.js:99:12)
at AndroidProject.getCustomSubprojectRelativeDir (/Applications/XAMPP/xamppfiles/htdocs/stadna/stadna-mobile/platforms/android/cordova/lib/AndroidProject.js:105:28)
at install (/Applications/XAMPP/xamppfiles/htdocs/stadna/stadna-mobile/platforms/android/cordova/lib/pluginHandlers.js:106:46)
at Object.process (/Applications/XAMPP/xamppfiles/htdocs/stadna/stadna-mobile/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
at PluginManager.doOperation (/Applications/XAMPP/xamppfiles/htdocs/stadna/stadna-mobile/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:114:20)

(node:89774) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Uh oh!
ENOENT: no such file or directory, open '/Applications/XAMPP/xamppfiles/htdocs/stadna/stadna-mobile/platforms/android/AndroidManifest.xml'

ionic cordova resources android --force
✔ Collecting resource configuration and source images - done!
✔ Filtering out image resources that do not need regeneration - done!
✔ Uploading source images to prepare for transformations - done!
✔ Generating platform resources: 18 / 18 complete - done!
✔ Modifying config.xml to add new image resources - done!`

if any help ?!

from imagepicker.

fedemoreno avatar fedemoreno commented on August 17, 2024

Hi There!! I have the same issue :
Does someone solve it?

Android project created with [email protected]
Android Studio project detected

Android Studio project detected

Installing "com.synconset.imagepicker" for android

Error during processing of action! Attempting to revert...

Failed to install 'com.synconset.imagepicker': Error: Uh oh!
ENOENT: no such file or directory, open '/Users/Federico/Documents/FG-V2.2.7/FG-V2.2.7-FG/platforms/android/AndroidManifest.xml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.parseElementtreeSync (/Users/Federico/Documents/FG-V2.2.7/FG-V2.2.7-FG/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27)
at new AndroidManifest (/Users/Federico/Documents/FG-V2.2.7/FG-V2.2.7-FG/platforms/android/cordova/lib/AndroidManifest.js:29:20)
at AndroidProject.getPackageName (/Users/Federico/Documents/FG-V2.2.7/FG-V2.2.7-FG/platforms/android/cordova/lib/AndroidProject.js:99:12)
at AndroidProject.getCustomSubprojectRelativeDir (/Users/Federico/Documents/FG-V2.2.7/FG-V2.2.7-FG/platforms/android/cordova/lib/AndroidProject.js:105:28)
at install (/Users/Federico/Documents/FG-V2.2.7/FG-V2.2.7-FG/platforms/android/cordova/lib/pluginHandlers.js:106:46)
at ActionStack.process (/Users/Federico/Documents/FG-V2.2.7/FG-V2.2.7-FG/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
at PluginManager.doOperation (/Users/Federico/Documents/FG-V2.2.7/FG-V2.2.7-FG/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:114:20)
at PluginManager.addPlugin (/Users/Federico/Documents/FG-V2.2.7/FG-V2.2.7-FG/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:144:17)

(node:24970) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Uh oh!
ENOENT: no such file or directory, open '/Users/Federico/Documents/FG-V2.2.7/FG-V2.2.7-FG/platforms/android/AndroidManifest.xml'
(node:24970) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

from imagepicker.

benpoucareformance avatar benpoucareformance commented on August 17, 2024

Same issue with commands :
$ cordova platform remove android
$ cordova platform add android

Seems to be a folders and files organization issue, Cordova is searching in /platforms/android/AndroidManifest.xml, but the is there /platforms/android/app/src/main/AndroidManifest.xml

I tried to update the paths everywhere I found it with no success.

Is there a link with angular/schematics ? Using yarn here and at $ yarn install, I've got some warnings on schematics dependencies...

from imagepicker.

azeemse avatar azeemse commented on August 17, 2024

@fedemoreno & @benpoucareformance Is there any fix for these issues???

from imagepicker.

azeemse avatar azeemse commented on August 17, 2024

@benpoucareformance Thanks for sharing this. I was thinking of not downgrading the android version but it seems no other fix available right now. Even the Cordova-Android version 7.1.0 has also been launched but it still contains the same issue.

from imagepicker.

benpoucareformance avatar benpoucareformance commented on August 17, 2024

@azeemse Yes it is, I tried to updated all paths in plugin script, but there was others issues in packages hooks. Better would too have another image picker plugin... Don't know if it exists...

from imagepicker.

azeemse avatar azeemse commented on August 17, 2024

@benpoucareformance I have tried searching any other image picker plugin but couldn't get any thing latest. I am finally able to run my app on my Android device. :)

from imagepicker.

benpoucareformance avatar benpoucareformance commented on August 17, 2024

Thanks for sharing this. I was thinking of not downgrading the android version but it seems no other fix available right now. Even the Cordova-Android version 7.1.0 has also been launched but it still contains the same issue.

Actually, it's not a Cordova version issue but a telerik image picker plugin issue I guess, they aren't update it to the new folder tree of Cordova Android version

from imagepicker.

tperrelli avatar tperrelli commented on August 17, 2024

Hi, i'm having the same issue too.

  1. I've removed android "ionic cordova platform remove android"
  2. I've removed the reference from the config.xml file
  3. I've removed the reference from the package.json file
  4. Finally i've added the android plataform back

But everytime i try to build or run in device the ionic tries to install the annoying com.synconset.imagepicker package back again. 👎

Does anyone have got the solution?

from imagepicker.

tperrelli avatar tperrelli commented on August 17, 2024

Well, i've just noticed that if we want to completely remove the com.synconset.imagepicker from our projetct, we also need to remove it reference from plugins/fetch.json file. This way, cordova does not try to install it back in every build.

from imagepicker.

Sjerd avatar Sjerd commented on August 17, 2024

These issues are fixed in pr 114

from imagepicker.

EddyVerbruggen avatar EddyVerbruggen commented on August 17, 2024

@Sjerd thanks! Part of 2.2.0 (now on npm).

from imagepicker.

Nikhath7829 avatar Nikhath7829 commented on August 17, 2024

Hi ,
I'm using ionic5
Have tried out with android 6.3.0 and android 7.1.0, The same error triggers .Please anyone can show me light towards this will be very helpfull

Ionic Framework : @ionic/angular 5.3.3
@angular-devkit/build-angular : 0.1000.8
@angular-devkit/schematics : 10.0.8
@angular/cli : 10.0.8
@ionic/angular-toolkit : 2.3.3

Cordova:

Cordova CLI : 9.0.0 ([email protected])
Cordova Platforms : android 7.1.4
Cordova Plugins : no whitelisted plugins (1 plugins total)

cordova.cmd plugin ls
cordova-plugin-telerik-imagepicker 2.3.5 "ImagePicker"

from imagepicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.