Terminal Error : Exception occurred while executing 'list' - firebase

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.

Related

Error: An unexpected error has occurred when running firebase login command

firebase login --debug
i Firebase optionally collects CLI usage and error reporting information to help improve our products. Data is collected in accordance with Google's privacy policy (https://policies.google.com/privacy) and is not used to identify you.
? Allow Firebase to collect CLI usage and error reporting information? Yes
i To change your data collection preference at any time, run firebase logout and log in again.
Visit this URL on this device to log in:
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloudplatformprojects.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffirebase%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&response_type=code&state=151882733&redirect_uri=http%3A%2F%2Flocalhost%3A9005
Waiting for authentication...
[2020-04-21T13:30:57.183Z] Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
Error: An unexpected error has occurred.
Having trouble? Try again or contact support with contents of firebase-debug.log
This problem's solution may depend on the type of OS one is using if you are using window first run cmd as an administrator then type firebase login this should solve this problem and if your OS is Linux you may need to do sudo firebase login can be solved by

Flutter - http.get fails on macos build target: Connection failed

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

Firebase Functions Error while deploying to emulator

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

Error: Server Error. connect ETIMEDOUT 104.197.85.31:443

i am using firebase cli and i try the following
$ firebase init
the cli continue with the message :
You're about to initialize a Firebase project in this directory:
c:\Dev\Test
are you ready to proceed ?
i type y
and choose Hosting:Configure and deploy Firebase Hosting sites
after few second i get the error
Error: Server Error. connect ETIMEDOUT 104.197.85.31:443
what can be the problem ?
my Enviroment specification:
CLI Version: 3.9.1
Platform: win32
Node Version: v7.10.0
Time:Thu Jun 08 2017 18:03:14 GMT+0430 (Iran Daylight Time)
i am useing PSIPHONE also as a proxy but i have also tried without PSIPHONE .
in both cases i get connection timeout
i have pinged 104.197.85.31 the connection is ok .
any suggestion to solve the issue ?
is it because i am in IRAN ?
Just close your terminal and re-run these commands.
firebase login
and now try again
firebase deploy --only hosting
It works for me!!!
I don't know why this is the first result on google but the second result had the answer:
https://stackoverflow.com/a/63832234/3393964
npm i -g firebase-tools
Updating firebase tools worked for me. then, try again firebase deploy.
if it still didn't work try clearing the firebase cache which is the .firebase file
It's on the Firebase's end. You can check status here.
In my case, my work PC started blocking Firebase deploys (Even on my mobile network).
Deploying from my home PC worked just fine.

VS TACO error "Cannot find the app installed on the device" on iOS device

I'm using VS2015 Update 2 with TACO Update 9 and I'm attempting to debug an application on a iPhone 6S (iOS 9.3.1) attached to my Windows computer. The remote build is successful but I get the following messages when it attempts to debug the app:
2>------ Deploy started: Project: xyz, Configuration: Debug iOS ------
2>Found iTunes version: 12.3.0.44
2>Uninstalling app ID: com.bob.xyz.
2>Successfully installed .ipa file: D:\Documents\Projects\xyz\xyz\bin\iOS\Debug\xyz.ipa.
2>Starting idevicedebugserverproxy.exe at port 3000.
2>Cannot find the app installed on the device. Check that the device is connected, awake, and unlocked.
2>Deployment failed.
When I look on the device, I do not see the application. Are there steps I can take to further debug what might be causing the failure?
Make sure your solution is configured for Debug build and not Release.

Resources