Giter Site home page Giter Site logo

firebase-admin-interop's People

Contributors

alextekartik avatar asaarnak avatar chinhan1991 avatar gazialankus avatar levi-lesches avatar pulyaevskiy avatar skquark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

firebase-admin-interop's Issues

bug: FormatException with document.updateTime

FormatException: Invalid date format 2018-06-10T20:26:58.623519000Z
package:firebase_admin_interop/src/firestore.dart 307:39
DateTime get updateTime => DateTime.parse(nativeInstance.updateTime);

Cannot use UserRecord.customClaims

I tried writing a script to get custom claims and had some trouble reading the server's response. Some observations:

  • According to the Firebase docs, the custom claims are stored as a simple JavaScript Object.
  • According to this package's docs, UserRecord.customClaims is a dynamic.
  • UserRecord.customClaims.runtimeType returns JSObject. Note the capital S. This spelling doesn't match any other class I could find.
  • Trying to cast it to a JsObject from dart:js throws: CastError: Instance of 'PlainJavaScriptObject': type 'PlainJavaScriptObject' is not a subtype of type 'JsObject'. Note that here it refers to the same object as PlainJavaScriptObject whereas claims.runtimeType returned JSObject.
  • Modifying the code outputted by dart2js allows me to use it as a standard JS object.

The last one helped me pin down the issue -- the claims were never converted to a Dart object, so any attempt to use it as such will fail. To fix this I used dartify from the node_interop library:

final Map<String, dynamic> dartClaims = dartify(claims);

That works. I would've submitted a PR with this change, but I'm not quite sure where to put this function call. The UserRecord is a JavaScript binding with only external methods. Does this mean extending UserRecord and changing customClaims to a getter that converts it under the hood? I'm not quite sure what approach would fit in the pattern used in this package.

Align syntax with firebase/firebase-dart where possible (firestore)

This is more of a discussion issue ;)

I'm using Dart on the client (AngularDart) and on the backend (cloud functions). Sometimes I want to try a functionality on the client and also on the backend and see what works best.
For this I have to rewrite the firestore code since there are some minor differences between your code and the code in the client library.

Here is an example of a query in firebase-dart:

firestore.collection("list").where("field", "==", value).get();

where as in firebase-admin-interop a query looks like this:

firestore.collection("list").where("field", isEqualTo: value).get();

There are many other differences especially with DocumentData where your interop library adds more type safety whereas firebase-dart uses only Maps with dynamic values.

Adding documents in firebase-dart:

firestore.collection("list").add({"name": "test"});

in firebase-admin-interop:

DocumentData data = new DocumentData();
data.setString("name", "test");
firestore.collection("list").add(data);

It would be great if we could have some common API and only swap the implementation when needed. Also great for code reuse.
What do you think?

Firestore support

Hello again...as my main interest is Firestore support, I started implementing it:
https://github.com/tekartik/firebase-admin-interop/commits/master

I tried to follow what you did for Firebase database, however I have some different approach for the data, as Firestore data is not json. Currently i have an approach à la ContentValues on Android where you access each field instead of converting a whole map (which is sometimes impossible as there is no easy way to guess the javascript type of an object). It is not finished yet (it is a side project), however I was wondering whether the implementation I started could ended up being merge into yours at some point, if I should pursue on this or if I should endup with a package layer on top of yours.

I don't know build_value enough to see how it could be integrated with the DocumentData approach I have.

Otherwise I was wondering whether you have any plan to have Firestore support (it is a checkbox in your README!) and the expected timeline.

query for a reference does not work

When I try to query a collection for a document with a reference value I get the following error:

Error: Argument "value" is not a valid FieldValue. Detected an object of type "DocumentReference" that doesn't match the expected instance. Please ensure that the Firestore types you are using are from the same NPM package.

Unable to change Firebase Realtime Database URL after initialization

Right now, initializing a FirebaseAdmin instance returns the same cached app even if different initialization options are sent (in my case the database), because the app is cached in a map using its name as key.

Ideally I would need to have multiple instances of different realtime databases and interact with them at the same time.

But in the meanwhile a simple fix to at least be able to re-init the app with a different db would be enough to solve my immediate urgency.

@pulyaevskiy is there anything you can suggest?

Thanks

initializeApp from a firebase function

I wanted to use directly the firebase config from a firebase function to avoid to manually extract the various fields as done in JS here: https://firebase.google.com/docs/functions/get-started#import_the_required_modules_and_initialize

Unfortunately initializeApp does not take an AppOptions parameter. that could allow to do simply

App app = firebaseAdmin.initializeApp(firebaseFunctions.config.firebase);

without having to worry which are the required fields (databaseURL, credential...). I forked it and created this simple change here: https://github.com/tekartik/firebase-admin-interop/commit/4b90ad33f1ec1d7a59f0cfec53e776e2b85994a5
I was able to use the admin feature directly from my cloud fonctions

However it is a breaking change. Let me know if you prefer to keep as is and what would be the way to initialize from a firebaseFunctions config or if you would accept a PR.

Firestore not working

I successfully add data to cloud realtime database, When I try cloud firestore with same config, I get below error:

final serviceAccountKeyFilename = 'firebase_service_account.json';
final admin = FirebaseAdmin.instance;
final cert = admin.certFromPath(serviceAccountKeyFilename);
final app = admin.initializeApp(
new AppOptions(credential: cert, databaseURL: "*****.firebaseio.com"));
app.firestore().settings(FirestoreSettings(timestampsInSnapshots: true));
final ref = app.firestore().document('/price/VLZzbUplZyufGlYoHrzV');
var snapshot = await ref.get();
print(snapshot.data);

(node:21429) UnhandledPromiseRejectionWarning: Error: Error: not supported
at Object.throw_ [as throw] (/Users/arrrrny/Developer/firebase-admin-interop/build/packages/$sdk/dev_compiler/common/dart_sdk.js:4592:9)
at async._AsyncCallbackEntry.new.callback (/Users/arrrrny/Developer/firebase-admin-interop/build/packages/$sdk/dev_compiler/common/dart_sdk.js:28609:39)
at Object._microtaskLoop (/Users/arrrrny/Developer/firebase-admin-interop/build/packages/$sdk/dev_compiler/common/dart_sdk.js:25268:11)
at _startMicrotaskLoop (/Users/arrrrny/Developer/firebase-admin-interop/build/packages/$sdk/dev_compiler/common/dart_sdk.js:25274:11)
at /Users/arrrrny/Developer/firebase-admin-interop/build/packages/$sdk/dev_compiler/common/dart_sdk.js:25349:7
(node:21429) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:21429) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

use enum for EventType or assert them inside methods

Since we are using Dart, could we use enum instead of raw String? It's less error-prone, help avoiding typo
it would be something like this

ref.on(EventType.child_added, (snap) => {
  ///do something
})

Or at least we could assert if eventType is valid inside the methods

firestore DocumentReference.update does not support Preconditions

The node.js API for DocumentReference.update allows an optional second argument, Preconditions. This is missing from the firebase-admin-interop implementation.

The Dart package implements the Precondition object, documents it as used in Transaction, DocumentReference, and WriteBatch, but it is only available in the Transaction.update call, not the other two.

The firestore_binding js DocumentReference collection seems to declare the JS call with the correct arguments:
external Promise update(UpdateData data, [Precondition precondition]);
So it seems like the Dart DocumentReference implementation could just call
nativeInstance.update(docData, _getNativePrecondition(lastUpdateTime))
in the case that an optional Timestamp is passed to it, as is the case with Transaction.

I would like to update documents from DocumentReference, but be sure that I am not overwriting other's changes.

Issue with Firestore GeoPoint data

Using the 1.0.0-dev (latest)

When I try to save GeoPoint data to Firestore I get the following error in the Firebase Functions log:

Error: Cannot encode type ([object Object]) to a Firestore Value
    at Function.encodeValue (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/document.js:775:11)
    at Function.encodeFields (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/document.js:646:36)
    at Function.fromObject (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/document.js:202:55)
    at WriteBatch.create (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/write-batch.js:178:39)
    at DocumentReference.create (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/reference.js:362:8)
    at CollectionReference.add (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/reference.js:2025:24)
    at UnknownJavaScriptObject.add$1 (/user_code/build/src/index.dart.js:818:25)
    at J.add$1$ax (/user_code/build/src/index.dart.js:14976:42)
    at CollectionReference.add$1 (/user_code/build/src/index.dart.js:13837:52)
    at $constructor.dart.pingHandler (/user_code/build/src/index.dart.js:14746:96)

Sample code:

  final document = new DocumentData();
  document.setGeoPoint("location", new GeoPoint(37.7991232,-122.4485953));

  final firestore = app.firebase.firestore();
  firestore
      .collection("test")
      .add(document)
      .then(allowInterop((_) {
        ...
      }));

type (QueryDocumentSnapshot) => DocumentSnapshot' is not a subtype of type '(dynamic) => DocumentSnapshot'

When calling the documents function on a QuerySnapshot I see the following exception:

TypeError: Closure 'QuerySnapshot_documents_closure': type '(QueryDocumentSnapshot) => DocumentSnapshot' is not a subtype of type '(dynamic) => DocumentSnapshot'
    at Object.wrapException 
    at Object.functionTypeCheck
    at Interceptor.map$1$1
    at Object.J.map$1$1$ax 
    at QuerySnapshot.get$documents 
    at index.dart.js

This was working a few days back.
My Dart version is:
Dart VM version: 2.0.0-dev.67.0 (Tue Jul 3 18:17:07 2018 +0200) on "macos_x64"

Running Tests fail

I am running the tests. and getting Environment variables are not set error.
How do I set node environment variables FIREBASE_CONFIG and FIREBASE_SERVICE_ACCOUNT_JSON in dart project?

Thanks!
I did a workaround to get this, but I get below errors when I run tests:

Unsupported operation: _Namespace
org-dartlang-sdk:///sdk/lib/_internal/js_runtime/lib/js_helper.dart 1340:37 Object.wrapException
org-dartlang-sdk:///sdk/lib/_internal/js_runtime/lib/io_patch.dart 200:5 Object._Namespace._namespace
org-dartlang-sdk:///sdk/lib/io/file_impl.dart 486:31 _File.readAsBytesSync
org-dartlang-sdk:///sdk/lib/io/file_impl.dart 592:18
org-dartlang-sdk:///sdk/lib/_internal/js_runtime/lib/async_patch.dart 305:19 _wrapJsFunctionForAsync.closure.$protected
org-dartlang-sdk:///sdk/lib/_internal/js_runtime/lib/async_patch.dart 330:23 _wrapJsFunctionForAsync.
package:stack_trace StackZoneSpecification._registerBinaryCallback.
org-dartlang-sdk:///sdk/lib/_internal/js_runtime/lib/async_patch.dart 235:3 Object._asyncStartSync
===== asynchronous gap ===========================
org-dartlang-sdk:///sdk/lib/async/zone.dart 1062:19 _CustomZone.registerBinaryCallback
org-dartlang-sdk:///sdk/lib/async/zone.dart 292:30 Object._wrapJsFunctionForAsync
org-dartlang-sdk:///sdk/lib/async/future.dart 176:26 Future.Future.
===== asynchronous gap ===========================
org-dartlang-sdk:///sdk/lib/async/zone.dart 1045:19 _CustomZone.registerCallback
org-dartlang-sdk:///sdk/lib/async/zone.dart 962:22 _CustomZone.bindCallbackGuarded
org-dartlang-sdk:///sdk/lib/async/timer.dart 52:37 Object.Timer.Timer
org-dartlang-sdk:///sdk/lib/async/timer.dart 87:9 Object.Future.Future
package:test_api
org-dartlang-sdk:///sdk/lib/_internal/js_runtime/lib/async_patch.dart 305:19 _wrapJsFunctionForAsync.closure.$protected
===== asynchronous gap ===========================
org-dartlang-sdk:///sdk/lib/async/zone.dart 1062:19 _CustomZone.registerBinaryCallback
org-dartlang-sdk:///sdk/lib/async/zone.dart 292:30 Object._wrapJsFunctionForAsync
org-dartlang-sdk:///sdk/lib/async/zone.dart 1124:12 StaticClosure._rootRun
org-dartlang-sdk:///sdk/lib/async/zone.dart 1021:19 _CustomZone.run
org-dartlang-sdk:///sdk/lib/async/zone.dart 1516:10 Object._runZoned

✖ Auth (setUpAll)
NoSuchMethodError: method not found: 'nativeInstance' on null

package:firebase_admin_interop/src/app.dart 46:50 main..
org-dartlang-sdk:///sdk/lib/async/future.dart 224:20 Object.sync
package:test_api
org-dartlang-sdk:///sdk/lib/_internal/js_runtime/lib/async_patch.dart 305:19 _wrapJsFunctionForAsync.closure.$protected
org-dartlang-sdk:///sdk/lib/_internal/js_runtime/lib/async_patch.dart 330:23 _wrapJsFunctionForAsync.
package:stack_trace StackZoneSpecification._registerBinaryCallback.
org-dartlang-sdk:///sdk/lib/_internal/js_runtime/lib/async_patch.dart 235:3 Object._asyncStartSync
===== asynchronous gap ===========================
org-dartlang-sdk:///sdk/lib/async/future.dart 232:37 Object.sync
package:test_api
org-dartlang-sdk:///sdk/lib/_internal/js_runtime/lib/async_patch.dart 305:19 _wrapJsFunctionForAsync.closure.$protected
org-dartlang-sdk:///sdk/lib/_internal/js_runtime/lib/async_patch.dart 330:23 _wrapJsFunctionForAsync.
===== asynchronous gap ===========================
org-dartlang-sdk:///sdk/lib/async/zone.dart 1062:19 _CustomZone.registerBinaryCallback
org-dartlang-sdk:///sdk/lib/async/zone.dart 292:30 Object._wrapJsFunctionForAsync
org-dartlang-sdk:///sdk/lib/async/zone.dart 1124:12 StaticClosure._rootRun
org-dartlang-sdk:///sdk/lib/async/zone.dart 1021:19 _CustomZone.run
org-dartlang-sdk:///sdk/lib/async/zone.dart 1516:10 Object._runZoned
===== asynchronous gap ===========================
org-dartlang-sdk:///sdk/lib/async/zone.dart 1062:19 _CustomZone.registerBinaryCallback
org-dartlang-sdk:///sdk/lib/async/zone.dart 292:30 Object._wrapJsFunctionForAsync
org-dartlang-sdk:///sdk/lib/async/zone.dart 1124:12 StaticClosure._rootRun
org-dartlang-sdk:///sdk/lib/async/zone.dart 1021:19 _CustomZone.run
org-dartlang-sdk:///sdk/lib/async/zone.dart 1516:10 Object._runZoned
===== asynchronous gap ===========================
org-dartlang-sdk:///sdk/lib/async/zone.dart 1062:19 _CustomZone.registerBinaryCallback
org-dartlang-sdk:///sdk/lib/async/zone.dart 292:30 Object._wrapJsFunctionForAsync
org-dartlang-sdk:///sdk/lib/async/future.dart 176:26 Future.Future.
===== asynchronous gap ===========================
org-dartlang-sdk:///sdk/lib/async/zone.dart 1045:19 _CustomZone.registerCallback
org-dartlang-sdk:///sdk/lib/async/zone.dart 962:22 _CustomZone.bindCallbackGuarded
org-dartlang-sdk:///sdk/lib/async/timer.dart 52:37 Object.Timer.Timer
org-dartlang-sdk:///sdk/lib/async/timer.dart 87:9 Object.Future.Future
package:test_api
org-dartlang-sdk:///sdk/lib/_internal/js_runtime/lib/async_patch.dart 305:19 _wrapJsFunctionForAsync.closure.$protected
===== asynchronous gap ===========================
org-dartlang-sdk:///sdk/lib/async/zone.dart 1062:19 _CustomZone.registerBinaryCallback
org-dartlang-sdk:///sdk/lib/async/zone.dart 292:30 Object._wrapJsFunctionForAsync
org-dartlang-sdk:///sdk/lib/async/zone.dart 1124:12 StaticClosure._rootRun
org-dartlang-sdk:///sdk/lib/async/zone.dart 1021:19 _CustomZone.run
org-dartlang-sdk:///sdk/lib/async/zone.dart 1516:10 Object._runZoned

firestore: missing select, offset; startAt/endAt/endAt/endBefore not working; FieldValue not exported

I was playing again with your great wrapper. There were some missing features, and some not working so I took the liberty to create a pull request that you can use (or not!).
#8

the unit tests failed for 2 reasons: Missing the env variables and some tests depends on some existing data.
As a side note, now that initializeApp can use a GOOGLE_CLOUD_PROJECT env variable, you can maybe remove the trick you used in test/setup.dart to set the firebase project
thanks!

Can't read Firestore timestamp field as a DateTime

In Firestore, I have a "time" field with the type timestamp.

I try to read it like this: snapshot.data.getDateTime("time") (I can read other (string) fields just fine)

Here is the exception I get:

_AssertionError {
  message: 'Invalid value provided to DocumentData0.getDateTime().',
  '$thrownJsError': 
   { Assertion failed: "Invalid value provided to DocumentData0.getDateTime()."
       at wrapException (/user_code/build/node/index.dart.js:1458:17)
       at assertThrow (/user_code/build/node/index.dart.js:2000:15)
       at DocumentData0.getDateTime$1 (/user_code/build/node/index.dart.js:8487:13)
       at /user_code/build/node/index.dart.js:9378:74
       at _wrapJsFunctionForAsync_closure.$protected (/user_code/build/node/index.dart.js:3736:15)
       at _wrapJsFunctionForAsync_closure.call$2 (/user_code/build/node/index.dart.js:4029:14)
       at _awaitOnObject_closure.call$1 (/user_code/build/node/index.dart.js:4017:34)
       at _RootZone.runUnary$2$2 (/user_code/build/node/index.dart.js:5268:20)
       at _Future__propagateToListeners_handleValueCallback.call$0 (/user_code/build/node/index.dart.js:4609:55)
       at _Future__propagateToListeners (/user_code/build/node/index.dart.js:4418:108)
     dartException: [Circular],
     name: '',
     '$cachedTrace': _StackTrace { _exception: [Circular], _trace: null } } }

I removed the assert line from the library, which now gives this exception:

JsNoSuchMethodError {
  _message: 'receiver.getTime is not a function',
  _method: 'getTime',
  _receiver: undefined,
  '$thrownJsError': 
   { TypeError: receiver.getTime is not a function
       at UnknownJavaScriptObject.getTime$0 (/user_code/build/node/index.dart.js:767:25)
       at J.getTime$0$x (/user_code/build/node/index.dart.js:9521:41)
       at DocumentData0.getDateTime$1 (/user_code/build/node/index.dart.js:8478:16)
       at /user_code/build/node/index.dart.js:9368:74
       at _wrapJsFunctionForAsync_closure.$protected (/user_code/build/node/index.dart.js:3727:15)
       at _wrapJsFunctionForAsync_closure.call$2 (/user_code/build/node/index.dart.js:4020:14)
       at _awaitOnObject_closure.call$1 (/user_code/build/node/index.dart.js:4008:34)
       at _RootZone.runUnary$2$2 (/user_code/build/node/index.dart.js:5259:20)
       at _Future__propagateToListeners_handleValueCallback.call$0 (/user_code/build/node/index.dart.js:4600:55)
       at _Future__propagateToListeners (/user_code/build/node/index.dart.js:4409:108)
     '$cachedTrace': _StackTrace { _exception: [Circular], _trace: null } } }

When I try to read this field as a string, here's what I get:

CastErrorImplementation {
  message: 'CastError: Instance of \'UnknownJavaScriptObject\': type \'UnknownJavaScriptObject\' is not a subtype of type \'String\'',
  '$thrownJsError': 
   { CastError: Instance of 'UnknownJavaScriptObject': type 'UnknownJavaScriptObject' is not a subtype of type 'String'
       at wrapException (/user_code/build/node/index.dart.js:1454:17)
       at stringTypeCast (/user_code/build/node/index.dart.js:1886:15)
       at /user_code/build/node/index.dart.js:9346:52
       at _wrapJsFunctionForAsync_closure.$protected (/user_code/build/node/index.dart.js:3723:15)
       at _wrapJsFunctionForAsync_closure.call$2 (/user_code/build/node/index.dart.js:4016:14)
       at _awaitOnObject_closure.call$1 (/user_code/build/node/index.dart.js:4004:34)
       at _RootZone.runUnary$2$2 (/user_code/build/node/index.dart.js:5255:20)
       at _Future__propagateToListeners_handleValueCallback.call$0 (/user_code/build/node/index.dart.js:4596:55)
       at _Future__propagateToListeners (/user_code/build/node/index.dart.js:4405:108)
       at _Future__asyncComplete_closure.call$0 (/user_code/build/node/index.dart.js:4508:11)
     dartException: [Circular],
     name: '',
     '$cachedTrace': _StackTrace { _exception: [Circular], _trace: null } } }

NNBD and Code Cleanup

Non Nullable By Default (NNBD)

  • Update all optional parameters without defaults to be nullable by adding a ? to the end of the Type
  • Update all values that can be null with a ? at the end of the Type
  • Force non-null where needed with ! at the end of the Type
  • Remove assertions now accomplished by the compiler and NNBD

Cleanup

  • Convert all Map() to map literals {}
  • Remove new keyword in lib directory

In queries, 'where' values are not converted to native type

If I try to do a simple query with a where clause like

.where('date', isGreaterThan: Timestamp.fromDateTime(DateTime.now())

I get the following error:

Error: Argument "value" is not a valid QueryValue. Detected an object of type "Timestamp" that doesn't match the expected instance. Please ensure that the Firestore types you are using are from the same NPM package.

It seems that value in addCondition are not converted to their native instance

Error: not supported

Tried this code in my "main.dart":

final serviceAccountKeyFilename = 'adminsdk.json';
final admin = FirebaseAdmin.instance;
final cert = admin.certFromPath(serviceAccountKeyFilename);
final app = admin.initializeApp(new AppOptions(
  credential: cert
));
final firestore = app.firestore();
firestore.settings(FirestoreSettings(timestampsInSnapshots: true));

await firestore.collection('notification').add(DocumentData.fromMap({'Hello':'World'}));

Got this error:

/home/redsolver/AndroidStudioProjects/aesapp_server/build/packages/$sdk/dev_compiler/common/dart_sdk.js:4857
  throw obj;
  ^

Error: not supported
    at GoogleProtoFilesRoot.loadSync (/home/redsolver/AndroidStudioProjects/aesapp_server/node_modules/protobufjs/src/root.js:234:15)
    at Object.loadSync (/home/redsolver/AndroidStudioProjects/aesapp_server/node_modules/protobufjs/src/index-light.js:69:17)
    at GrpcClient.loadProto (/home/redsolver/AndroidStudioProjects/aesapp_server/node_modules/firebase-admin/node_modules/google-gax/build/src/grpc.js:159:54)
    at new FirestoreClient (/home/redsolver/AndroidStudioProjects/aesapp_server/node_modules/firebase-admin/node_modules/@google-cloud/firestore/build/src/v1beta1/firestore_client.js:96:42)
    at ClientPool.pool_1.ClientPool [as clientFactory] (/home/redsolver/AndroidStudioProjects/aesapp_server/node_modules/firebase-admin/node_modules/@google-cloud/firestore/build/src/index.js:736:28)
    at ClientPool.acquire (/home/redsolver/AndroidStudioProjects/aesapp_server/node_modules/firebase-admin/node_modules/@google-cloud/firestore/build/src/pool.js:56:35)
    at ClientPool.run (/home/redsolver/AndroidStudioProjects/aesapp_server/node_modules/firebase-admin/node_modules/@google-cloud/firestore/build/src/pool.js:94:29)
    at _clientInitialized.then (/home/redsolver/AndroidStudioProjects/aesapp_server/node_modules/firebase-admin/node_modules/@google-cloud/firestore/build/src/index.js:725:68)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
    at Function.Module.runMain (module.js:696:11)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3

firebase_admin_interop builds are failing

I got working example with firebase_functions_interop after I add firebase_admin_interop builds are failing
pubspec.yaml

name: functions
version: 1.0.0
environment:
  sdk: ">=2.8.0 <3.0.0"
dependencies:
  firebase_functions_interop: ^1.0.2
  firebase_admin_interop: ^1.0.0
  node_interop: ^1.2.0

dev_dependencies:
  build_runner: ^1.0.0
  build_node_compilers: ^0.2.0

pub run build_runner build --output=build
gives error

Error: Null safety features are disabled for this library.
  final String? name;

flutter doctor -v

[✓] Flutter (Channel beta, 1.23.0-18.1.pre, on Mac OS X 10.15.7 19H2 x86_64, locale en)
    • Flutter version 1.23.0-18.1.pre at /Users/sultanmyrza/flutter
    • Framework revision 198df796aa (5 weeks ago), 2020-10-15 12:04:33 -0700
    • Engine revision 1d12d82d9c
    • Dart version 2.11.0 (build 2.11.0-213.1.beta)

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.