GithubHelp home page GithubHelp logo

mikkopaderes / ember-firebase-service Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 2.0 2.24 MB

Exposes a service that's a direct representation of Firebase

License: MIT License

JavaScript 71.04% HTML 15.90% TypeScript 11.72% Handlebars 1.33%
ember-addon firebase

ember-firebase-service's Introduction

Hi there ๐Ÿ‘‹

LinkedIn

ember-firebase-service's People

Contributors

ember-tomster avatar mikkopaderes avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ember-firebase-service's Issues

When am I supposed to initialize the app?

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!

Cannot read property 'arrayUnion' of undefined

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 error "Error: Cannot instantiate firebase-database - be sure to load firebase-app.js first."

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();
};

Clarify when/why app.import is needed

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?

Don't works with ember 2.11

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...
```

new firebase.auth.TwitterAuthProvider();

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.