"TypeError: Cannot read property 'URI' of undefined"
I got this error whenever I try to use native screenshot method in Ionic2.
My code:
this.screenshot.URI(80).then((result) => {
console.log(result);
}, (err) => {
console.log(err);
});
This is Ionic2 screenshot documentation: https://ionicframework.com/docs/native/screenshot/
"dependencies": {
"#angular/common": "4.0.0",
"#angular/compiler": "4.0.0",
"#angular/compiler-cli": "4.0.0",
"#angular/core": "4.0.0",
"#angular/forms": "4.0.0",
"#angular/http": "4.0.0",
"#angular/platform-browser": "4.0.0",
"#angular/platform-browser-dynamic": "4.0.0",
"#ionic-native/camera": "^3.6.0",
"#ionic-native/core": "3.6.1",
"#ionic-native/file": "^3.6.0",
"#ionic-native/file-path": "^3.6.0",
"#ionic-native/screenshot": "^3.6.1",
"#ionic-native/splash-screen": "3.4.2",
"#ionic-native/status-bar": "3.4.2",
"#ionic-native/transfer": "^3.6.0",
"#ionic/storage": "2.0.1",
"crypto-js": "3.1.9-1",
"fast-sha256": "1.0.0",
"ionic-angular": "3.0.1",
"ionic-native": "^3.5.0",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"sha256": "0.2.0",
"sw-toolbox": "3.4.0",
"ts-md5": "1.2.0",
"zone.js": "^0.8.4"
Related
I am trying to build my old project with all the latest versions of ionic, angular & capacitor here is my version list ( package.json )
"dependencies": {
"#angular/cdk": "^15.0.0",
"#angular/common": "^15.0.0",
"#angular/core": "^15.0.0",
"#angular/fire": "^5.2.1",
"#angular/forms": "^15.0.0",
"#angular/platform-browser": "^15.0.0",
"#angular/platform-browser-dynamic": "^15.0.0",
"#angular/router": "^15.0.0",
"#angular/service-worker": "^15.1.2",
"#capacitor-community/facebook-login": "^1.0.0",
"#capacitor/android": "^4.6.3",
"#capacitor/app": "4.1.1",
"#capacitor/camera": "^4.1.4",
"#capacitor/core": "4.6.2",
"#capacitor/geolocation": "^4.1.0",
"#capacitor/haptics": "4.1.0",
"#capacitor/ios": "^2.2.1",
"#capacitor/keyboard": "4.1.1",
"#capacitor/splash-screen": "^4.1.3",
"#capacitor/status-bar": "4.1.1",
"#ionic-native/app-availability": "^5.15.0",
"#ionic-native/app-rate": "^5.15.0",
"#ionic-native/appsflyer": "^5.31.1",
"#ionic-native/core": "^5.0.0",
"#ionic-native/diagnostic": "^5.24.0",
"#ionic-native/fcm": "^5.25.0",
"#ionic-native/firebase-x": "^5.25.0",
"#ionic-native/google-plus": "^5.15.0",
"#ionic-native/in-app-browser": "^5.24.0",
"#ionic-native/location-accuracy": "^5.24.0",
"#ionic-native/native-geocoder": "^5.22.0",
"#ionic-native/social-sharing": "^5.26.0",
"#ionic-native/splash-screen": "^5.0.0",
"#ionic-native/status-bar": "^5.0.0",
"#ionic-native/stripe": "^5.26.0",
"#ionic-super-tabs/angular": "^6.4.0",
"#ionic-super-tabs/core": "^6.4.0",
"#ionic/angular": "^6.1.9",
"#ionic/pwa-elements": "^1.5.2",
"#ionic/storage": "^2.2.0",
"#ngx-translate/core": "^11.0.1",
"#ngx-translate/http-loader": "^6.0.0",
"#turf/turf": "^5.1.6",
"#types/googlemaps": "^3.39.2",
"#types/jquery": "^3.3.36",
"angular-i18next": "^7.0.0",
"angularx-flatpickr": "^6.3.1",
"capacitor-apple-login": "git+https://github.com/rlfrahm/capacitor-apple-login.git",
"cordova-android": "^8.1.0",
"cordova-browser": "5.0.4",
"cordova-ios": "^5.1.1",
"cordova-plugin-androidx": "^3.0.0",
"cordova-plugin-androidx-adapter": "^1.1.3",
"cordova-plugin-appavailability": "^0.4.2",
"cordova-plugin-apprate": "^1.5.0",
"cordova-plugin-appsflyer-sdk": "^6.2.40",
"cordova-plugin-browsertab": "^0.2.0",
"cordova-plugin-buildinfo": "^4.0.0",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-customurlscheme": "^4.4.0",
"cordova-plugin-dialogs": "^2.0.2",
"cordova-plugin-enable-multidex": "^0.2.0",
"cordova-plugin-firebasex": "^9.1.2",
"cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-googleplus": "^8.4.0",
"cordova-plugin-inappbrowser": "^3.2.0",
"cordova-plugin-ionic-webview": "~4.1.3",
"cordova-plugin-nativestorage": "^2.3.2",
"cordova-plugin-whitelist": "~1.3.3",
"cordova-plugin-x-socialsharing": "^5.6.4",
"cordova-res": "^0.14.0",
"cordova-sqlite-storage": "^5.0.0",
"cordova-universal-links-plugin": "git+https://github.com/walteram/cordova-universal-links-plugin.git",
"core-js": "^2.5.4",
"es6-promise-plugin": "^4.2.2",
"firebase": "^7.1.0",
"flatpickr": "^4.6.3",
"i18next": "^19.0.3",
"i18next-browser-languagedetector": "^4.0.1",
"i18next-xhr-backend": "^3.2.2",
"ionicons": "^6.0.3",
"jquery": "^3.5.0",
"leaflet": "^1.6.0",
"ngx-quill": "^8.0.0",
"ngx-virtual-scroller": "^3.0.3",
"quill": "^1.3.7",
"rxjs": "~7.5.0",
"sharp": "^0.25.2",
"text-mask-core": "^5.1.2",
"tslib": "^2.3.0",
"underscore": "^1.10.2",
"uuid": "^8.0.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"#angular-devkit/build-angular": "^15.0.0",
"#angular-eslint/builder": "^14.0.0",
"#angular-eslint/eslint-plugin": "^14.0.0",
"#angular-eslint/eslint-plugin-template": "^14.0.0",
"#angular-eslint/template-parser": "^14.0.0",
"#angular/cli": "^15.0.0",
"#angular/compiler": "^15.0.0",
"#angular/compiler-cli": "^15.0.0",
"#angular/language-service": "^15.0.0",
"#capacitor/cli": "4.6.2",
"#ionic/angular-toolkit": "^6.0.0",
"#types/jasmine": "~4.0.0",
"#types/node": "^12.11.1",
"#typescript-eslint/eslint-plugin": "5.3.0",
"#typescript-eslint/parser": "5.3.0",
"codelyzer": "^5.0.0",
"cordova-plugin-ionic-webview": "^4.1.3",
"cordova-plugin-whitelist": "^1.3.4",
"jasmine-core": "~4.3.0",
"jasmine-spec-reporter": "~5.0.0",
"jetifier": "^2.0.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"moment": "^2.25.3",
"protractor": "~5.4.0",
"ts-node": "~8.3.0",
"tslint": "~5.15.0",
"typescript": "~4.8.4"
},
Blow is the error that I see in android studio
Caused by: org.gradle.api.InvalidUserDataException: You must specify a URL for a Maven repository.
I have a problem using ngx-image-cropper into an ionic modal view.
It's a headache.
If a call a view normally by route, it works.
I look for a solution or at least some one with the problem and nothing.
I am using:
"dependencies": {
"#angular/common": "^14.0.0",
"#angular/core": "^14.1.0",
"#angular/forms": "^14.0.0",
"#angular/platform-browser": "^14.0.0",
"#angular/platform-browser-dynamic": "^14.0.0",
"#angular/router": "^14.0.0",
"#capacitor/android": "3.6.0",
"#capacitor/app": "1.1.1",
"#capacitor/camera": "^1.3.1",
"#capacitor/core": "3.6.0",
"#capacitor/device": "^1.1.2",
"#capacitor/haptics": "1.1.4",
"#capacitor/ios": "3.6.0",
"#capacitor/keyboard": "1.2.3",
"#capacitor/status-bar": "1.0.8",
"#capacitor/storage": "^1.2.5",
"#capacitor/toast": "^1.0.8",
"#ionic-native/call-number": "^5.36.0",
"#ionic/angular": "^6.2.0",
"#ionic/pwa-elements": "^3.1.1",
"call-number": "^1.0.1",
"hammerjs": "^2.0.8",
"ngx-image-cropper": "^6.2.2",
"rendered-country-flags": "^1.2.1",
"rxjs": "~6.6.0",
"tslib": "^2.2.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"#angular-devkit/build-angular": "^14.0.0",
"#angular-eslint/builder": "~13.0.1",
"#angular-eslint/eslint-plugin": "~13.0.1",
"#angular-eslint/eslint-plugin-template": "~13.0.1",
"#angular-eslint/template-parser": "~13.0.1",
"#angular/cli": "^14.0.0",
"#angular/compiler": "^14.0.0",
"#angular/compiler-cli": "^14.0.0",
"#angular/language-service": "^14.0.0",
"#capacitor/cli": "3.6.0",
"#ionic/angular-toolkit": "^6.1.0",
"#ionic/lab": "3.2.13",
"#types/jasmine": "~3.6.0",
"#types/jasminewd2": "~2.0.3",
"#types/node": "^12.11.1",
"#typescript-eslint/eslint-plugin": "5.3.0",
"#typescript-eslint/parser": "5.3.0",
"eslint": "^7.6.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsdoc": "30.7.6",
"eslint-plugin-prefer-arrow": "1.2.2",
"jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.2",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"typescript": "~4.7.3"
},
Into Ionic 6.20.0
I encapsulate the cropper call into a service that manages camera or gallery photo and pass it to cropper modal view.
I have this problem reported in the title, I can't build my app on my iOS, it's the only error that happens.
No visible #interface for 'FIRTrace' declares the selector 'incrementCounterNamed'. FirebasePlugin.m
image error
this is my package.json
{
"dependencies": {
"#angular/common": "^7.2.2",
"#angular/core": "^7.2.15",
"#angular/forms": "^7.2.2",
"#angular/http": "^7.2.2",
"#angular/platform-browser": "^7.2.2",
"#angular/platform-browser-dynamic": "^7.2.2",
"#angular/router": "^7.2.2",
"#ionic-native/app-version": "^5.1.0",
"#ionic-native/base64-to-gallery": "^5.14.0",
"#ionic-native/core": "^5.0.0",
"#ionic-native/device": "^5.2.0",
"#ionic-native/firebase": "^5.3.0",
"#ionic-native/in-app-browser": "^5.15.1",
"#ionic-native/ionic-webview": "^5.1.0",
"#ionic-native/keyboard": "^5.1.0",
"#ionic-native/network": "^5.1.0",
"#ionic-native/push": "^5.2.0",
"#ionic-native/safari-view-controller": "^5.15.1",
"#ionic-native/splash-screen": "^5.0.0",
"#ionic-native/status-bar": "^5.0.0",
"#ionic-native/unique-device-id": "^5.1.0",
"#ionic/angular": "^4.0.0",
"#ionic/storage": "^2.2.0",
"angularfire2": "^5.1.2",
"chart.js": "^2.8.0",
"chartjs-plugin-datalabels": "^0.7.0",
"cordova-android": "^8.0.0",
"cordova-base64-to-gallery": "^4.1.3",
"cordova-ios": "^5.1.1",
"cordova-lib": "^9.0.1",
"cordova-plugin-androidx": "^1.0.2",
"cordova-plugin-androidx-adapter": "^1.1.0",
"cordova-plugin-app-version": "0.1.9",
"cordova-plugin-device": "2.0.2",
"cordova-plugin-firebase": "2.0.5",
"cordova-plugin-inappbrowser": "3.0.0",
"cordova-plugin-ionic-keyboard": "2.1.3",
"cordova-plugin-ionic-webview": "^4.1.1",
"cordova-plugin-network-information": "2.0.1",
"cordova-plugin-safariviewcontroller": "^1.6.0",
"cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "2.4.2",
"cordova-plugin-uniquedeviceid": "1.3.2",
"cordova-plugin-whitelist": "1.3.3",
"cordova-sqlite-storage": "3.0.0",
"cordova-support-android-plugin": "1.0.1",
"cordova-support-google-services": "1.1.0",
"core-js": "^2.5.4",
"firebase": "^5.9.2",
"phonegap-plugin-multidex": "1.0.0",
"phonegap-plugin-push": "2.2.3",
"rxjs": "~6.3.3",
"rxjs-compat": "^6.4.0",
"sw-toolbox": "^3.6.0",
"zone.js": "~0.8.29"
},
"devDependencies": {
"#angular-devkit/architect": "~0.12.3",
"#angular-devkit/build-angular": "~0.12.3",
"#angular-devkit/core": "~7.2.3",
"#angular-devkit/schematics": "~7.2.3",
"#angular/cli": "~7.2.3",
"#angular/compiler": "~7.2.2",
"#angular/compiler-cli": "~7.2.2",
"#angular/language-service": "~7.2.2",
"#compodoc/compodoc": "^1.1.9",
"#ionic/angular-toolkit": "~1.4.0",
"#ionic/app-scripts": "^3.2.2",
"#types/chart.js": "^2.8.5",
"#types/jasmine": "~2.8.8",
"#types/jasminewd2": "~2.0.3",
"#types/node": "~10.12.0",
"codelyzer": "~4.5.0",
"cordova-android-support-gradle-release": "~3.0.1",
"cordova-plugin-add-swift-support": "~2.0.2",
"cordova-plugin-firebasex": "~6.0.2",
"cordova-plugin-speechrecognition": "^1.2.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.4",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~8.0.0",
"tslint": "~5.12.0",
"typescript": "~3.1.6",
"xcode": "^2.0.0"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-app-version": {},
"cordova-plugin-device": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-network-information": {},
"cordova-sqlite-storage": {},
"cordova-plugin-uniquedeviceid": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-firebase": {},
"phonegap-plugin-push": {
"ANDROID_SUPPORT_V13_VERSION": "27.+",
"FCM_VERSION": "11.6.2"
},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-androidx": {},
"cordova-plugin-androidx-adapter": {},
"cordova-plugin-speechrecognition": {},
"cordova-android-support-gradle-release": {
"ANDROID_SUPPORT_VERSION": "27.+"
},
"cordova-plugin-firebasex": {},
"cordova-plugin-add-swift-support": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-splashscreen": {},
"cordova-base64-to-gallery": {},
"cordova-plugin-safariviewcontroller": {}
}
}
}
I Tried to update my pods and deintegrate, cache clean, but don't works.
Thank you all
package.json
"dependencies": {
"#angular/common": "4.0.0",
"#angular/compiler": "4.0.0",
"#angular/compiler-cli": "4.0.0",
"#angular/core": "4.0.0",
"#angular/forms": "4.0.0",
"#angular/http": "4.0.0",
"#angular/platform-browser": "4.0.0",
"#angular/platform-browser-dynamic": "4.0.0",
"#ionic-native/core": "^3.4.2",
"#ionic-native/splash-screen": "3.4.2",
"#ionic-native/status-bar": "3.4.2",
"#ionic/storage": "2.0.1",
"ionic-angular": "3.0.1",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"sw-toolbox": "3.4.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"#ionic/app-scripts": "1.3.0",
"typescript": "~2.2.1"
},
When I wanna change my version of Ionic from Ionic2 to Ionic3, I encountered some errors Is it my version of #angular/core outdated or? [Sorry I could not copy and paste the errors here, only can snip a photo of it.]
When i try to add a new provider to my existing ionic project it throws
The generate command is only available for projects t
hat use ionic-angular >= 3.0.0
I tried the following command to upgrade but it doesn't worked out
>npm install --save ionic-angular
My Ionic Version is 3.2.0
My Package.json looks
"dependencies": {
"#angular/common": "2.4.8",
"#angular/compiler": "2.4.8",
"#angular/compiler-cli": "2.4.8",
"#angular/core": "2.4.8",
"#angular/forms": "2.4.8",
"#angular/http": "2.4.8",
"#angular/platform-browser": "2.4.8",
"#angular/platform-browser-dynamic": "2.4.8",
"#angular/platform-server": "2.4.8",
"#angular/tsc-wrapped": "~0.5.2",
"#ionic/storage": "2.0.0",
"ionic-angular": "^2.3.0",
"ionic-native": "2.4.1",
"ionicons": "3.0.0",
"lodash-es": "^4.17.4",
"node-uuid": "^1.4.7",
"rxjs": "5.0.1",
"sw-toolbox": "3.4.0",
"uuid": "^2.0.2",
"zone.js": "0.7.2"
}