Error: cannot find module "." when deploying to ios - Ionic 3 - ios

Error Description:
I built the project on VsCode using "ionic cordova build ios --prod", opened it in XCode (project.xcworkspace) and deployed it to an iPhone. However, when I open the app it gets stuck on a blank page. I debugged it using safari's development tool and I got the following error on console: "Error: cannot find module "." ".
What I've tried:
I researched the error and tried a couple solution, but no luck.
Changed typescript version to "~2.6.2", "2.6.2", "2.8.3"
Removed "^" from typescript version;
Changed app-script version to "3.1.9", "3.2.1", "3.2.2", "3.2.3"
Went through my imports to see if any of them had "/udm", but none of them do;
Also tried different XCode versions: 8, 9, 10 and 12;
Tried adding different versions of ios platform: 4.5.0, 4.5.5, 5.0.1, 5.1.0 and the latest;
Here are some links I visited, had no luck with their solutions though:
https://forum.ionicframework.com/t/build-in-prod-mode-cannot-find-module/132231/7
Ionic 3: Build in “prod” mode: Cannot find module “.”
https://forum.ionicframework.com/t/runtime-error-cannot-find-module/93967/3
How can I resolve Ionic Uncaught Error: Cannot find module "." when adding new page?
Info:
ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 10.0.0
local packages:
#ionic/app-scripts : 3.2.4
Cordova Platforms : ios 5.1.0
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.11.3
Node : v14.15.0
npm : 6.14.8
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Package.json:
{
"name": "name",
"version": "0.0.1",
"author": "author",
"homepage": "https://homepage.com",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"#angular/animations": "5.2.11",
"#angular/common": "5.2.11",
"#angular/compiler": "5.2.11",
"#angular/compiler-cli": "5.2.11",
"#angular/core": "5.2.11",
"#angular/forms": "5.2.11",
"#angular/http": "^7.2.10",
"#angular/platform-browser": "5.2.11",
"#angular/platform-browser-dynamic": "5.2.11",
"#grpc/grpc-js": "^1.1.7",
"#ionic-native/app-availability": "^4.20.0",
"#ionic-native/app-version": "^4.15.0",
"#ionic-native/barcode-scanner": "^4.9.0",
"#ionic-native/camera": "^4.7.0",
"#ionic-native/core": "4.7.0",
"#ionic-native/file": "^4.20.0",
"#ionic-native/file-path": "^4.7.0",
"#ionic-native/fingerprint-aio": "^4.20.0",
"#ionic-native/firebase": "^4.20.0",
"#ionic-native/firebase-crashlytics": "^5.30.0",
"#ionic-native/header-color": "^4.17.0",
"#ionic-native/http": "^4.20.0",
"#ionic-native/in-app-browser": "^3.1.0",
"#ionic-native/ionic-webview": "^5.0.0",
"#ionic-native/pin-dialog": "^4.20.0",
"#ionic-native/push": "^3.14.0",
"#ionic-native/social-sharing": "^4.15.0",
"#ionic-native/splash-screen": "4.7.0",
"#ionic-native/status-bar": "^4.7.0",
"#ionic-native/vibration": "^4.8.0",
"#ionic/storage": "2.1.3",
"angularfire2": "^5.4.2",
"brmasker-ionic-3": "^1.5.3",
"cordova-ios": "4.5.5",
"cordova-plugin-appavailability": "^0.4.2",
"cordova-plugin-headercolor": "^1.0.0",
"cordova-plugin-inappbrowser": "^3.1.0",
"cordova-plugin-ionic-webview": "^4.1.3",
"cordova-plugin-pin-dialog": "^0.1.3",
"cordova-plugin-splashscreen": "6.0.0",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-vibration": "^3.1.1",
"cordova-plugin-whitelist": "1.3.4",
"crypto-js": "^3.1.9-1",
"firebase": "^7.2.4",
"ionic-angular": "3.9.2",
"ionic-stepper": "^1.1.0",
"ionicons": "3.0.0",
"ngx-barcode": "^0.2.4",
"ngx-qrcode2": "0.0.9",
"onesignal-cordova-plugin": "^2.11.1",
"rxjs": "^6.4.0",
"rxjs-compat": "^6.4.0",
"semver": "^7.3.2",
"sw-toolbox": "^3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"#ionic/app-scripts": "3.2.4",
"#types/node": "7.0.7",
"cordova-android": "^8.0.0",
"cordova-plugin-advanced-http": "^3.1.0",
"cordova-plugin-androidx": "^3.0.0",
"cordova-plugin-androidx-adapter": "^1.1.1",
"cordova-plugin-app-version": "^0.1.12",
"cordova-plugin-camera": "^4.1.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-filepath": "^1.5.6",
"cordova-plugin-fingerprint-aio": "git+https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio.git#f8e5588011506b4a386cbfa16346cd6b5ab85349",
"cordova-plugin-firebase-lib": "^5.1.1",
"cordova-plugin-ionic-keyboard": "2.0.5",
"cordova-plugin-x-socialsharing": "^5.4.1",
"es6-promise-plugin": "^4.2.2",
"phonegap-plugin-barcodescanner": "^8.0.0",
"typescript": "3.2.4"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-vibration": {},
"cordova-plugin-headercolor": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-pin-dialog": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-appavailability": {},
"onesignal-cordova-plugin": {},
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-filepath": {},
"cordova-plugin-file": {},
"cordova-plugin-advanced-http": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-fingerprint-aio": {
"FACEID_USAGE_DESCRIPTION": "Confirme sua digital"
},
"cordova-plugin-firebase-lib": {},
"cordova-plugin-androidx": {},
"cordova-plugin-androidx-adapter": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-app-version": {},
"cordova-plugin-ionic-keyboard": {},
"phonegap-plugin-barcodescanner": {},
"cordova-plugin-x-socialsharing": {
"PHOTO_LIBRARY_ADD_USAGE_DESCRIPTION": "This app requires photo library access to function properly.",
"PHOTO_LIBRARY_USAGE_DESCRIPTION": "This app requires photo library access to function properly."
},
"cordova-plugin-splashscreen": {}
},
"platforms": [
"ios"
]
}
}

Related

Angular error on Ionic build: Cannot find module '#ionic/angular-toolkit/package.json'

When I run "ionic cordova build ios" I get the following error when ng is called:
> ng run app:ionic-cordova-build:production --platform=ios
2021-09-29T09:57:54.068Z ng:analytics getGlobalAnalytics
2021-09-29T09:57:54.070Z ng:analytics Client Analytics config found: false
2021-09-29T09:57:54.070Z ng:analytics Analytics disabled. Ignoring all analytics.
2021-09-29T09:57:54.070Z ng:analytics getSharedAnalytics
An unhandled exception occurred: Cannot find module '#ionic/angular-toolkit/package.json'
Require stack:
- /Users/ralf/n/lib/node_modules/#angular/cli/node_modules/#angular-devkit/architect/node/node-modules-architect-host.js
- /Users/ralf/n/lib/node_modules/#angular/cli/node_modules/#angular-devkit/architect/node/index.js
- /Users/ralf/n/lib/node_modules/#angular/cli/models/architect-command.js
- /Users/ralf/n/lib/node_modules/#angular/cli/commands/run-impl.js
- /Users/ralf/n/lib/node_modules/#angular/cli/node_modules/#angular-devkit/schematics/tools/export-ref.js
- /Users/ralf/n/lib/node_modules/#angular/cli/node_modules/#angular-devkit/schematics/tools/index.js
- /Users/ralf/n/lib/node_modules/#angular/cli/utilities/json-schema.js
- /Users/ralf/n/lib/node_modules/#angular/cli/models/command-runner.js
- /Users/ralf/n/lib/node_modules/#angular/cli/lib/cli/index.js
- /Users/ralf/n/lib/node_modules/#angular/cli/lib/init.js
- /Users/ralf/n/lib/node_modules/#angular/cli/bin/ng
See "/private/var/folders/y7/p3fxhqk92d30gbk09x6_w5480000gn/T/ng-wCJI7m/angular-errors.log" for further details.
[ERROR] An error occurred while running subprocess ng.
Here is the output of "ionic info":
Ionic:
Ionic CLI : 6.16.3 (/Users/ralf/n/lib/node_modules/#ionic/cli)
Ionic Framework : #ionic/angular 5.8.1
#angular-devkit/build-angular : 12.2.7
#angular-devkit/schematics : 12.0.5
#angular/cli : 12.0.5
#ionic/angular-toolkit : 4.0.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : android 8.0.0, ios 5.0.1
Cordova Plugins : cordova-plugin-ionic-webview 4.1.3, (and 15 other plugins)
Utility:
cordova-res : 0.15.3
native-run : not installed globally
System:
ios-deploy : 1.9.2
NodeJS : v14.17.0 (/Users/ralf/n/bin/node)
npm : 7.21.1
OS : macOS Big Sur
Xcode : Xcode 13.0 Build version 13A233
I have no idea whats going wrong here. #ionic/angular-toolkit/package.json is available in my project.
Any help on how to fix this would be highly appreciated.
UPDATE: Added package.json
{
"name": "myApp_Phone",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build-pwa": "ng build --base-href /",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"postinstall": "ngcc"
},
"private": true,
"dependencies": {
"#angular/animations": "~12.0.1",
"#angular/common": "~12.0.1",
"#angular/core": "~12.0.1",
"#angular/fire": "^6.1.5",
"#angular/forms": "~12.0.1",
"#angular/platform-browser": "~12.0.1",
"#angular/platform-browser-dynamic": "~12.0.1",
"#angular/router": "~12.0.1",
"#angular/service-worker": "~12.0.1",
"#ckeditor/ckeditor5-angular": "^2.0.2",
"#ckeditor/ckeditor5-build-classic": "^29.2.0",
"#firebase/app": "^0.6.22",
"#firebase/auth": "^0.16.6",
"#firebase/polyfill": "^0.3.36",
"#firebase/util": "^1.1.0",
"#ionic-native/calendar": "^5.36.0",
"#ionic-native/camera": "^5.36.0",
"#ionic-native/core": "^5.36.0",
"#ionic-native/facebook": "^5.36.0",
"#ionic-native/fcm": "^5.36.0",
"#ionic-native/file": "^5.36.0",
"#ionic-native/file-opener": "^5.36.0",
"#ionic-native/google-plus": "^5.36.0",
"#ionic-native/in-app-browser": "^5.36.0",
"#ionic-native/ionic-webview": "^5.36.0",
"#ionic-native/qr-scanner": "^5.36.0",
"#ionic-native/social-sharing": "^5.36.0",
"#ionic-native/splash-screen": "^5.36.0",
"#ionic-native/status-bar": "^5.36.0",
"#ionic/angular": "^5.5.2",
"#ionic/storage-angular": "^3.0.6",
"#ngx-translate/core": "^13.0.0",
"#ngx-translate/http-loader": "6.0.0",
"angular2-uuid": "^1.1.1",
"cordova-plugin-calendar": "^5.1.5",
"cordova-plugin-camera": "^6.0.0",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-facebook4": "~6.4.0",
"cordova-plugin-fcm-with-dependecy-updated": "^7.8.0",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-file-opener2": "^3.0.5",
"cordova-plugin-googleplus": "^8.5.2",
"cordova-plugin-inappbrowser": "^5.0.0",
"cordova-plugin-ionic-webview": "^5.0.0",
"cordova-plugin-qrscanner": "^3.0.1",
"cordova-plugin-recentscontrol": "^1.1.2",
"cordova-plugin-splashscreen": "^6.0.0",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-whitelist": "^1.3.5",
"cordova-plugin-x-socialsharing": "^6.0.3",
"cordova-sqlite-storage": "6.0.0",
"core-js": "^3.12.1",
"cropperjs": "^1.5.12",
"firebase": "^8.6.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionic4-auto-complete": "^2.9.9",
"jwt-decode": "^3.1.2",
"moment": "^2.29.1",
"ngx-image-compress": "^11.0.3",
"rxjs": "~6.6.7",
"unorm": "^1.6.0",
"xcode": "^3.0.1",
"zone.js": "~0.11.4"
},
"devDependencies": {
"#angular-devkit/build-angular": "~12.0.1",
"#angular/cli": "~12.0.1",
"#angular/compiler": "~12.0.1",
"#angular/compiler-cli": "~12.0.1",
"#angular/language-service": "~12.0.1",
"#ionic/angular-toolkit": "^4.0.0",
"#ionic/lab": "^3.2.10",
"#types/jasmine": "~3.9.1",
"#types/jasminewd2": "~2.0.10",
"#types/jwt-decode": "^2.2.1",
"#types/node": "~16.10.1",
"codelyzer": "^6.0.2",
"cordova-android": "^9.1.0",
"es6-promise-plugin": "^4.2.2",
"jasmine-core": "~3.9.0",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.3.4",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.7.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.2.4"
},
"description": "Fortunella myApp Phone",
"cordova": {
"plugins": {
"cordova-plugin-qrscanner": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-file-opener2": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-camera": {
"ANDROIDX_CORE_VERSION": "1.6.+"
},
"cordova-plugin-recentscontrol": {},
"cordova-plugin-facebook4": {
"APP_ID": "367618343602117",
"APP_NAME": "Fortunella App",
"ANDROID_SDK_VERSION": "4.+",
"FACEBOOK_HYBRID_APP_EVENTS": "false",
"FACEBOOK_ANDROID_SDK_VERSION": "5.13.0"
},
"cordova-plugin-device": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-x-socialsharing": {},
"cordova-plugin-file": {},
"cordova-plugin-googleplus": {
"REVERSED_CLIENT_ID": "com.googleusercontent.apps.58618556950-lotiu9u12l1jo6nmhkr4j1cqovmj346o",
"PLAY_SERVICES_VERSION": "15.0.1"
},
"cordova-plugin-calendar": {
"CALENDAR_USAGE_DESCRIPTION": "Add events to your own calendar"
},
"cordova-plugin-fcm-with-dependecy-updated": {
"ANDROID_DEFAULT_NOTIFICATION_ICON": "#mipmap/ic_launcher",
"ANDROID_FCM_VERSION": "21.0.0",
"ANDROID_FIREBASE_BOM_VERSION": "26.0.0",
"ANDROID_GOOGLE_SERVICES_VERSION": "4.3.4",
"ANDROID_GRADLE_TOOLS_VERSION": "4.1.0"
},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-sqlite-storage": {},
"cordova-plugin-inappbrowser": {}
},
"platforms": [
"android"
]
}
}
I solved the problem. The problem was that I had angular installed globally and the "ionic build" tried to use the global ng version.
After removing the global angular version "ionic build" complaint about a missing #angular/cli. What is strange, because #angular/cli is listed in package.json.
Anyway, after installing it with the proposed npm command the build runs again.
npm install --save-dev #angular-devkit/build-angular
Installed this module to fix the issue.
An unhandled exception occurred: Could not find module "#ionic/angular-toolkit" from "/Users/venkat/Documents/www/sgs-birds-web-app/sgsgaushala-app6".
See "/private/var/folders/q6/j4ksfczd66g9xc3wzq7fd9fm0000gp/T/ng-rzJ79t/angular-errors.log" for further details.
[ERROR] An error occurred while running subprocess ng.
I the issue is related to this
maybe you angular.json has some old configuration.
Check the part: "For Ionic/Cordova users, you will need to install the new #ionic/cordova-builders package." so install and verify the new angular configuration and compare with on your project.
https://ionicframework.com/blog/updates-to-ionic-angular-toolkit/

Ionic 5 App not Refreshing HomeScreen after Login

I have an Ionic App that was created with Ionic 3 and recently updated to Ionic 5 (Angular 8).
The App is running in Chrome Browser (with ionic serve) without any problems, and everything is working the way it should.
For almost 2 weeks I am trying to make a version running for iOS.
I have the latest XCode 12 installed and tried to create a build with ionic cordova build ios --prod. After the build is finished I open the Project-File in xCode and try to test it on my iPhone.
The Login-Screen appears and the user can authenticate by clicking a login button. This opens a InAppBrowser where the user can be authenticated. After a successful authentication the InAppBrowser closes and a logged-in flag is set to true.
Usually, this should allow to show some tiles content within the home screen.
For some reason the page is not refreshed and it does not show the tiles.
The first Rest-request seems to be working fine and I can see after I was debugging the home-page that the user-information is received successfully.
In xCode I can see some error messages:
2021-03-11 10:37:06.003856+0100 EPDM[795:40716] WF: _WebFilterIsActive returning: NO
2021-03-11 10:37:06.370470+0100 EPDM[795:40716] [ProcessSwapping] 0x108c981a8 - ProvisionalPageProxy::didFailProvisionalLoadForFrame: pageProxyID=13 webPageID=23, frameID=3, navigationID=3
2021-03-11 10:37:06.370687+0100 EPDM[795:40716] [Process] 0x102079218 - [pageProxyID=13, webPageID=18, PID=804] WebPageProxy::didFailProvisionalLoadForFrame: frameID = 3, domain = NSURLErrorDomain, code = -1004
2021-03-11 10:37:06.371059+0100 EPDM[795:40716] webView:didFailProvisionalNavigation - -1004: Could not connect to the server.
2021-03-11 10:37:15.669294+0100 EPDM[795:40716] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
My question is what might be causing this error?
Thank you in advance for your answers.
"config": {
"ionic_webpack": "./config/webpack.config.js"
},
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"fix": "tslint --c tslint.json 'src/**/*.ts"
},
"dependencies": {
"#angular/animations": "8.2.14",
"#angular/common": "8.2.14",
"#angular/compiler": "8.2.14",
"#angular/compiler-cli": "8.2.14",
"#angular/core": "8.2.14",
"#angular/flex-layout": "^8.0.0-beta.27",
"#angular/forms": "8.2.14",
"#angular/http": "7.2.16",
"#angular/platform-browser": "8.2.14",
"#angular/platform-browser-dynamic": "8.2.14",
"#angular/router": "8.2.14",
"#ionic-native-mocks/http": "^2.0.12",
"#ionic-native/abbyy-rtr": "^5.31.1",
"#ionic-native/barcode-scanner": "^5.31.1",
"#ionic-native/camera": "^5.31.1",
"#ionic-native/core": "^5.31.1",
"#ionic-native/http": "^5.31.1",
"#ionic-native/in-app-browser": "^5.31.1",
"#ionic-native/ionic-webview": "^5.31.1",
"#ionic-native/splash-screen": "^5.31.1",
"#ionic-native/status-bar": "^5.31.1",
"#ionic/angular": "^5.5.4",
"#ionic/angular-toolkit": "2.3.3",
"#ionic/storage": "2.2.0",
"#ngx-translate/core": "^9.1.1",
"#ngx-translate/http-loader": "^2.0.1",
"cordova-android": "^6.4.0",
"cordova-browser": "^4.1.0",
"cordova-ios": "6.2.0",
"cordova-plugin-3dtouch": "1.3.5",
"cordova-plugin-abbyy-rtr-sdk": "^1.0.4",
"hammerjs": "^2.0.8",
"ionicons": "5.4.0",
"lodash": "^4.17.20",
"ngx-progressbar": "^2.1.1",
"npm": "^6.14.8",
"phonegap-plugin-barcodescanner": "^8.1.0",
"rxjs": "^6.6.3",
"rxjs-compat": "^6.6.3",
"svg-pan-zoom": "^3.6.0",
"sw-toolbox": "3.6.0",
"tslint-fix": "^0.1.3",
"zone.js": "0.11.4"
},
"devDependencies": {
"#ahovakimyan/cordova-plugin-wkwebviewxhrfix": "git+https://github.com/AraHovakimyan/cordova-plugin-wkwebviewxhrfix.git",
"#angular-devkit/build-angular": "0.803.19",
"#angular-devkit/build-webpack": "0.803.19",
"#angular-devkit/core": "8.2.2",
"#angular-devkit/schematics": "8.2.2",
"#angular/cli": "8.3.29",
"#angular/compiler-cli": "8.2.14",
"#babel/compat-data": "7.8.0",
"#babel/preset-env": "7.8.0",
"#types/node": "^8.0.45",
"angular2-template-loader": "^0.6.2",
"babel-loader": "8.1.0",
"cordova-plugin-advanced-http": "^3.1.0",
"cordova-plugin-camera": "^4.1.0",
"cordova-plugin-cookies": "0.0.2",
"cordova-plugin-deeplinks": "^1.1.1",
"cordova-plugin-device": "^1.1.7",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-inappbrowser": "^5.0.0",
"cordova-plugin-ionic-webview": "^5.0.0",
"cordova-plugin-keychain-touch-id": "^3.2.1",
"cordova-plugin-splashscreen": "^6.0.0",
"cordova-plugin-whitelist": "^1.3.4",
"cordova-plugin-wkwebviewxhrfix": "^0.1.0",
"cordova-sqlite-storage": "^5.1.0",
"html-loader": "^0.5.1",
"ionic-plugin-keyboard": "^2.2.1",
"istanbul-instrumenter-loader": "^3.0.0",
"null-loader": "^0.1.1",
"phonegap-plugin-barcodescanner": "^8.1.0",
"ts-loader": "^3.0.3",
"ts-node": "^3.0.2",
"typescript": "3.5.1",
"ws": "3.3.2"
},
"description": "An EpdmMobileApps project",
"cordova": {
"plugins": {
"cordova-sqlite-storage": {},
"cordova-plugin-keychain-touch-id": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-deeplinks": {},
"phonegap-plugin-barcodescanner": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-cookies": {},
"cordova-plugin-advanced-http": {
"OKHTTP_VERSION": "3.10.0"
},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-wkwebviewxhrfix": {}
},
"platforms": [
"ios",
"android"
]
}
}
I did try to pin-point the code that was causing this problem.
I was commenting out some steps during the login that might cause problems.
After commenting out the call of the InAppBrowser, i did not see any more errors.
I realized, that the redirect that i received from the backend caused an loaderror -event within the InAppBrowser. This is what created the
'''
webView:didFailProvisionalNavigation - -1004: Could not connect to the server.
'''
error message.
My other code was called from within this InAppBrowser loaderror Event, and i guess that the WebView is not able to handle this after an error occurred.

Ionic Cordova phonegap-plugin-push did work on IOS but stopped recently with 'kill() returned unexpected error 1'

I have added phonegap-plugin-push plugin to an ionic 4.10.2 about two months ago,
it worked and I left the project alone for a while,
now when I recompile it (I don't have the working version anymore) it doesn't work.
The only notable difference since then is the console messages:
kill() returned unexpected error 1
as I have read they have to do with WKWebview and it was never been fixed,
but no one have ever mentioned it has anything to do with push notifications
I also get PushPlugin skip badge
I don't see any version changes in package.json that could indicate a change in versions of plugins.
{
"name": "*******",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/animations": "^8.2.13",
"#angular/cdk": "^8.2.3",
"#angular/common": "~8.1.2",
"#angular/core": "~8.1.2",
"#angular/forms": "~8.1.2",
"#angular/material": "^8.2.3",
"#angular/platform-browser": "~8.1.2",
"#angular/platform-browser-dynamic": "~8.1.2",
"#angular/router": "~8.1.2",
"#ionic-native/call-number": "^5.18.0",
"#ionic-native/camera": "^5.17.0",
"#ionic-native/core": "^5.0.0",
"#ionic-native/launch-navigator": "^5.17.0",
"#ionic-native/push": "^5.19.1",
"#ionic-native/splash-screen": "^5.0.0",
"#ionic-native/status-bar": "^5.0.0",
"#ionic/angular": "^4.7.1",
"#ionic/storage": "^2.2.0",
"angular2-moment": "^1.9.0",
"angular2-signaturepad": "^2.9.0",
"call-number": "^1.0.1",
"cordova-android": "8.1.0",
"cordova-ios": "4.5.5",
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-camera": "^4.1.0",
"cordova-plugin-dialogs": "^2.0.2",
"cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^4.0.0",
"cordova-plugin-splashscreen": "5.0.2",
"cordova-plugin-statusbar": "2.4.2",
"cordova-plugin-whitelist": "1.3.3",
"cordova-sqlite-storage": "^3.4.0",
"cordova-support-google-services": "^1.3.2",
"core-js": "^2.5.4",
"es6-promise-plugin": "^4.2.2",
"hammerjs": "^2.0.8",
"mx.ferreyra.callnumber": "0.0.2",
"phonegap-plugin-multidex": "^1.0.0",
"phonegap-plugin-push": "2.3.0",
"rxjs": "~6.5.1",
"tslib": "^1.9.0",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^5.0.4",
"zone.js": "~0.9.1"
},
"devDependencies": {
"#angular-devkit/architect": "~0.801.2",
"#angular-devkit/build-angular": "~0.801.2",
"#angular-devkit/core": "~8.1.2",
"#angular-devkit/schematics": "~8.1.2",
"#angular/cli": "~8.1.2",
"#angular/compiler": "~8.1.2",
"#angular/compiler-cli": "~8.1.2",
"#angular/language-service": "~8.1.2",
"#ionic/angular-toolkit": "~2.0.0",
"#types/jasmine": "~3.3.8",
"#types/jasminewd2": "~2.0.3",
"#types/node": "~8.9.4",
"codelyzer": "^5.0.0",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.1.3",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.4.3"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"cordova-sqlite-storage": {},
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {
"GOOGLE_API_KEY_FOR_ANDROID": "1234",
"OKHTTP_VERSION": "3.+"
},
"mx.ferreyra.callnumber": {},
"call-number": {},
"phonegap-plugin-push": {}
},
"platforms": [
"android",
"ios"
]
}
}
nothing have change with Firebase and Provisioning files either.
any ideas? did it happen to anyone else recently? or is it just a coincidence and I should put more effort in searching the problem elsewhere

Ionic 3 - your app contains non-public api usage

i have a ionic 3 app that works with emulator android ios and it is publish on google store but when i tryed to upload on apple store it give me back "your app contains non-public api usage"
I'm trying to check all plugin list that may have caused the problem; different from an app I published several days ago are:
barcodescanner
call-number
email-composer
geolocation
leaflet
this is my package.json:
{
"name": "Nome App",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"start": "ionic-app-scripts serve",
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint"
},
"dependencies": {
"#angular/animations": "5.2.11",
"#angular/common": "5.2.11",
"#angular/compiler": "5.2.11",
"#angular/compiler-cli": "5.2.11",
"#angular/core": "5.2.11",
"#angular/forms": "5.2.11",
"#angular/http": "5.2.11",
"#angular/platform-browser": "5.2.11",
"#angular/platform-browser-dynamic": "5.2.11",
"#ionic-native/barcode-scanner": "^4.20.0",
"#ionic-native/call-number": "^4.18.0",
"#ionic-native/core": "~4.18.0",
"#ionic-native/email-composer": "^4.18.0",
"#ionic-native/geolocation": "^4.20.0",
"#ionic-native/in-app-browser": "^4.18.0",
"#ionic-native/network": "^4.20.0",
"#ionic-native/splash-screen": "~4.18.0",
"#ionic-native/status-bar": "~4.18.0",
"#ionic/storage": "2.2.0",
"call-number": "1.0.1",
"cordova-android": "7.1.4",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-email-composer": "0.9.2",
"cordova-plugin-geolocation": "4.0.1",
"cordova-plugin-inappbrowser": "3.0.0",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^3.1.2",
"cordova-plugin-network-information": "2.0.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"ionic-angular": "3.9.3",
"ionicons": "3.0.0",
"leaflet": "^1.5.1",
"phonegap-plugin-barcodescanner": "8.0.1",
"rxjs": "5.5.11",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.29"
},
"devDependencies": {
"#ionic/app-scripts": "3.2.1",
"typescript": "~2.6.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-network-information": {},
"phonegap-plugin-barcodescanner": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"mx.ferreyra.callnumber": {},
"cordova-plugin-email-composer": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-geolocation": {}
},
"platforms": [
"android"
]
}
}
What version of cordova-ios are you using? I had the same error, after trying different things for a couple of days I deleted the plugins folder, then compiled for cordova-ios#4.5.5 and it worked.
ionic cordova platform add ios#4.5.5

IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Branch.build/Objects-normal/armv7/Branch normal armv7

I have used this CLI:
ionic cordova build ios --prod -- --buildFlag="-UseModernBuildSystem=0"
I have tried a lot of workarounds. But none of them worked. Any help would be a great help here.
** ARCHIVE FAILED **
The following build commands failed: Ld
/Users/sampath/Library/Developer/Xcode/DerivedData/You_are_a_CEO-gfwfhmbrnyncfrdrmuirefpabjjv/Build/Intermediates.noindex/ArchiveIntermediates/You\
are\ a\
CEO/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Branch.build/Objects-normal/armv7/Branch
normal armv7 Ld
/Users/sampath/Library/Developer/Xcode/DerivedData/You_are_a_CEO-gfwfhmbrnyncfrdrmuirefpabjjv/Build/Intermediates.noindex/ArchiveIntermediates/You\
are\ a\
CEO/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Branch.build/Objects-normal/arm64/Branch
normal arm64 (2 failures)
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.5.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.1.11
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : ios 4.5.4
Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 29 other plugins)
System:
ios-deploy : 1.9.4
NodeJS : v8.11.3 (/usr/local/bin/node)
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 10.1 Build version 10B61
package.json
{
"name": "ambassador",
"version": "3.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"config": {
"ionic_copy": "./config/copy.config.js"
},
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"optionalDependencies": {
"ios-deploy": "^1.9.4"
},
"dependencies": {
"#agm/core": "^1.0.0-beta.2",
"#angular/common": "5.0.3",
"#angular/compiler": "5.0.3",
"#angular/compiler-cli": "5.0.3",
"#angular/core": "5.0.3",
"#angular/forms": "5.0.3",
"#angular/http": "5.0.3",
"#angular/platform-browser": "5.0.3",
"#angular/platform-browser-dynamic": "5.0.3",
"#ionic-native/app-version": "^4.11.0",
"#ionic-native/background-geolocation": "^4.15.0",
"#ionic-native/background-mode": "^4.8.0",
"#ionic-native/branch-io": "^4.15.0",
"#ionic-native/camera": "^4.5.2",
"#ionic-native/clipboard": "^4.9.1",
"#ionic-native/contacts": "^4.7.0",
"#ionic-native/core": "^4.14.0",
"#ionic-native/diagnostic": "^4.15.0",
"#ionic-native/document-viewer": "^4.15.0",
"#ionic-native/facebook": "^4.12.2",
"#ionic-native/file": "^4.5.2",
"#ionic-native/file-opener": "^4.11.0",
"#ionic-native/file-transfer": "^4.11.0",
"#ionic-native/geolocation": "^4.5.2",
"#ionic-native/google-maps": "^4.14.0",
"#ionic-native/image-resizer": "^4.7.0",
"#ionic-native/in-app-browser": "^4.12.0",
"#ionic-native/keyboard": "^4.11.0",
"#ionic-native/location-accuracy": "^4.5.2",
"#ionic-native/mixpanel": "^4.15.0",
"#ionic-native/music-controls": "^4.8.0",
"#ionic-native/onesignal": "^4.15.0",
"#ionic-native/screen-orientation": "^4.11.0",
"#ionic-native/sms": "^4.15.0",
"#ionic-native/social-sharing": "^4.9.1",
"#ionic-native/splash-screen": "4.4.0",
"#ionic-native/status-bar": "4.4.0",
"#ionic/pro": "^1.0.20",
"#ionic/storage": "2.1.3",
"#vimeo/player": "^2.6.3",
"angular-progress-bar": "^1.0.3",
"angular-svg-round-progressbar": "^2.0.0",
"angular2-google-place": "^2.0.2",
"angular2-jwt": "^0.2.3",
"angularfire2": "5.0.0-rc.6",
"animate.css": "^3.5.2",
"branch-cordova-sdk": "^3.1.3",
"com.synconset.imagepicker": "^2.1.10",
"cordova-android": "6.4.0",
"cordova-clipboard": "^1.2.1",
"cordova-custom-config": "^5.0.2",
"cordova-ios": "4.5.4",
"cordova-plugin-add-swift-support": "^1.7.1",
"cordova-plugin-app-version": "^0.1.9",
"cordova-plugin-background-mode": "git+https://github.com/katzer/cordova-plugin-background-mode.git",
"cordova-plugin-camera": "^4.0.3",
"cordova-plugin-cocoapod-support": "^1.6.0",
"cordova-plugin-contacts": "^3.0.1",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-document-viewer": "^0.9.10",
"cordova-plugin-facebook4": "^2.5.0",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-file-opener2": "^2.0.19",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-geolocation": "^4.0.1",
"cordova-plugin-googlemaps": "^2.4.6",
"cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git#2.6.0",
"cordova-plugin-inappbrowser": "^3.0.0",
"cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-mauron85-background-geolocation": "^2.3.6",
"cordova-plugin-mixpanel": "^4.5.0",
"cordova-plugin-music-controls": "^2.1.4",
"cordova-plugin-nativegeocoder": "^3.1.2",
"cordova-plugin-request-location-accuracy": "^2.2.3",
"cordova-plugin-screen-orientation": "^3.0.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-socialsharing": "^5.4.3",
"cordova-sms-plugin": "^0.1.13",
"cordova-sqlite-storage": "^2.5.2",
"cordova.plugins.diagnostic": "^4.0.10",
"css-animator": "^2.3.0",
"es6-promise-plugin": "^4.2.2",
"firebase": "4.8.2",
"google-maps": "^3.2.1",
"info.protonet.imageresizer": "^0.1.1",
"ionic-angular": "3.9.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionic2-auto-complete": "^1.6.2-alpha",
"ionic2-google-places-autocomplete": "^1.0.2",
"ionicons": "3.0.0",
"jwt-decode": "^2.2.0",
"list": "1.0.0",
"moment": "^2.22.2",
"ngx-slick": "^0.2.1",
"onesignal-cordova-plugin": "^2.4.5",
"promise-polyfill": "^8.0.0",
"pubnub": "^4.21.5",
"pubnub-angular2": "^1.3.1",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"#ionic/app-scripts": "3.1.11",
"#ionic/lab": "1.0.11",
"#types/googlemaps": "^3.30.16",
"typescript": "2.4.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"ionic-plugin-keyboard": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-camera": {
"CAMERA_USAGE_DESCRIPTION": "Upload profile pic",
"PHOTOLIBRARY_USAGE_DESCRIPTION": "Upload profile pic",
"PHOTO_LIBRARY_USAGE_DESCRIPTION": "App would like to access the library."
},
"cordova-plugin-file": {},
"cordova-plugin-file-transfer": {},
"cordova-plugin-geolocation": {
"GEOLOCATION_USAGE_DESCRIPTION": "To locate your Location"
},
"cordova-plugin-contacts": {
"CONTACTS_USAGE_DESCRIPTION": "To invite Friends"
},
"cordova-plugin-splashscreen": {},
"cordova-plugin-request-location-accuracy": {},
"cordova-plugin-statusbar": {},
"info.protonet.imageresizer": {},
"cordova-sqlite-storage": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-music-controls": {},
"cordova-plugin-background-mode": {},
"cordova-clipboard": {},
"cordova-plugin-x-socialsharing": {},
"cordova-plugin-screen-orientation": {},
"cordova-plugin-file-opener2": {},
"cordova-plugin-app-version": {},
"cordova-plugin-inappbrowser": {},
"com.synconset.imagepicker": {
"PHOTOLIBRARY_USAGE_DESCRIPTION": "App would like to access the library.",
"PHOTO_LIBRARY_USAGE_DESCRIPTION": "App would like to access the library."
},
"cordova-plugin-facebook4": {
"APP_ID": "2178440625814934",
"APP_NAME": "You Are a CEO",
"FACEBOOK_ANDROID_SDK_VERSION": "4.+"
},
"cordova-plugin-mixpanel": {
"PLAY_SERVICES_VERSION": "+"
},
"cordova-plugin-document-viewer": {},
"cordova-plugin-googlemaps": {
"API_KEY_FOR_ANDROID": "xxxx",
"API_KEY_FOR_IOS": "xxxxx",
"PLAY_SERVICES_VERSION": "15.0.1",
"ANDROID_SUPPORT_V4_VERSION": "27.+",
"LOCATION_WHEN_IN_USE_DESCRIPTION": "This app wants to get your location while this app runs only.",
"LOCATION_ALWAYS_USAGE_DESCRIPTION": "This app wants to get your location always, even this app runs in background."
},
"branch-cordova-sdk": {},
"cordova-plugin-mauron85-background-geolocation": {
"GOOGLE_PLAY_SERVICES_VERSION": "11+",
"ANDROID_SUPPORT_LIBRARY_VERSION": "23+",
"ICON": "#mipmap/icon",
"SMALL_ICON": "#mipmap/icon",
"ACCOUNT_NAME": "#string/app_name",
"ACCOUNT_LABEL": "#string/app_name",
"ACCOUNT_TYPE": "$PACKAGE_NAME.account",
"CONTENT_AUTHORITY": "$PACKAGE_NAME",
"ALWAYS_USAGE_DESCRIPTION": "This app always requires location tracking"
},
"cordova.plugins.diagnostic": {},
"cordova-sms-plugin": {},
"cordova-plugin-nativegeocoder": {
"LOCATION_WHEN_IN_USE_DESCRIPTION": "Use geocoder service"
},
"onesignal-cordova-plugin": {},
"cordova-custom-config": {}
},
"cordova-plugin-ionic": {
"APP_ID": "xxxx",
"CHANNEL_NAME": "Production",
"UPDATE_METHOD": "background",
"MAX_STORE": "2"
},
"cordova-plugin-ionic-webview": {},
"platforms": [
"android"
]
},
"platforms": [
"android",
"ios"
]
}
Cordova does not support Xcode 10 at the moment. You will be able to make debug builds, but production builds and archiving a build aren't guaranteed. You will have to downgrade Xcode to version 9.x to archive until the next version of cordova ios is released with support for Xcode 10.
Steps to downgrade xcode :
Download an older version of xcode from the Developer site
Unzip the content of the download Replace the xcode folder under
Applications directory with the downloaded folder.
Cordova announcement: https://github.com/apache/cordova-ios/issues/407
Branch.io team has fixed this issue on version 3.1.5.
Fix iOS dependency issue.

Resources