I am using Visual Studio 2017, Xamarin 4.5.0.486, Xamarin.Android 7.3.1.2 creating a Wear 2.0 app utilizing FireBase. My code was working fine, but now I'm receiving the following during Initialization:
07-18 11:59:20.453 D/FirebaseApp( 9289): com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
07-18 11:59:20.481 D/FirebaseApp( 9289): com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
07-18 11:59:20.499 I/FA ( 9289): App measurement is starting up, version: 10298
07-18 11:59:20.499 I/FA ( 9289): To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
07-18 11:59:20.515 I/FA ( 9289): To enable faster debug mode event logging run:
07-18 11:59:20.515 I/FA ( 9289): adb shell setprop debug.firebase.analytics.app com.palarum.patient.up.wear
07-18 11:59:20.529 I/FirebaseInitProvider( 9289): FirebaseApp initialization successful
Even though it says "Successful" I am not able to get a token using var token = FirebaseInstanceId.Instance.Token. I get null where I used to get a token.
I'm also seeing FirebaseApp initialization unsuccessful every once in a while.
I'm running the debugger over WiFi to the actual device (LG W280). Google Play Services is installed and available.
I've checked my package_name, I re-downloaded my google-services.json file. All to no avail...
Anyone run into this before or have any suggestions as to what else I should check?
Thanks in advance!
Related
When I try to connect my android device to my mac to test an app via firebase debugview I got this error.
Exception occurred while executing 'list':
java.lang.SecurityException: Shell does not have permission to access user 150
com.android.server.am.ActivityManagerService.handleIncomingUser:14872 android.app.ActivityManager.handleIncomingUser:4802 com.android.server.pm.PackageManagerShellCommand.translateUserId:3499
When I use another android device it connects successfully. Does anyone know why it happens?
I follow the steps above to connect my phone to my mac:
cmd -> cd desktop -> cd platform-tools-1 ->./adb devices -> (Check if the downloaded app and the package name in firebase are the same) ./adb shell pm list packages
./adb shell setprop debug.firebase.analytics.app <package_name> -> ./adb devices ->
follow from the Firebase debugView.
I have a React Native application i installed firebase successfly
"#react-native-firebase/analytics": "^7.6.8",
"#react-native-firebase/app": "^8.4.6",
"#react-native-firebase/crashlytics": "^8.4.11",
i can see on dashboard analytics on firebase that i have One user Active, i do some crash to simulate crashes, but i can't see them on firebase, i have a loader that says add sdk firebase ....
When i see on log console xcode i can see there is problem with crashlytics :
[Firebase/Crashlytics][I-CLS000000] Failed to download settings Error Domain=FIRCLSNetworkError Code=-6 "(null)" UserInfo={retryLimit=1, NSErrorFailingURLStringKey=https://firebase-settings.crashlytics.com/spi/v2/platforms/ios/gmp/1:359190975801:ios:9ed89ac2d5d316ebe184e8/settings?build_version=4&display_version=2.009&instance=107518e136276e412097823086820b54535a54f6&source=1}
2020-10-27 10:46:25.558428+0100 MYAPPLI****[4103:1348887] Task <30DF78EC-4FD2-41EF-A978-33989A7C7CFB>.<2> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "Request timed out earlier than tunneling config was received." UserInfo={_NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <30DF78EC-4FD2-41EF-A978-33989A7C7CFB>.<2>"
), NSLocalizedFailureReason=Request timed out earlier than tunneling config was received., _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <30DF78EC-4FD2-41EF-A978-33989A7C7CFB>.<2>}
I also tried to add log on the reactnative code :
import crashlytics from '#react-native-firebase/crashlytics';
crashlytics().log('Updating user count.');
But nothing showed on crashlytics
any help will be appreciated
-------------------------------Edit---------------------------------------
when i add ${PODS_ROOT}/FirebaseCrashlytics/run to build phase run script i don't get anymore error on log console xcode, but still can't see any log on crashlytics console
I started porting my Flutter app to macos Desktop. The UI started fine. However, as soon as the app makes a network call, it fails instantly with Connection failed (OS Error: Operation not permitted).
Running a one-liner:
final response = await http.get('https://jsonplaceholder.typicode.com/posts/1');
fails with:
Unhandled Exception: SocketException: Connection failed (OS Error:
Operation not permitted, errno = 1),
address = jsonplaceholder.typicode.com, port = 443
#0 IOClient.send (package:http/src/io_client.dart:33:23)
The macos build target comes from Google's sample here.
Flutter (Channel master, v1.9.8-pre.108)
Per my comment on the other answer, you should not use the Xcode capabilities UI for this. It will not correctly handle the two separate entitlement files in a Flutter project.
You need to add:
<key>com.apple.security.network.client</key>
<true/>
to macos/Runner/DebugProfile.entitlements and macos/Runner/Release.entitlements.
This is documented here and here.
Your macOS XCode project lacks Internet permission called "Outgoing Connections (Client)".
Open your macos xcode project - [root]/macos/Runner.xcworkspace
Click "Runner" in Project navigator - general settings will show up. Select "Capabilities" from tabbar and tick option "Outgoing Connections (Client)".
Rebuild your application inside XCode and launch the project.
If you are getting this error Only in Android release then Internet permission must be missing from main manifest. You just need to add Internet permission in Manifest file.
Just add this permission in manifest <uses-permission android:name="android.permission.INTERNET"/>
There are three manifest file available in Android folder
app/src/debug
app/src/main
app/src/profile
Following the docs I have started the GAE Datastore Emulator from a CMD shell.
I used:
gcloud beta emulators datastore start --data-dir=j:\projects\project\datastore
The output is:
WARNING: Reusing existing data in [j:\projects\project\datastore].
Executing: cmd /c C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\cloud-datastore-emulator\cloud_datastore_emulator.cmd start --host=localhost --port=8081 --store_on_disk=True --consistency=0.9 --allow_remote_shutdown j:\projects\project\datastore
[datastore] Jun 08, 2019 5:24:52 PM com.google.cloud.datastore.emulator.CloudDatastore$FakeDatastoreAction$9 apply
[datastore] INFO: Provided --allow_remote_shutdown to start command which is no longer necessary.
[datastore] Jun 08, 2019 5:24:52 PM com.google.cloud.datastore.emulator.impl.LocalDatastoreFileStub <init>
[datastore] INFO: Local Datastore initialized:
[datastore] Type: High Replication
[datastore] Storage: j:\projects\jupiter\datastore\WEB-INF\appengine-generated\local_db.bin
[datastore] Jun 08, 2019 5:24:53 PM com.google.cloud.datastore.emulator.impl.LocalDatastoreFileStub load
[datastore] INFO: The backing store, j:\projects\project\datastore\WEB-INF\appengine-generated\local_db.bin, does not exist. It will be created.
[datastore] API endpoint: http://localhost:8081
[datastore] If you are using a library that supports the DATASTORE_EMULATOR_HOST environment variable, run:
[datastore]
[datastore] export DATASTORE_EMULATOR_HOST=localhost:8081
[datastore]
[datastore] Dev App Server is now running.
[datastore]
[datastore] The previous line was printed for backwards compatibility only.
[datastore] If your tests rely on it to confirm emulator startup,
[datastore] please migrate to the emulator health check endpoint (/). Thank you!
Browsing to localhost:8081 returns Ok
In a second CMD shell I try:
gcloud beta emulators datastore env-init --data-dir=j:\projects\project\datastore > set_vars.cmd && set_vars.cmd
(Google docs don't mention --data-dir=j:\projects\project\datastore but without it the tool looks in the wrong place)
But it fails with:
ERROR: (gcloud.beta.emulators.datastore.env-init) Unable to find env.yaml in the data_dir
[C:\Users\c\AppData\Roaming\gcloud\emulators\datastore]. Please ensure you have started the appropriate emulator.
If I set-up the environment variables manually I get the same results from my CMD shells.
I have tried to reproduced your use case scenario and it worked for me. This is what I have followed:
From Running the Datastore mode Emulator documentation.
Make sure that A Java JRE (version 8 or greater) is installed.
Install the Google Cloud SDK (If already have, update it)
Run the CMD as administrator
Execute $ gcloud components install cloud-datastore-emulator
Exectue $ gcloud beta emulators datastore start --data-dir=C:\PATH\TO\datastore
If get You do not currently have this command group installed. Using it requires the installation of components: [beta]
Then execute $ gcloud components install beta
Execute again $ gcloud beta emulators datastore start --data-dir=C:\PATH\TO\datastore
Open new CMD again as administrator
Execute $ gcloud beta emulators datastore env-init --data-dir=C:\PATH\TO\datastore > set_vars.cmd && set_vars.cmd
The command executed without any issues. This is the response:
C:\Windows\system32>set DATASTORE_DATASET=[PROJECT_ID]
C:\Windows\system32>set DATASTORE_EMULATOR_HOST=localhost:8081
C:\Windows\system32>set DATASTORE_EMULATOR_HOST_PATH=localhost:8081/datastore
C:\Windows\system32>set DATASTORE_HOST=http://localhost:8081
C:\Windows\system32>set DATASTORE_PROJECT_ID=[PROJECT_ID]
C:\Windows\system32>
I would suggest to try the process again from different directory. Make sure that:
You have admin permissions to access the directory.
For testing purposes, try a directory in your desktop.
Update the Google Cloud SDK.
The directory's path don't have a space in it.
Both CMDs should open with administrative privileges.
UPDATED 2019-09-07 following comments.
If you are stuck with Google App Engine (GAE) Standard Python 2.7, and have to run local version of GDS, here is my way of doing it (thought not an answer directly to the question, but still might be relevant to).
I run dev_appengine with datastore parameters. on windows the .bat file might look like this:
set PY="c:\/python27\/python.exe"
set GAE="C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\dev_appserver.py"
set GCSEMU="C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\cloud-datastore-emulator\cloud_datastore_emulator.cmd"
%PY% %GAE% --skip_sdk_update_check=True --datastore_emulator_cmd=%GCSEMU% --port 8080 --host oe.loc .
There are parameters for store location too.
I'm trying to start new Firebase Functions project using latest versions of packages.
I've followed this tutorial https://youtu.be/DYfP-UIKxH0:
Firebase login
Firebase init
Created functions project the same way as tutorial says
Uncommented index.ts content
After that I get this error:
Starting #google-cloud/functions-emulator
[2018-04-04T19:05:12.124Z] Parsing function triggers
[2018-04-04T19:05:12.404Z] Error while deploying to emulator: TypeError: Cannot read property 'call' of undefined
TypeError: Cannot read property 'call' of undefined
at Promise (/usr/local/lib/node_modules/firebase-tools/node_modules/#google-cloud/functions-emulator/src/client/rest-client.js:34:42)
at getService.then (/usr/local/lib/node_modules/firebase-tools/node_modules/#google-cloud/functions-emulator/src/client/rest-client.js:33:16)
at process._tickDomainCallback (internal/process/next_tick.js:135:7)
⚠ functions: Failed to emulate helloWorld
I have latest functions emulator *1.0.0-beta4.
All other libs are in latest versions...
I'm at point where I have no idea how to debug this better and how to resolve this
This error occurs if an existing process listens on port 5000. Double check if there's a process running, e.g. on Mac OS Sierra
sudo lsof -n -iTCP:5000 | grep LISTEN
Stop this process or run firebase on another port, e.g.
firebase -p 7777 serve --only functions
No need to reinstall packages. Error message is not helpful and we spent some time to find the root cause.
It turned out that it was due other app that was listening on port 5001!
Firebase serve stops with some weird message.
Just check as answer below if ports aren't busy