EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 448 forks source link

not working after upgrading to {N} 7 #1815

Open gyan-nsf opened 3 years ago

gyan-nsf commented 3 years ago

This plugin is not working after upgrading project to NS7. If i run the android project in AndroidStudio , it solves the problems automatically and app runs successfully.

below is the terminal output

`gparkash@INDEL-L-C02ZR7S0MD6N Archive % ns debug android Searching for devices... Preparing project... File change detected. Starting incremental webpack compilation...

webpack is watching the files…

Hash: 102543027bb534530dcb Version: webpack 4.44.2 Time: 25182ms Built at: 05/12/2021 13:18:37 Asset Size Chunks Chunk Names assets/i18n/ES.json 10.3 KiB [emitted]
assets/i18n/en_us.json 18.7 KiB [emitted]
assets/slide1.jpg 212 KiB [emitted]
assets/slide2.jpg 445 KiB [emitted]
assets/slide3.jpg 460 KiB [emitted]
assets/slide4.jpg 621 KiB [emitted]
assets/slide5.jpg 956 KiB [emitted]
assets/slide6.jpg 12.7 KiB [emitted]
bundle.js 5.15 MiB bundle [emitted] bundle fonts/Barlow-BlackItalic.ttf 106 KiB [emitted]
fonts/Barlow-Bold.ttf 99.6 KiB [emitted]
fonts/Barlow-BoldItalic.ttf 103 KiB [emitted]
fonts/Barlow-Medium.ttf 95 KiB [emitted]
fonts/Barlow-MediumItalic.ttf 100 KiB [emitted]
fonts/Barlow-Regular.ttf 95.6 KiB [emitted]
fonts/Barlow-SemiBold.ttf 99.7 KiB [emitted]
fonts/Barlow-SemiBoldItalic.ttf 103 KiB [emitted]
fonts/BarlowSemiCondensed-Medium.ttf 96.5 KiB [emitted]
fonts/BarlowSemiCondensed-Regular.ttf 96.9 KiB [emitted]
fonts/BarlowSemiCondensed-SemiBold.ttf 101 KiB [emitted]
fonts/BarlowSemiCondensed-SemiBoldItalic.ttf 105 KiB [emitted]
fonts/fa-solid-900.ttf 130 KiB [emitted]
package.json 2.52 KiB [emitted]
runtime.js 77.1 KiB runtime [emitted] runtime tns-java-classes.js 0 bytes [emitted]
vendor.js 18.9 MiB vendor [emitted] vendor Entrypoint bundle = runtime.js vendor.js bundle.js [./app.css] 1.07 KiB {bundle} [built] [./app/app-routing.module.ts] 2.11 KiB {bundle} [built] [./app/app.component.ts] 34.6 KiB {bundle} [built] [./app/app.module.ts] 5.78 KiB {bundle} [built] [./app/auth.interceptor.ts] 5.01 KiB {bundle} [built] [./app/common/custom-model/custom-model.component.ts] 12.8 KiB {bundle} [built] [./app/refresh-token.interceptor.ts] 2.47 KiB {bundle} [built] [./app/services/app-settings.service.ts] 2.34 KiB {bundle} [built] [./app/services/auth.service.ts] 5.28 KiB {bundle} [built] [./app/services/httpService.service.ts] 11.1 KiB {bundle} [built] [./app/services/loader.service.ts] 1.47 KiB {bundle} [built] [./app/services/logger.service.ts] 5.97 KiB {bundle} [built] [./app/services/token.service.ts] 4.71 KiB {bundle} [built] [./app/services/translation-service.ts] 5.55 KiB {bundle} [built] [./main.ts] 3.49 KiB {bundle} [built]

WARNING in ../node_modules/@nativescript/angular/__ivy_ngcc__/fesm2015/nativescript-angular.js 1763:42-58 "export 'BottomNavigation' was not found in '@nativescript/core' @ ./main.ts

WARNING in ../node_modules/@nativescript/angular/__ivy_ngcc__/fesm2015/nativescript-angular.js 1793:40-54 "export 'TabContentItem' was not found in '@nativescript/core' @ ./main.ts

WARNING in ../node_modules/@nativescript/angular/__ivy_ngcc__/fesm2015/nativescript-angular.js 1791:34-42 "export 'TabStrip' was not found in '@nativescript/core' @ ./main.ts

WARNING in ../node_modules/@nativescript/angular/__ivy_ngcc__/fesm2015/nativescript-angular.js 1792:38-50 "export 'TabStripItem' was not found in '@nativescript/core' @ ./main.ts

WARNING in ../node_modules/@nativescript/angular/__ivy_ngcc__/fesm2015/nativescript-angular.js 1794:30-34 "export 'Tabs' was not found in '@nativescript/core' @ ./main.ts

WARNING in ../node_modules/nativescript-sqlite/sqlite.js Module not found: Error: Can't resolve 'nativescript-sqlite-commercial' in '/Volumes/Macintosh-HD-Data/nsf/projects/traq-ns7/Archive/node_modules/nativescript-sqlite' @ ../node_modules/nativescript-sqlite/sqlite.js @ ./app/DBService.service.ts @ ./app/app.component.ts @ ./app/app.module.ts @ ./main.ts

WARNING in ../node_modules/nativescript-sqlite/sqlite.js Module not found: Error: Can't resolve 'nativescript-sqlite-encrypted' in '/Volumes/Macintosh-HD-Data/nsf/projects/traq-ns7/Archive/node_modules/nativescript-sqlite' @ ../node_modules/nativescript-sqlite/sqlite.js @ ./app/DBService.service.ts @ ./app/app.component.ts @ ./app/app.module.ts @ ./main.ts

WARNING in ../node_modules/nativescript-sqlite/sqlite.js Module not found: Error: Can't resolve 'nativescript-sqlite-sync' in '/Volumes/Macintosh-HD-Data/nsf/projects/traq-ns7/Archive/node_modules/nativescript-sqlite' @ ../node_modules/nativescript-sqlite/sqlite.js @ ./app/DBService.service.ts @ ./app/app.component.ts @ ./app/app.module.ts @ ./main.ts

WARNING in /Volumes/Macintosh-HD-Data/nsf/projects/traq-ns7/Archive/nativescript.config.ts is part of the TypeScript compilation but it's unused. Add only entry points to the 'files' or 'include' properties in your tsconfig.

WARNING in /Volumes/Macintosh-HD-Data/nsf/projects/traq-ns7/Archive/src/app/auth-expired.interceptor.ts is part of the TypeScript compilation but it's unused. Add only entry points to the 'files' or 'include' properties in your tsconfig.

WARNING in /Volumes/Macintosh-HD-Data/nsf/projects/traq-ns7/Archive/src/app/areamanagerdashboard/areamanagerdashboard.module.ts is part of the TypeScript compilation but it's unused. Add only entry points to the 'files' or 'include' properties in your tsconfig.

WARNING in /Volumes/Macintosh-HD-Data/nsf/projects/traq-ns7/Archive/src/app/auth/auth.module.ts is part of the TypeScript compilation but it's unused. Add only entry points to the 'files' or 'include' properties in your tsconfig.

WARNING in /Volumes/Macintosh-HD-Data/nsf/projects/traq-ns7/Archive/src/app/dashboard/dashboard.module.ts is part of the TypeScript compilation but it's unused. Add only entry points to the 'files' or 'include' properties in your tsconfig. Webpack compilation complete. Watching for file changes. Webpack build done! nativescript-plugin-firebase: building for same environment, not forcing prepare. Updating runtime package.json with configuration values... Project successfully prepared (android) Configure firebase Copy /Volumes/Macintosh-HD-Data/nsf/projects/traq-ns7/Archive/App_Resources/Android/google-services.json to /Volumes/Macintosh-HD-Data/nsf/projects/traq-ns7/Archive/platforms/android/app/google-services.json. Building project... Gradle build... Unable to apply changes on device: emulator-5554. Error is: spawn ./gradlew ENOENT. ` below the the error showing in phone screen

`java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/gson/Gson;

SecureStorage(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:150907:140) at httpService(file:///data/user/0/com.traqtion.retail/files/app/bundle.js:29697:30) at httpService_Factory(file:///data/user/0/com.traqtion.retail/files/app/bundle.js:29888:61) at hydrate(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:55054:35) at get(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:54875:33) at injectInjectorOnly(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:48803:33) at ɵɵinject(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:48807:61) at AuthService_Factory(file:///data/user/0/com.traqtion.retail/files/app/bundle.js:29213:122) at hydrate(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:55054:35) at get(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:54875:33) at get(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:68949:33) at get(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:68663:35) at lookupTokenUsingModuleInjector(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:47192:39) at getOrCreateInjectable(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:47304:12) at ɵɵdirectiveInject(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:58324:12) at AppComponent_Factory(file:///data/user/0/com.traqtion.retail/files/app/bundle.js:1156:283) at getNodeInjectable(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:47399:44) at instantiateRootComponent(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:53758:23) at createRootComponent(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:56070:23) at create(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:68752:25) at bootstrap(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:73131:42) at (file:///data/user/0/com.traqtion.retail/files/app/vendor.js:72844:64) at _moduleDoBootstrap(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:72844:44) at (file:///data/user/0/com.traqtion.retail/files/app/vendor.js:72814:26) at push.../node_modules/@nativescript/zone-js/zone-nativescript.js.ZoneDelegate.invoke(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:151581:26) at onInvoke(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:72197:33) at push.../node_modules/@nativescript/zone-js/zone-nativescript.js.ZoneDelegate.invoke(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:151580:32) at push.../node_modules/@nativescript/zone-js/zone-nativescript.js.Zone.run(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:151331:43) at (file:///data/user/0/com.traqtion.retail/files/app/vendor.js:152076:34) at push.../node_modules/@nativescript/zone-js/zone-nativescript.js.ZoneDelegate.invokeTask(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:151614:31) at onInvokeTask(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:72185:33) at push.../node_modules/@nativescript/zone-js/zone-nativescript.js.ZoneDelegate.invokeTask(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:151613:36) at push.../node_modules/@nativescript/zone-js/zone-nativescript.js.Zone.runTask(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:151381:47) at drainMicroTaskQueue(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:151788:35) at bootstrap(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:94166:29) at (file:///data/user/0/com.traqtion.retail/files/app/vendor.js:94178:13) at _handleEvent(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:105737:23) at notify(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:105720:24) at notifyLaunch(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:126774:56) at setActivityContent(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:126677:28) at onCreate(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:126509:14) at onCreate(file:///data/user/0/com.traqtion.retail/files/app/vendor.js:124058:25)

` below is the output of ns doctor command

No issues were detected. ✔ Your ANDROID_HOME environment variable is set and points to correct directory. ✔ Your adb from the Android SDK is correctly installed. ✔ The Android SDK is installed. ✔ A compatible Android SDK for compilation is found. ✔ Javac is installed and is configured properly. ✔ The Java Development Kit (JDK) is installed and is configured properly. ✔ Xcode is installed and is configured properly. ✔ xcodeproj is installed and is configured properly. ✔ CocoaPods are installed. ✔ CocoaPods update is not required. ✔ CocoaPods are configured properly. ✔ Your current CocoaPods version is newer than 1.0.0. ✔ Python installed and configured correctly. ✔ The Python 'six' package is found. ✔ Xcode version 12.4.0 satisfies minimum required version 10. ✔ Getting NativeScript components versions information... ⚠ Update available for component nativescript. Your current version is 7.2.1 and the latest available version is 8.0.2.

and my package.json

{ "description": "my bla bla app", "license": "SEE LICENSE IN <your-license-filename>", "repository": "<fill-your-repository-here>", "dependencies": { "@angular/animations": "~11.0.0", "@angular/common": "~11.0.0", "@angular/compiler": "~11.0.0", "@angular/core": "~11.0.0", "@angular/forms": "~11.0.0", "@angular/platform-browser": "~11.0.0", "@angular/platform-browser-dynamic": "~11.0.0", "@angular/router": "~11.0.0", "@aquinn/inappbrowser": "1.0.2", "@danvick/ngx-translate-nativescript-loader": "^2.0.0", "@dsvishchov/nativescript-ngx-shadow": "7.0.3", "@finanzritter/nativescript-pdf-view": "3.0.3", "@finanzritter/nativescript-share-file": "2.0.0", "@nativescript/angular": "10.0.0", "@nativescript/appversion": "2.0.0", "@nativescript/background-http": "^5.0.1", "@nativescript/camera": "^5.0.3", "@nativescript/core": "~8.0.0", "@nativescript/datetimepicker": "^2.0.4", "@nativescript/directions": "^2.0.0", "@nativescript/fingerprint-auth": "^7.0.0", "@nativescript/firebase": "11.1.3", "@nativescript/geolocation": "^7.0.0", "@nativescript/iqkeyboardmanager": "^2.0.0", "@nativescript/local-notifications": "5.0.2", "@nativescript/secure-storage": "3.0.0", "@nativescript/theme": "~3.0.0", "@nativescript/zip": "^5.0.0", "@ngx-translate/core": "^11.0.1", "@ngx-translate/http-loader": "^4.0.0", "@types/crypto-js": "^3.1.43", "amazon-cognito-identity-js": "^3.0.12", "crypto-js": "^3.2.0", "file-system": "^2.2.2", "nativescript-sqlite": "^2.3.3", "ng2-translate": "^5.0.0", "platform": "^1.3.5", "reflect-metadata": "~0.1.12", "rxjs": "~6.4.0", "rxjs-compat": "^6.5.2", "tslib": "^1.9.3", "zone.js": "0.9.1", "@nativescript/webpack": "3.0.0" }, "devDependencies": { "@angular/compiler-cli": "~11.0.0", "@compodoc/compodoc": "^1.1.11", "@nativescript/android": "8.0.0", "@nativescript/ios": "8.0.0", "@nativescript/schematics": "~0.5.0", "@nativescript/types": "~7.2.0", "@ngtools/webpack": "~11.0.0", "node-sass": "^4.13.1", "tns-android": "6.5.3", "typescript": "~4.0.0" }, "gitHead": "f548ec926e75201ab1b7c4a3a7ceefe7a4db15af", "readme": "TraQtion Retail Application", "main": "main.js" } app.gradle

`// Add your native dependencies here:

// Uncomment to add recyclerview-v7 dependency dependencies { //implementation 'com.android.support:recyclerview-v7:+' implementation 'com.google.firebase:firebase-analytics:17.2.3' configurations { all*.exclude group: 'com.google.code.gson' } }

// If you want to add something to be applied before applying plugins' include.gradle files // e.g. project.ext.googlePlayServicesVersion = "15.0.1" // create a file named before-plugins.gradle in the current directory and place it there

android {
compileSdkVersion 29 defaultConfig {
generatedDensities = [] applicationId = "com.traqtion.retail" minSdkVersion 23 targetSdkVersion 29 ndkVersion "21.3.6528147" multiDexEnabled true ndk { abiFilters.clear() abiFilters "x86_64", "x86", "arm64-v8a", "armeabi-v7a" } }
aaptOptions {
additionalParameters "--no-version-vectors"
}

lintOptions { checkReleaseBuilds false abortOnError false } } apply plugin: 'com.google.gms.google-services'

def settingsGradlePath

if(project.hasProperty("appResourcesPath")){ settingsGradlePath = "$project.appResourcesPath/Android/settings.gradle"; } else { settingsGradlePath = "$rootDir/../../app/App_Resources/Android/settings.gradle"; }

def settingsGradleFile = new File(settingsGradlePath);

if(settingsGradleFile.exists()) { apply from: settingsGradleFile; } `

before-plugins.gradle

android { project.ext { googlePlayServicesVersion = "+" } }