Giter VIP home page Giter VIP logo

react-native-firebase-starter's Introduction

DEPRECATED

DEPRECATED: This is for RNFB v5 only. For v6 onwards please follow the new projects guide.


React Native Firebase Starter

Backers on Open Collective Sponsors on Open Collective npm version NPM downloads Chat Twitter Follow


A basic react native app with react-native-firebase pre-integrated to get you started quickly.


DEPRECATED

DEPRECATED: This is for RNFB v5 only. For v6 onwards please follow the new projects guide.


Getting Started

If you're only developing for one platform you can ignore the steps below that are tagged with the platform you don't require.

1) Clone & Install Dependencies

  • 1.1) git clone https://github.com/invertase/react-native-firebase-starter.git
  • 1.2) cd react-native-firebase-starter - cd into your newly created project directory.
  • 1.3) Install NPM packages with your package manager of choice - i.e run yarn or npm install

2) Rename Project

You will need to be running Node version 7.6 or greater for the rename functionality to work

  • 2.1) npm run rename - you'll be prompted to enter a project name and company name
  • 2.2) Note down the package name value - you'll need this when setting up your Firebase project

3) [iOS] Install Pods RN < 0.60.0

  • 3.1) cd ios and run pod install - if you don't have CocoaPods you can follow these instructions to install it.

4) Add Google Services files (plist & JSON)

  • 4.1) [iOS] Follow the add firebase to your app instructions here to generate your GoogleService-Info.plist file if you haven't done so already - use the package name generated previously as your iOS bundle ID.
  • 4.2) [iOS] Place this file in the ios/ directory of your project.
    • Once added to the directory, add the file to your Xcode project using 'File > Add Files to "[YOUR APP NAME]"โ€ฆ' and selecting the plist file.
  • 4.3) [Android] Follow the manually add firebase to your app instructions here to generate your google-services.json file if you haven't done so already - use the package name generated previously as your Android package name.
  • 4.4) [Android] Place this file in the android/app/ directory of your project.

5) AdMob Setup (Or Removal)

  • 5.1) React Native Firebase Starter kit comes with AdMob pre-install. The default Sample AdMob App ID is used in both the info.plist [iOS] and the AndroidManifest.xml [Android] files. If you don't want to use AdMob, just remove it. If you do, be sure to update your ID!
  • 5.2) [iOS] Remove or change in info.plist by editing the GADApplicationIdentifier key string.
  • 5.3) [Android] Remove or change in AndroidManifest.xml by modifying the content of <meta-data /> tag within the <application /> tag.
  • 5.4) More instrucation can be found here.

6) Start your app

  • 6.1) Start the react native packager, run yarn run start or npm start from the root of your project.
  • 6.2) [iOS] Build and run the iOS app, run npm run ios or yarn run ios from the root of your project. The first build will take some time. This will automatically start up a simulator also for you on a successful build if one wasn't already started.
  • 6.3) [Android] If you haven't already got an android device attached/emulator running then you'll need to get one running (make sure the emulator is with Google Play / APIs). When ready run npm run android or yarn run android from the root of your project.

If all has gone well you'll see an initial screen like the one below.

Screenshots

preview

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Thank you to all our backers! ๐Ÿ™ [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

react-native-firebase-starter's People

Contributors

chrisbianca avatar cmmartin avatar ehesp avatar elpopisencio avatar ijzerenhein avatar joeraut avatar krozett avatar makedirectory avatar mikehardy avatar mikepsinn avatar salakar avatar triskae 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  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  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

react-native-firebase-starter's Issues

Android - Build problem (com.android.tools.layoutlib:layoutlib-api:26.1.2)

I'm getting the following error while trying to run yarn run android.

   > Could not find layoutlib-api.jar (com.android.tools.layoutlib:layoutlib-api:26.1.2).
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/tools/layoutlib/layoutlib-api/26.1.2/layoutlib-api-26.1.2.jar
   > Could not find protos.jar (com.android.tools.analytics-library:protos:26.1.2).
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/tools/analytics-library/protos/26.1.2/protos-26.1.2.jar
   > Could not find builder-model.jar (com.android.tools.build:builder-model:3.1.2).
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/tools/build/builder-model/3.1.2/builder-model-3.1.2.jar
   > Could not find apksig.jar (com.android.tools.build:apksig:3.1.2).
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/tools/build/apksig/3.1.2/apksig-3.1.2.jar
   > Could not find baseLibrary.jar (com.android.databinding:baseLibrary:3.1.2).
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/databinding/baseLibrary/3.1.2/baseLibrary-3.1.2.jar

I didn't change anything in the original repo, just run rename script and tried to run the project on a device.

node: 8.11.1
react-native-cli: 2.0.1
react-native: 0.55.4
OS: Windows 10

Android APP crash on release mode

I can successfully build my app but as soon as I open it gets crashed. Debug mode works perfect, it's just release mode.

ADB Log shows below msg:
screen shot 2018-07-27 at 5 33 47 pm

Building show below logs:
screen shot 2018-07-27 at 5 30 59 pm

adb log says index.android.bundle is not packaged properly. How can I check that? What can be the issue? I can not understand. please guide me on this.

Struggle to get it work with Exponent

I still get the error with the starter

RNFirebase core module was not found natively on iOS, ensure you have correctly included the RNFirebase pod in your projects `Podfile` and have tun `pod install`.

Is it compatible with Exponent or need to run it natively?

iOS Build Failed - ":CFBundleIdentifier", Does Not Exist

I'm trying to run the base starter project. I have followed the readme instructions step by step twice, but I get the following error when running npm run ios. My npm/node versions are: 5.6.0/10.0.0. I can provide more info if necessary.

** BUILD FAILED **


The following build commands failed:

	CompileC /Users/wesleybrooks/SideProjects/ng2Bondfire/react-native-firebase-starter/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Objects-normal/x86_64/RCTShadowView+Internal.o Views/RCTShadowView+Internal.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/Firescreen.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/Firescreen.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] ios: `react-native run-ios`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] ios script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/wesleybrooks/.npm/_logs/2018-05-13T01_41_34_792Z-debug.log

fatal error: 'chrono' file not found

react-native-cli: 2.0.1
react-native: 0.57.1
Xcode: 9.4.1
OSX: 10.13.6

Upon running "npm run ios", I get following error:
In file included from ../../../ios/Pods/Headers/Public/gRPC-C++/grpcpp/support/time.h:22:
../../../ios/Pods/Headers/Public/gRPC-C++/grpcpp/impl/codegen/time.h:22:10: fatal error: 'chrono' file not found
#include
^~~~~~~~
1 error generated.
screen shot 2018-10-14 at 6 56 07 am

React native packager error

Hi,
when I start the packager with npm start it says "Loading dependency graph, done" in the console but afterwards the following error message appears:

ERROR EPERM: operation not permitted, lstat 'C:\Users\D067873\Git\Neu\react-native-firebase-starter\android\app\build\generated\res\google-services\debug'
npm ERR! code ELIFECYCLE
npm ERR! errno 11
npm ERR! [email protected] start: react-native start
npm ERR! Exit status 11
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

The entire debug log looks like this:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Users\D067873\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: C:\Users\D067873\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\D067873\Git\Neu\react-native-firebase-starter\node_modules.bin;C:\Program Files\Docker\Docker\Resources\bin;C:\ProgramData\Oracle\Java\javapath;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0;c:\program files (x86)\windows live\shared;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\Java\jdk-9\bin;C:\Users\D067873\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Program Files\Cloud Foundry;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files (x86)\Skype\Phone;C:\Program Files\MiKTeX 2.9\miktex\bin\x64;C:\Users\D067873\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft VS Code\bin;C:\Users\D067873\apache-maven-3.5.2\bin;C:\Users\D067873\AppData\Roaming\npm;C:\Users\D067873\AppData\Roaming\npm\node_modules\npm;C:\Program Files\Java\jre1.8.0_151\bin;C:\Program Files\PostgreSQL\10\bin;C:\Users\D067873\AppData\Local\Android\Sdk\tools;C:\Users\D067873\AppData\Local\Android\Sdk\platform-tools
9 verbose lifecycle [email protected]~start: CWD: C:\Users\D067873\Git\Neu\react-native-firebase-starter
10 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'react-native start' ]
11 silly lifecycle [email protected]~start: Returned: code: 11 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: react-native start
13 verbose stack Exit status 11
13 verbose stack at EventEmitter. (C:\Users\D067873\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (C:\Users\D067873\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\D067873\Git\Neu\react-native-firebase-starter
16 verbose Windows_NT 10.0.14393
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\D067873\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "start"
18 verbose node v8.9.1
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 11
22 error [email protected] start: react-native start
22 error Exit status 11
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 11, true ]

Npm run android returns "BUILD SUCCESSFUL" and my virtual device displays an error message saying "Unable to load script from assests 'index.andoird.bundle'. Make sure your bundle is packaged correctly or you're running a packager server."

After getting these errors for the first time, I cloned the repository again and tried everything again but I still get the error message. I did everything according to the "Getting Started" from the readme.md.
Thanks a lot for your help.

renaming project fails - 'cannot find module "fs-extra" '

Nikolas-MBP:03-StartupAPP dev$ npm run rename

[email protected] rename /Users/dev/Desktop/workspace/ReactNative/03-StartupAPP
node ./bin/rename.js

module.js:540
throw err;
^

Error: Cannot find module 'fs-extra'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object. (/Users/dev/Desktop/workspace/ReactNative/03-StartupAPP/bin/rename.js:1:74)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] rename: node ./bin/rename.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] rename script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/dev/.npm/_logs/2018-02-25T11_41_41_531Z-debug.log

Could not find method implementation() for arguments [com.google.firebase:firebase-messaging:17.0.0]

When following the steps on the get started guide I get the following error:

Could not find method implementation() for arguments [com.google.firebase:firebase-messaging:17.0.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

npm -v
5.6.0

Running on Ubuntu 18,04

Full output

npm run android --scan

> [email protected] android /home/pedro/Documents/react-native-firebase-starter
> react-native run-android

Scanning folders for symlinks in /home/pedro/Documents/react-native-firebase-starter/node_modules (23ms)
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...

FAILURE: Build failed with an exception.

* Where:
Build file '/home/pedro/Documents/react-native-firebase-starter/android/build.gradle' line: 15

* What went wrong:
A problem occurred evaluating root project 'KleberApp'.
> Could not find method implementation() for arguments [com.google.firebase:firebase-messaging:17.0.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

What can i do to fix this?

PNG file passed as argument. Must be compiled first into .flat file..

I'm getting the build error below when building my Android app on App Center. I was able to pass the build error by adding android.enableAapt2=false to the /android/gradle.properties. What's the ultimate solution? I believe this is a temporary fix?

:appcenter:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease
:react-native-firebase:generateReleaseRFile
Resolved com.facebook.react:react-native:0.55.4 in :react-native-firebase:releaseRuntimeClasspath 
Resolved com.android.support:support-v4:27.0.2 in :react-native-firebase:releaseRuntimeClasspath 
Resolved com.android.support:multidex:1.0.2 in :react-native-firebase:releaseRuntimeClasspath 
:app:processReleaseResources
/Users/vsts/agent/2.133.3/work/1/s/android/app/build/intermediates/res/merged/release/drawable-mdpi/assets_rnfirebase.png: error: uncompiled PNG file passed as argument. Must be compiled first into .flat file..
error: failed parsing overlays.
:app:processReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processReleaseResources'.
> Failed to process resources, see aapt output above for details.

My dependencies on package.json are the following:

  "dependencies": {
    "appcenter": "^1.5.0",
    "appcenter-analytics": "^1.5.0",
    "appcenter-crashes": "^1.5.0",
    "fbjs": "^0.8.16",
    "react": "^16.3.1",
    "react-native": "^0.55.3",
    "react-native-firebase": "^4.0.7"
  }

You guys are ROCKSTARS

I dont know how to send you guys a message that your starter kit and the package react-native-firebase is really a charm. I feel like i would have been dumped in a deep mess if you guys had not done this for community.
I wish (some day i will) to give you guys a heavy reward for this amazing effort. Thankssss A lootttt.

Lots of Love from PAKISTAN.

Android foreground notifications don't work out of the box

iOS foreground and background notifications work fine. Android notifications would show for me in the background but not the foreground. They didn't even trigger the onMessage or onNotification handlers. I struggled for hours before realizing that there is some code that needs to be present in android/app/src/main/AndroidManifest.xml. Per these instructions (https://rnfirebase.io/docs/v4.0.x/messaging/android#Update-Android-Manifest):

  <service android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService">
    <intent-filter>
      <action android:name="com.google.firebase.MESSAGING_EVENT" />
    </intent-filter>
  </service>
  <service android:name="io.invertase.firebase.messaging.RNFirebaseInstanceIdService">
    <intent-filter>
      <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
    </intent-filter>
  </service>

Once I added those lines, everything worked fine.

unable to launch app with expo

I have initialized and set up the starter but when running npm start I don't see the qr code to launch it on the expo client. I installed the expo cli to launch it that way but getting missing app.json errors. Is there something else I need to do to set up expo within the starter project?

EDIT: It seems like expo does not support native modules so I won't be able to use it for development or testing

Rename script does not work

Hello! I'm running the steps to install the app but I'm seeing this when I try to run the command npm run rename:

โžœ  react-native-firebase-starter git:(master) โœ— npm run rename

> [email protected] rename /Users/bdias/Code/react-native-firebase-starter
> node ./bin/rename.js

/Users/bdias/Code/react-native-firebase-starter/bin/rename.js:121
const run = async () => {
                  ^
SyntaxError: Unexpected token (
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] rename: `node ./bin/rename.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] rename script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/bdias/.npm/_logs/2017-11-25T11_56_38_870Z-debug.log

My version of node is v6.9.1 and npm version is 5.5.1. My operating system is macOS High Sierra 10.13.

Any ideas on why this could be happening?

Cocopods error on fresh install

Dillons-MacBook-Pro:ios dillon$ sudo gem install cocoapods
Password:
Successfully installed cocoapods-1.5.3
Parsing documentation for cocoapods-1.5.3
Done installing documentation for cocoapods after 2 seconds
1 gem installed
Dillons-MacBook-Pro:ios dillon$ pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Crashlytics":
  In snapshot (Podfile.lock):
    Crashlytics (= 3.10.9, ~> 3.10.9)

  In Podfile:
    Crashlytics (~> 3.10.9)

None of your spec sources contain a spec satisfying the dependencies: `Crashlytics (~> 3.10.9), Crashlytics (= 3.10.9, ~> 3.10.9)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

is it possible to make app size smaller?

I only need Push Notification so I commented out the import statements, I dont use in MainApplication.java.
But it has still a size of 35,40 Mb, like befor comment out. Is it possible to make the app size smaller?

npm run rename Error: ENFILE: file table overflow

Hi there,

Rename the project fails with this error.

Using node v8.11.3 and after Pod installation success.
Pod installation complete! There are 14 dependencies from the Podfile and 29 total pods installed.

$ npm run rename

> [email protected] rename /Users/diegolaciar/workspace/react-native-firebase-starter
> node ./bin/rename.js

---------------------------------------------------------
Enter your Project name, e.g. My Amazing Project: pepe
---------------------------------------------------------
Enter your Company name, e.g. My Company: loco
---------------------------------------------------------
---------------------------------------
Updating project name: pepe
---------------------------------------
[replaceInFile] Error occurred:  { Error: ENFILE: file table overflow, open './ios/Pods/Headers/Private/gRPC-Core/grpc/grpc_posix.h'
  errno: -23,
  code: 'ENFILE',
  syscall: 'open',
  path: './ios/Pods/Headers/Private/gRPC-Core/grpc/grpc_posix.h' }
(node:53288) UnhandledPromiseRejectionWarning: Error: ENFILE: file table overflow, open './ios/Pods/Headers/Private/gRPC-Core/grpc/grpc_posix.h'
(node:53288) 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:53288) [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.

Execution failed for task ':react-native-firebase:compileDebugJavaWithJavac'

Looks like my project can't find the HeadlessJsTaskService class from com.facebook.react. Followed the instructions from here.

Output I'm getting when running npm run android :

> Task :react-native-firebase:compileDebugJavaWithJavac FAILED
/home/hunter/workspace/react/react-native-firebase-starter/node_modules/react-native-firebase/android/src/main/java/io/upandrunning/firebase/messaging/RNFirebaseBackgroundMessagingService.java:6: error: cannot find symbol
import com.facebook.react.HeadlessJsTaskService;
                         ^
  symbol:   class HeadlessJsTaskService
  location: package com.facebook.react
/home/hunter/workspace/react/react-native-firebase-starter/node_modules/react-native-firebase/android/src/main/java/io/upandrunning/firebase/messaging/RNFirebaseBackgroundMessagingService.java:9: error: package com.facebook.react.jstasks does not exist
import com.facebook.react.jstasks.HeadlessJsTaskConfig;
                                 ^
/home/hunter/workspace/react/react-native-firebase-starter/node_modules/react-native-firebase/android/src/main/java/io/upandrunning/firebase/messaging/RNFirebaseBackgroundMessagingService.java:14: error: cannot find symbol
public class RNFirebaseBackgroundMessagingService extends HeadlessJsTaskService {
                                                          ^

Please let me know if there is any additional information I can provide.

yarn install - lock error

So I try and yarn install this package.json:

{
"name": "CloudMsg",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-jest": "23.4.0",
"babel-preset-react-native-stage-0": "1.0.1",
"fs-extra": "6.0.1",
"jest": "23.4.0",
"react-test-renderer": "16.4.1",
"replace-in-file": "3.4.0"
},
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"rename": "node ./bin/rename.js",
"start": "react-native start",
"test": "jest",
"gradclean": "cd android && ./gradlew clean"
},
"jest": {
"preset": "react-native"
},
"dependencies": {
"fbjs": "0.8.17",
"react": "16.3.2",
"react-native": "0.55.3",
"react-native-fbsdk": "0.7.0",
"react-native-firebase": "4.3.6",
"react-navigation": "2.7.0"
}
}


Output from yarn install -- verbose :
errors.txt

I don't understand really what casues this lock/busy resource. Any chance one of you encountered such problem?

PS. Should I provide other files please give me a hint.

Could not invoke RNFirebaseFirestore.collectionOnSnapshot

@chrisbianca Can this error be related to the recent Android fix in 6b665d7? iOS works fine.

Platform: Android
Version:"react-native-firebase": "^4.0.7"

Whole error message:

Could not invoke RNFirebaseFirestore.collectionOnSnapshot

null

Failed resolution of: Lcom/google/firebase/firestore/QueryListenOptions;

Didn't find class "com.google.firebase.firestore.QueryListenOptions" on path: DexPathList[[zip file "/data/app/com.company.realtimechat-1/base.apk"],nativeLibraryDirectories=[/data/app/com.company.realtimechat-1/lib/x86, /system/fake-libs, /data/app/com.company.realtimechat-1/base.apk!/lib/x86, /system/lib, /vendor/lib]]
invoke
    JavaMethodWrapper.java:383
invoke
    JavaModuleWrapper.java:160
run
    NativeRunnable.java
handleCallback
    Handler.java:751
dispatchMessage
    Handler.java:95
dispatchMessage
    MessageQueueThreadHandler.java:29
loop
    Looper.java:154
run
    MessageQueueThreadImpl.java:192
run
    Thread.java:761

Error when run android

Hi,

when i run npm run android i git this error:
com.android.build.api.transform.TransformException: Error while generating the main dex list.

and when i try it from Android Studio it's give me this error :
Error:Program type already present: com.google.android.gms.internal.measurement.zzabo

Failed to Resolve

I just starting to use this starter. After following all instructions, I got a gradle sync problems even though I didn't change any code/dependencies from the project. Here are some of the problems,

Failed to resolve: multidex
Failed to resolve: firebase-messaging
Failed to resolve: support-fragment
Failed to resolve: support-core-ui
Failed to resolve: runtime
Failed to resolve: common
Failed to resolve: support-annotations

Please help me to solve this, thanks before :)

React-Native-Firebase-Starter

Hi,

Is there are a plan to update the starter kit to v5.x.x ? If so when is it projected to happen?
I'm experiencing bundling failed: Error: Plugin/Preset files are not allowed to export objects, only functions. In /Users/rachelmoskowitz/Desktop/react-native-firebase-starter-master/node_modules/babel-preset-react-native-stage-0/decorator-support.js

which was created here : invertase/react-native-firebase#1290

If not is there a run sheet or could you forward steps to upgrade the starter kit to v5.0.0?

Cheers,
Supergeek

Build does not pass (Android)

Commit: d05061f

Building the project version with ./gradlew build does not work.

First time you try it you get the following error

react-native-firebase-starter/android/app/build/intermediates/res/merged/release/drawable-mdpi/assets_rnfirebase.png: error: uncompiled PNG file passed as argument. Must be compiled first into .flat file..
error: failed parsing overlays.

FAILURE: Build failed with an exception.

This is a common react-native error, and is easily fixed by adding android.enableAapt2=false to gradle.properties.

Attempting to build again generates the following error:

react-native-firebase-starter/android/app/build.gradle: Error: All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.0.2, 26.1.0. Examples include com.android.support:animated-vector-drawable:27.0.2 and com.android.support:support-media-compat:26.1.0 [GradleCompatible]

This error can be solved by adding the following code to android/build.gradle:

allprojects {
    repositories {
        ....
        configurations.all {
            resolutionStrategy {
                force "com.android.support:appcompat-v7:27.0.2"
                force "com.android.support:support-v4:27.0.2"
            }
        }
    }
}

Running ./gradlew build again results in a permission error that I cannot solve however:

  The first 3 errors (out of 8) were:
 react-native-firebase-starter/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/analytics/RNFirebaseAnalytics.java:34: Error: Missing permissions required by FirebaseAnalytics.getInstance: android.permission.ACCESS_NETWORK_STATE and android.permission.WAKE_LOCK [MissingPermission]
      FirebaseAnalytics.getInstance(getReactApplicationContext()).logEvent(name, Arguments.toBundle(params));
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 react-native-firebase-starter/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/analytics/RNFirebaseAnalytics.java:42: Error: Missing permissions required by FirebaseAnalytics.getInstance: android.permission.ACCESS_NETWORK_STATE and android.permission.WAKE_LOCK [MissingPermission]
      FirebaseAnalytics.getInstance(getReactApplicationContext()).setAnalyticsCollectionEnabled(enabled);
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 react-native-firebase-starter/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/analytics/RNFirebaseAnalytics.java:58: Error: Missing permissions required by FirebaseAnalytics.getInstance: android.permission.ACCESS_NETWORK_STATE and android.permission.WAKE_LOCK [MissingPermission]
            FirebaseAnalytics.getInstance(getReactApplicationContext()).setCurrentScreen(activity, screenName, screenClassOverride);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

class file for com.google.android.gms.internal.firebase-perf.zze not found

I cloned the repo. run 'npm i' and then 'react-native run-android', it throws the following exception

Task :app:processDebugGoogleServices
Parsing json file: /Users/shanhong/Code/native/react-native-firebase-starter/android/app/google-services.json

Download https://dl.google.com/dl/android/maven2/com/android/support/support-annotations/27.0.2/support-annotations-27.0.2.jar
Download https://dl.google.com/dl/android/maven2/android/arch/lifecycle/common/1.0.3/common-1.0.3.jar

Task :react-native-firebase:compileDebugJavaWithJavac
/Users/shanhong/Code/native/react-native-firebase-starter/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/perf/RNFirebasePerformance.java:39: error: cannot access zze
getOrCreateTrace(identifier).start();
^
class file for com.google.android.gms.internal.firebase-perf.zze not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Firebase AUTH API to signInWithPhoneNumber is resulting in a 400 bad request

Hi All,

I am using the basic firebase starter kit out on github to test out the firebase authentication piece. Below is the firebase starter kit link which walks through the steps to setup firebase with a basic react native application.

https://github.com/invertase/react-native-firebase-starter

The App.js has been replaced to have a very simple form that takes phone number as input and invokes the firebase auth API signInWithPhoneNumber() to send out a text message. Below is the relevant code

  1. Firebase intilization with all the relevant config details

    firebase.initializeApp({
    apiKey: '',
    authDomain: '<>',
    databaseURL: '<>',
    projectId: '<>',
    storageBucket: '<>',
    messagingSenderId: '<>'
    });

  2. Auth API call

firebase.auth().signInWithPhoneNumber(phoneNumber)
.then(confirmResult => console.log(confirmResult))
.catch(error => this.setState({message: Sign In With Phone Number Error: ${error.message}}));

This above API call(2) is resulting in a 400 bad request. A snapshot of the logs seen in the catlog is as below

05-07 14:04:21.643 3509 6366 W FirebaseAuth: [PhoneVerificationSession] PhoneVerificationSession constructor
05-07 14:04:21.648 3509 4952 W FirebaseAuth: [PhoneNumberAuthPostProcessor] postProcess starts
05-07 14:04:22.284 3509 13712 E Volley : [237] BasicNetwork.performRequest: Unexpected response code 400 for https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode?alt=proto&key=
05-07 14:04:22.286 3509 6366 W FirebaseAuth: [PhoneVerificationSession] onFailure
05-07 14:04:22.451 3509 4952 W FirebaseAuth: [PhoneNumberAuthPostProcessor] postProcess ends

Not sure what the reason for the 400 bad request is. Any help would be highly appreciated.

Please let me know if any more information is needed to understand the issue.

"Loading dependency graph, done"

Environment

  1. Application Target Platform:
  • Both
  1. Development Operating System:

macOS High Sierra 10.13.6

  1. Build Tools:

Xcode 9.4.1

  1. React Native version:

react-native-cli: 2.0.1
react-native: 0.55.4

  1. React Native Firebase Version:

    "react-native-firebase": "^4.3.6",

  2. Firebase Module:

auth, database

  1. Are you using typescript?

no


My project can never get past Loading dependency graph, done.

I rolled back to a previous version when it was working and reinstalled node_moduels with yarn, but it didn't help.

So I then tried starting from scratch, but the same happens with a completely blank react-native-firebase-starter (into which I imported my previous firebase project's credentials).

Note that it works fine when using a blank create-react-native-app app

Terminal shows the following output indefinitely (I've waited for up to 40 minutes):

Scanning folders for symlinks in /Users/dillon/Dropbox/Code/Projects/react-native-firebase-starter/node_modules (22ms)

...

Running Metro Bundler on port 8081.                       

...

Looking for JS files in
   /Users/dillon/Dropbox/Code/Projects/react-native-firebase-starter 


Metro Bundler ready.

Loading dependency graph, done.

The simulator never opens. If I try opening the simulator first and then running yarn start, the simulator doesn't change at all (or even open expo). Opening expo manually doesn't do anything either.

This has happened once before, and I managed to fix it. I believe it was from installing watchman (which I hadn't had installed globally with brew yet)

Here are the fixes I've tried so far, (mostly one at a time, and then rolling back changes):

  1. deleting and reinstalling watchman with brew
  2. watchman watch-del-all after each attempt at bundling
  3. updating node
  4. reinstalling cocoapods
  5. putting various things in my Podfile that stackoverflow suggested
  6. rm -rf node_modules && yarn
  7. `npm start -- --reset-cache
  8. react-native run-ios (this generates a ton of new files in the ios/ folder, but works initially, until I try to add an import statement of any module (even import firebase from 'firebase') in any of my js files and it throws an error on the ios simulator screen that it can't find the module. I can do this again to get that error for you if you'd like me to).
  9. react-native upgrade
  10. remove /usr/local/var/run/watchman/ then brew reinstall the watchman
  11. make sure 127.0.0.1 localhost is in your /etc/hosts file. (it already was)
  12. make sure you aren't using a VPN
  13. uninstall watchman and yarn start
  14. restart computer -___-
  15. Erase all content and settings on xcode simulator
  16. enter http://localhost:8081/index.ios.bundle into the browser resulted in the following output in browser window:

{"message":"Cannot find entry file index.ios.js in any of the roots: [\"/Users/dillon/Dropbox/Code/Projects/monitor\"]","name":"NotFoundError","type":"NotFoundError","status":404,"errors":[{"description":"Cannot find entry file index.ios.js in any of the roots: [\"/Users/dillon/Dropbox/Code/Projects/monitor\"]"}],"stack":"NotFoundError: Cannot find entry file index.ios.js in any of the roots: [\"/Users/dillon/Dropbox/Code/Projects/monitor\"]\n at DependencyGraph.getAbsolutePath (/Users/dillon/Dropbox/Code/Projects/monitor/node_modules/metro/src/node-haste/DependencyGraph.js:317:11)\n at /Users/dillon/Dropbox/Code/Projects/monitor/node_modules/metro/src/DeltaBundler/DeltaCalculator.js:280:416\n at Generator.next (<anonymous>)\n at step (/Users/dillon/Dropbox/Code/Projects/monitor/node_modules/metro/src/DeltaBundler/DeltaCalculator.js:11:445)\n at /Users/dillon/Dropbox/Code/Projects/monitor/node_modules/metro/src/DeltaBundler/DeltaCalculator.js:11:605\n at process._tickCallback (internal/process/next_tick.js:68:7)"}

package.json:

{
  "name": "monitor",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "babel-jest": "^23.4.0",
    "babel-preset-react-native-stage-0": "^1.0.1",
    "detox": "^8.2.3",
    "fs-extra": "^6.0.1",
    "jest": "^23.5.0",
    "react-test-renderer": "^16.4.1",
    "replace-in-file": "^3.4.0"
  },
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "rename": "node ./bin/rename.js",
    "start": "react-native start",
    "test": "jest"
  },
  "jest": {
    "preset": "react-native"
  },
  "detox": {
    "text-runner": "jest",
    "runner-config": "e2e/config.json",
    "configurations": {
      "ios.sim.debug": {
        "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/monitor.app",
        "build": "xcodebuild -workspace ios/monitor.xcworkspace -scheme monitor -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
        "type": "ios.simulator",
        "name": "iPhone 7"
      }
    }
  },
  "dependencies": {
    "etherscan-api": "^8.1.2",
    "fbjs": "^0.8.17",
    "react": "^16.3.2",
    "react-native": "^0.55.3",
    "react-native-firebase": "^4.3.6",
    "react-navigation": "^2.12.1"
  }
}

failure in IOS when doing pod install

This is with latest code pulled out just now

MacBook-Pro:~/dev/react-native/react-native-firebase-starter/ios$ cat ../package.json
{
  "name": "RNFirebaseStarter",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "babel-jest": "22.0.6",
    "babel-preset-react-native-stage-0": "^1.0.1",
    "fs-extra": "^4.0.2",
    "jest": "22.0.6",
    "react-test-renderer": "16.2.0",
    "replace-in-file": "^3.0.0"
  },
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "rename": "node ./bin/rename.js",
    "start": "react-native start",
    "test": "jest"
  },
  "jest": {
    "preset": "react-native"
  },
  "dependencies": {
    "fbjs": "^0.8.16",
    "react": "^16.2.0",
    "react-native": "^0.53.0",
    "react-native-firebase": "^3.2.7"
  }
}

Error:

MacBook-Pro:~/dev/react-native/react-native-firebase-starter/ios$ pod install
Analyzing dependencies
Downloading dependencies
Installing BoringSSL (9.1)
[!] /bin/bash -c
set -e
# Replace "const BIGNUM *I" in rsa.h with a lowercase i, as the former fails when including
# OpenSSL in a Swift bridging header (complex.h defines "I", and it's as if the compiler
# included it in every bridged header).
sed -E -i '.back' 's/\*I,/*i,/g' include/openssl/rsa.h

<snip>
<snip>

      "UNKNOWN_OPTION\0"
      "UNSUPPORTED_OPTION\0"
      "USER_TOO_LONG\0"
      "";
EOF



sed: -e expression #1, char 1: unknown command: `.'

Adopt a create-react-app style?

Thanks for this starter project - it's really useful!

I was wondering whether it is possible or worth changing this project to adopt the same style as create-react-app, where the 'starter project' becomes an npm dependency rather than a seed for the project itself? This has some significant advantages for long term maintenance in that it is much easier to integrate changes and bug fixes from the seed project into your own.

Careful what you name your project: Periods in app name makes it fail

This is just a warning for others who might come across this issue. I will close this issue immediately.

Issue

When you come to the npm run rename part of the instructions, be careful about what you name your project.

I named it "test.app". It failed with an error like this:

/path/to/react-native-firebase-starter/ios/Pods/Target Support Files/Pods-test.app/Pods-test.app-dummy.m:2:32: error: expected identifier or '('
@interface PodsDummy_Pods_test.app : NSObject
                               ^
/path/to/react-native-firebase-starter/ios/Pods/Target Support Files/Pods-test.app/Pods-test.app-dummy.m:4:37: error: expected identifier or '('
@implementation PodsDummy_Pods_test.app
                                    ^
/path/to/react-native-firebase-starter/ios/Pods/Target Support Files/Pods-test.app/Pods-test.app-dummy.m:2:12: error: class 'PodsDummy_Pods_test' defined without specifying a base class [-Werror,-Wobjc-root-class]
@interface PodsDummy_Pods_test.app : NSObject
           ^
/path/to/react-native-firebase-starter/ios/Pods/Target Support Files/Pods-test.app/Pods-test.app-dummy.m:2:32: note: add a super class to fix this problem
@interface PodsDummy_Pods_test.app : NSObject
                               ^
                                : NSObject
3 errors generated.



** BUILD FAILED **



The following build commands failed:
	CompileC /path/to/react-native-firebase-starter/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Pods-test.app.build/Objects-normal/x86_64/Pods-test.app-dummy.o Target\ Support\ Files/Pods-test.app/Pods-test.app-dummy.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/test.app.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/test.app.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Resolution: Name it something without periods. Probably best to name it something without any special characters.

Environment

  1. Application Target Platform: iOS
  1. Development Operating System: macOS High Sierra 10.13.2
  1. Build Tools: Xcode 9.2 (Build version 9C40b)
  1. React Native version: 0.50.3
  1. RNFirebase Version: 3.1.1

Added native package is not exist

Hi, i added a native package to the project. But when i make build, i got an error.

 error: package it.innove does not exist
import it.innove.BleManagerPackage;

My steps:

  1. get repo
  2. add package
  3. rename project
  4. link package
  5. run andorid build
  6. get error

Can I to add native packages in this project?

Build failed. Execution failed for task ':react-native-firebase:processDebugGoogleServices'

Running with Android Studio I fail to build the app.
According to the README and according to Google I used the Firebase Assistant to connect.
After connecting the build failed with the following error:

Error:Execution failed for task ':react-native-firebase:processDebugGoogleServices'. Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.4.2.

new project, npm start leads to Cannot find module '@babel/core'

After following the starter instructions up to the npm start command, I ran into this issue:
node v10.8.0
npm v6.2.0
OSX v10.13.6

npm start

 [email protected] start /Users/spacewaffle/sites/react-native-firebase-starter
 react-native start

internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module '@babel/core'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/spacewaffle/sites/react-native-firebase-starter/node_modules/metro/src/babel-bridge.js:40:20)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/spacewaffle/sites/react-native-firebase-starter/node_modules/babel-register/lib/node.js:152:7)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `react-native start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/spacewaffle/.npm/_logs/2018-08-05T08_26_32_122Z-debug.log

google-service.json is missing

Hi,

I am trying to integrate firebase into my own project that I created using the ignite cli.

The error that I'm facing is

Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it. 
   Searched Location: 
  /home/deepank/Downloads/PizzaApp/android/app/src/debug/google-services.json
  /home/deepank/Downloads/PizzaApp/android/app/google-services.json

The solution to this is to create the file from here: https://developers.google.com/mobile/add
But when I select my firebase project in the dropdown, it says "Visit the Firebase console to manage Google services for this project.", after which I am unable to find what should I do next.

Any kind of help or direction will be helpful.

Android application instantly crashes

Instructions to replicate:

1: Clone the latest build
2: yarn install
3: yarn run rename
4: manually rename rnfirebasestarter folder since rename doesn't do it
5: Add google-services.json
6: react-native run-android

Successful build -> App crashes

Build Failure IOS

After cloning the repo and npm install
pod install produces this failure for 'Crashlytics'

Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Crashlytics":
In snapshot (Podfile.lock):
Crashlytics (= 3.10.4, ~> 3.10.4)

In Podfile:
Crashlytics (~> 3.10.4)

None of your spec sources contain a spec satisfying the dependencies: Crashlytics (~> 3.10.4), Crashlytics (= 3.10.4, ~> 3.10.4).

You have either:

  • out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
  • mistyped the name or version.
  • not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, pod repo update does not happen on pod install by default.

I'm running CocoaPods version 1.5.3 node 8.11.3 . MacOS HighSierra

IOS build - ":CFBundleIdentifier", Does Not Exist

A copy to this: #33 if we want to reopen it that would be great otherwise here is my stack trace from the failed build.

OS: 10.13.4
Node version: 8.2.1



The following build commands failed:

	CompileC /Users/stevenburnett/trackJess/react-native-firebase-starter/ios/build/Build/Intermediates.noindex/RNFirebase.build/Debug-iphonesimulator/RNFirebase.build/Objects-normal/x86_64/RNFirebaseFirestoreCollectionReference.o RNFirebase/firestore/RNFirebaseFirestoreCollectionReference.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/stevenburnett/trackJess/react-native-firebase-starter/ios/build/Build/Intermediates.noindex/RNFirebase.build/Debug-iphonesimulator/RNFirebase.build/Objects-normal/x86_64/RNFirebaseFirestoreDocumentReference.o RNFirebase/firestore/RNFirebaseFirestoreDocumentReference.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)

Installing build/Build/Products/Debug-iphonesimulator/trackJessSleep.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/trackJessSleep.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

[help-wanted] Add tests example

After following the getting started instructions, running npm test results in an error:

 FAIL  ./App.test.js
  โ— Test suite failed to run

    RNFirebase core module was not found natively on iOS, ensure you have correctly included the RNFirebase pod in your projects `Podfile` and have run `pod install`.

     See http://invertase.link/ios for the ios setup guide.

       9 | } from 'react-native'
      10 |
    > 11 | import firebase from 'react-native-firebase'
      12 |
      13 | export default class App extends React.Component {
      14 |   constructor () {
      Error: RNFirebase core module was not found natively on iOS, ensure you have correctly included the RNFirebase pod in your projects `Podfile` and have run `pod install`.

This has already been reported in the react-native-firebase repo and it appears this is expected behavior - according to that thread RNFirebase needs to be mocked out for the tests to work.

Assuming that's all correct, I would propose adding a basic mock for RNFirebase to this starter project and enabling it by default.

Failed to notify dependency resolution listener.

Hello, i have some problems when i try to launch my app. i follow step by step the integration of RNFB in my app but when i compiled i found this error:


* What went wrong:
Failed to notify dependency resolution listener.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[16.0.0,16.0.0]], but resolves to 16.0.2. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-analytics is being requested by various other libraries at [[16.0.1,16.0.1]], but resolves to 16.0.3. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

this is my environement system :

    System:
      OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
      CPU: x64 Intel(R) Core(TM) i5 CPU       M 520  @ 2.40GHz
      Memory: 279.50 MB / 3.64 GB
      Shell: 4.4.19 - /bin/bash
    Binaries:
      Node: 10.11.0 - /usr/bin/node
      Yarn: 1.10.1 - /usr/bin/yarn
      npm: 6.4.1 - /usr/bin/npm
    npmPackages:
      react: 16.5.0 => 16.5.0 
      react-native: 0.57.0 => 0.57.0 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7
      react-native-kill-packager: 1.0.0

BUILD FAILED IOS

Hi there,

I did all the steps from here:
https://github.com/invertase/react-native-firebase-starter

After the step 4.2) [iOS]

npm run ios

I get this error:

** BUILD FAILED **


The following commands produced analyzer issues:
	Analyze Base/RCTModuleMethod.mm normal x86_64
(1 command with analyzer issues)

The following build commands failed:
	CompileC /Users/diegolaciar/workspace/react-native-firebase-starter/ios/build/Build/Intermediates.noindex/RNFirebase.build/Debug-iphonesimulator/RNFirebase.build/Objects-normal/x86_64/RNFirebaseAdMobRewardedVideo.o RNFirebase/admob/RNFirebaseAdMobRewardedVideo.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/IntouchrReactNative.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/IntouchrReactNative.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Thanks in avance for your help.

Renames incorrect files

Moved from: invertase/react-native-firebase#1045

@javan10:

when I running the command "npm run rename", the package "node_modules/react-native-firebase/src/main/java/io/invertase/firebase is also renamed to the name of my_package. resulting in "node_modules/react-native-firebase/src/main/java/io/my_package/

the MainApplication.java does not matter the packages of the firebase.

Failed to load bundle

Hi,

I have followed all the steps and upon completing the last step I am getting this error on iOS.
screen shot 2018-08-01 at 21 15 52

Any ideas?

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.