Closed plackowski closed 4 years ago
I actually saw the same when running the demo app today after merging the v11 plugin version into master. Not sure why this dependency is missing at runtime.
@NathanWalker do you perhaps have an idea? Maybe you've teste tested the demo app locally and didn't have the problem?
In the demo it seems none of the google api's are loaded on Android com.google.firebase
is unavailable. Will see what can find out about the implementation
handling perhaps in postinstaller; not sure - does seem strange.
I got this error too :(((
Same issue too, with version 11.1.1. Downgraded to version 11.1.0 and it works, no issues.
Downgraded to 11.1.0 and.. not works :/ - the same errors
@Arystosedes try removing platform and adding again, downgrading worked for me as well
@nikoTM But I did it. My package.json:
"dependencies": { "@angular/animations": "~10.2.1", "@angular/cdk": "^10.2.7", "@angular/common": "~10.2.1", "@angular/compiler": "~10.2.1", "@angular/core": "~10.2.1", "@angular/fire": "^6.0.4", "@angular/forms": "~10.2.1", "@angular/material": "^10.2.7", "@angular/platform-browser": "~10.2.1", "@angular/platform-browser-dynamic": "~10.2.1", "@angular/router": "~10.2.1", "@nativescript/angular": "~10.1.7", "@nativescript/core": "~7.0.13", "@nativescript/firebase": "^11.1.0", "@nativescript/theme": "~3.0.0", "@ngx-translate/core": "^13.0.0", "@ngx-translate/http-loader": "^6.0.0", "core-js": "^3.6.5", "firebase": "^8.0.0", "nativescript-gif": "^5.0.0", "nativescript-sound": "^1.0.4", "nativescript-texttospeech": "^3.0.1", "nativescript-toasty": "^2.0.1", "nativescript-toasty-ns-7": "^14.0.0", "nativescript-ui-chart": "^8.0.2", "nativescript-ui-listview": "^9.0.4", "nativescript-ui-sidedrawer": "9.0.3", "ngx-custom-validators": "^10.0.0", "npm-check-updates": "^9.2.3", "reflect-metadata": "~0.1.13", "rxjs": "~6.6.3", "tslib": "2.0.3", "zone.js": "~0.11.2" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1002.0", "@angular/cli": "~10.2.0", "@angular/compiler-cli": "~10.2.1", "@nativescript/android": "7.0.1", "@nativescript/schematics": "^10.1.0", "@nativescript/tslint-rules": "~0.0.5", "@nativescript/webpack": "~3.0.8", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.8", "@types/node": "^14.14.6", "@types/stripe-v3": "^3.1.21", "codelyzer": "^6.0.1", "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~6.0.0", "karma": "~5.2.3", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~3.0.3", "karma-jasmine": "~4.0.1", "karma-jasmine-html-reporter": "^1.5.4", "node-sass": "^4.14.1", "protractor": "~7.0.0", "ts-node": "~9.0.0", "tslint": "~6.1.3", "typescript": "~4.0.5" }
@Arystosedes "@nativescript/firebase": "^11.1.0",
will install latest if you run tns install
, what does npm ls --depth=0 | grep firebase
return?
ns platform remove android
npm i @nativescript/firebase@11.1.0
ns debug android
Worked for me
@nikoTM Yes! Now it's working, thx!
Confirmed 11.1.0 is good - 11.1.1 does not include the android libs. @EddyVerbruggen seems like somehow the postinstall is not adding the gradle libs in 11.1.1 - but 11.1.0 is fine.
@NathanWalker Yeah indeed, not sure what changed to kill that. Maybe it's the typescript 4 bump, but I don't see how.
Btw, did your 11.1.1-rc.0 work fine? If so, then it's a build issue on my machine. If it didn't work well then it's a code change.
@EddyVerbruggen confirmed "@nativescript/firebase": "11.1.1-rc.0",
works perfect as well. Possible when you published 11.1.1 maybe a .js file didn't make it? I can pull down packs of both and see what I can tell - a file must be missing from 11.1.1.
Hmm, @NathanWalker perhaps you’re publishing it differently? I’ve always used the publish.sh script in the publish folder.
Perhaps it’s wise if you could just publish 11.1.2 and afterwards I figure it out.
Cheers!
Curiously if I reset to this commit: https://github.com/EddyVerbruggen/nativescript-plugin-firebase/commit/02474da6842ebbf22d3a8f1367354ff85c1d5e4f
git checkout 02474da
Everything works (albeit some typings errors/warnings when running demo but demo runs and works just fine for majority of all the apis in demo) so it's something in the commits subsequent to that which cause it. Haven't tracked it down yet but can look more on Wednesday. I have hunch that something in this changeset causes the issue: https://github.com/EddyVerbruggen/nativescript-plugin-firebase/commit/4a8089b5b53e60a36c0e0baa89190df9f041ddbb
@NathanWalker Thanks, that was very helpful and I found the culprit. Let me do a final check.
So it was this not being in the package.json: https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/53dac31b58d9437ff9f7072e7fb371af2bfeb11f/src/package.json#L8-L11
Didn't affect iOS, did affect Android apparently.
11.1.2 published, thanks for the help!
Good to note thanks @EddyVerbruggen - yes any plugin that has ios/android parts to it (meaning they have platforms/ios or platforms/android folders in them) should keep that key there as cli uses it to include the platform libs that way 👍 - that makes perfect sense now.
Thanks for the patch! Had the same issue with firebase analytics, this update fixed it.
This still happening on 11.1.3 in Android only, have to downgrade to 11.1.2 and worked
This still happening on 11.1.3 in Android only, have to downgrade to 11.1.2 and worked
Same here, 11.1.3 isn't working, downgrading didn't help
I had this same issue - cannot read property 'ads' of undefined. For me, I had removed the firebase plugin by deleting the node_modules directory, and after re-downloading the plugin, that's when I started getting the error message.
However, if you go into the firebase directory and run npm run setup
and then npm run config
it will take you thru the setup process, at which point I was able to compile the app without having any further issues
Hi, maybe it's related to last changes with 11.1.1 (I didn't change anything in my app, just deleted node_modules and install dependencies again) but now I have errors:
Any idea?