mikkopaderes / ember-firebase-service Goto Github PK
View Code? Open in Web Editor NEWExposes a service that's a direct representation of Firebase
License: MIT License
Exposes a service that's a direct representation of Firebase
License: MIT License
Anybody ran into this too?
In browsers where messaging is not supported, the browser crashes, so one needs to check for support before initialising messaging by calling messaging()
I am injecting the firebase service in my controller, but I get this:
Uncaught FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app/no-app).
And the entire app doesn't load.
What am I missing?
Thanks!
I'm trying to use the arrayUnion function of firestore, but it says that FieldValue is undefined.
firebase: service()
...
this.get('firebase').firestore.FieldValue.arrayUnion(...)
I have ember-firebase-service 6.0.4 and firebase 7.7.0
Getting the following error when I try to build my app after upgrading this addon via the ember-cloud-firestore-adapter:
App is being served by FastBoot
TypeError: Cannot read property 'INTERNAL' of undefined
at /var/folders/q5/0j0lj_2d3f7fl0b5q2zq6sfc0000gn/T/broccoli-87000aEbTt56DYcBg/out-618-broccoli_persistent_filter_replace_filter/assets/node_modules/firebase/firebase-database.js:1:1
at /var/folders/q5/0j0lj_2d3f7fl0b5q2zq6sfc0000gn/T/broccoli-87000aEbTt56DYcBg/out-618-broccoli_persistent_filter_replace_filter/assets/node_modules/firebase/firebase-database.js:1:1
at /var/folders/q5/0j0lj_2d3f7fl0b5q2zq6sfc0000gn/T/broccoli-87000aEbTt56DYcBg/out-618-broccoli_persistent_filter_replace_filter/assets/node_modules/firebase/firebase-database.js:1:1
at /var/folders/q5/0j0lj_2d3f7fl0b5q2zq6sfc0000gn/T/broccoli-87000aEbTt56DYcBg/out-618-broccoli_persistent_filter_replace_filter/assets/node_modules/firebase/firebase-database.js:1:1
at Script.runInContext (vm.js:133:20)
at VMSandbox.eval (/Users/alexmasita/External/Personal/projects/Ember-Apps/mobile-services/node_modules/fastboot/src/vm-sandbox.js:14:16)
at /Users/alexmasita/External/Personal/projects/Ember-Apps/mobile-services/node_modules/fastboot/src/ember-app.js:156:15
It appears this issue is related to the refactor you did around creating fastboot shims on the firebase libraries as when I revert the code to the code on the previous version of this addon, the fastboot server loads without errors. I suspect that there needs to a new way of importing additional libraries other than the documented way below?
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function (defaults) {
const app = new EmberApp(defaults, {
...
});
...
// Maybe we need to shim these as well?
app.import('node_modules/firebase/firebase-database.js');
app.import('node_modules/firebase/firebase-functions.js');
app.import('node_modules/firebase/firebase-storage.js');
return app.toTree();
};
The README suggests adding imports to ember-cli-build.js
:
app.import('vendor/ember-firebase-service/firebase/firebase-auth.js');
app.import('vendor/ember-firebase-service/firebase/firebase-firestore.js');
But (at least when used with ember-cloud-firestore-adapter) this doesn't actually seem to be required. Is that expected? I have a far-from-perfect understanding of exactly how the whole ember build/import resolution pipeline works, so apologies if these are silly questions, but what are the circumstances when adding this is/isn't needed?
ember-cli: 2.11.1
node: 6.9.2
os: darwin x64
vzon-web git:(feature/android-notification) โ ember s
Livereload server on http://localhost:49153
Serving on http://localhost:4200/
The Broccoli Plugin: [BroccoliMergeTrees: TreeMerger (vendor & appJS)] failed with:
Error: ENOENT: no such file or directory, open '/Users/flama/Projects/vzon-web/tmp/source_map_concat-input_base_path-NQYmV0IK.tmp/node_modules/firebase/firebase.js'
at Error (native)
at Object.fs.openSync (fs.js:640:18)
at Object.fs.readFileSync (fs.js:508:33)
at SourceMap.addFile (/Users/flama/Projects/vzon-web/node_modules/fast-sourcemap-concat/lib/source-map.js:75:31)
at /Users/flama/Projects/vzon-web/node_modules/broccoli-concat/concat.js:200:16
at Array.forEach (native)
at Concat.<anonymous> (/Users/flama/Projects/vzon-web/node_modules/broccoli-concat/concat.js:198:24)
at /Users/flama/Projects/vzon-web/node_modules/fast-sourcemap-concat/lib/source-map.js:419:12
at initializePromise (/Users/flama/Projects/vzon-web/node_modules/rsvp/dist/rsvp.js:567:5)
at new Promise (/Users/flama/Projects/vzon-web/node_modules/rsvp/dist/rsvp.js:1039:33)
The broccoli plugin was instantiated at:
at BroccoliMergeTrees.Plugin (/Users/flama/Projects/vzon-web/node_modules/broccoli-plugin/index.js:7:31)
at new BroccoliMergeTrees (/Users/flama/Projects/vzon-web/node_modules/broccoli-merge-trees/index.js:42:10)
at BroccoliMergeTrees (/Users/flama/Projects/vzon-web/node_modules/broccoli-merge-trees/index.js:36:53)
at mergeTrees (/Users/flama/Projects/vzon-web/node_modules/ember-cli/lib/broccoli/merge-trees.js:46:18)
at EmberApp.javascript (/Users/flama/Projects/vzon-web/node_modules/ember-cli/lib/broccoli/ember-app.js:1306:10)
at EmberApp.toArray (/Users/flama/Projects/vzon-web/node_modules/ember-cli/lib/broccoli/ember-app.js:1674:10)
at EmberApp.toTree (/Users/flama/Projects/vzon-web/node_modules/ember-cli/lib/broccoli/ember-app.js:1696:30)
at module.exports (/Users/flama/Projects/vzon-web/ember-cli-build.js:73:14)
at CoreObject.setupBroccoliBuilder (/Users/flama/Projects/vzon-web/node_modules/ember-cli/lib/models/builder.js:84:19)
at CoreObject.init (/Users/flama/Projects/vzon-web/node_modules/ember-cli/lib/models/builder.js:64:10)
cleaning up...
```
Does this support firebase.functions().onCall
? I'd like to use this call a Firebase Function from my route to retrieve some data but I'm unable to find any cases where anyone has accomplished this Ember. Thanks!
Thanks for this service, I have just started looking into it.
I am wondering how I can go about accessing functionality like
new firebase.auth.TwitterAuthProvider();
I can access the global firebase module, but I would rather do it within the service if possible?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.