Why do I get this GRPC Error "WARNING: EmulatorService.cpp:448: Cannot find certfile" when I start the emulator? - grpc

Good evening everyone, I have only been dealing with Java and Android Studio for a few months, can someone help me to solve this error? It occurs every time the emulator starts. Thank you
Emulator: Started GRPC server at 127.0.0.1:8554
Emulator: emulator: WARNING: EmulatorService.cpp:448: Cannot find certfile: C:\Users\Sawye.android\emulator-grpc.cer security will be disabled.

Invalidate and Restart option in Android Studio, followed by gradle clean, and manually uninstalling the application from the emulator finally worked for me. Individually, they didn't for whatever reason.
I tried several other options mentioned without any luck. The file it mentioned "emulator-grpc.cer" still doesnt exist anywhere. There is a keystore in that folder called debug.keystore which isn't altered after fixing it, so I'm guessing that error is just misleading about the real problem, whatever it is. Anyway, thought I'd share what worked for me since I searched everywhere for it and didn't find it.

A quick fix:
From the main navbar menu
Tools > Android > SDK Manager > Android SDK > SDK Tools
You'll then see the screen below where you can select '- Android Emulator Hypervisor Driver for AMD Processors (installer) version 1.3.0'
I am not sure what the actual root cause of the issue is, but this patched the issue for me and may help other people.

Here my scenario: I closed the emulator with force quit. After restarting emulator, I always got this error.
Fix: I opened the AVD Manager in Android Studio by selecting Tools > AVD Manager menu. In the opened popup, I chose Wipe Data option as can be seen below image. After that, I restarted emulator and it worked !!!

Your emulator is out of date, please update by launching Android Studio:
Start Android Studio
Select menu "Tools > Android > SDK Manager"
Click "SDK Tools" tab
Check "Android Emulator" checkbox
Click "OK"

Got the same issue, I restarted the computer and then runned again the emulator and it worked. Important! you have to run the app, not debug it. You can use debug after the app is installed again in the emulator

Unless it's preventing your app from running in the emulator, or preventing the emulator from running at all, I wouldn't worry about it. It's something new that Google put into the emulator so it now checks for that file. I looked at an installation which did not have the updates and the cert file was missing there as well, and it ran just fine with no error. I'm not sure what Google is doing, but I know that this wasn't thought through all the way based on the number of people who have been having problems with this.

I was also getting the same error. The above answers didn't fix my issue. I tried a lot of things, then finally when I uninstalled Intel x86 Emulator Accelerator (HAXM installer) from-
Tools > Android > SDK Manager > Android SDK > SDK Tools.
Then I reinstalled Intel x86 Emulator Accelerator (HAXM installer). This fixed my issue and I was able to run my emulator again. Hope it helps!

I have tried all the strange answers above nothing solved the issue. So searched in google's issue tracker, I found someone posted an Issue about it, and here is what the team wrote in response:
Hi, this warning is benign. We'll remove it in a future update.
So as google said: that warning is nothing to be worried, not harmful, and will be removed!
Update:
Issue was now indeed fixed with latest Release Update for the Canary Dev Channel:
Removed prints about certs and GRPC on startup.

You need to add credentials for your application in console.developers.google.com i.e. credentials, clik Api Key 1 and than ADD AN ITEM in Restrict usage to your Android apps.

Related

Flutter release app crashes after first screen

I am working on an app that uses firebase sign. The application is working perfectly on debug mode but when I release it, the application crashes just after the user as successfully login. Since the application is in release mode, there is no way to monitor the logs so as to tell where the error is coming from.
I was using flutter 2.8 from the stable channel but after reading some of the things said on this post, I decided to upgrade to the latest version of the stable channel but still, nothing works. I will appreciate help.
I have clean and pub get
I have use the "--no-shrink" command
I finally fixed it. I added no shrink command to my build.gradle

Install claimed to have succeeded, but application could not be found on device Xcode 11

Just after switching from Xcode 10 to 11, I am unable to install my app on any device
The error at launch time after installation succeeded says :
Install claimed to have succeeded, but application could not be found on device.
Details says :
Could not locate installed application
Domain: com.apple.platform.iphoneos
Code: -1
Recovery Suggestion: Install claimed to have succeeded, but application could not be found on device. bundleId = myBundleId
--
Installed application was not present in database of installed apps after multiple lookup attempts.
Domain: com.apple.platform.iphoneos
Code: -1
However everything works fine on a simulator.
I tried to delete derived data, clean project, delete the app ..
Very strange : After submitting the app to testlfight I can download it and it works.
But when I build a new app to Xcode it launch the app just downloaded from tesflight and not the version pushed via Xcode ..
For me, it's a problem with ipatool.
Here's a way to find out details why it failed to create a proper iPhone App (.ipa) file from the build output/Xcode archive:
Go to Product > Archive, then open Window > Organizer > Distribute App.
It should show you "IPA processing failed" with a big red error symbol.
Now, open the logs and search along these lines:
timestamp Assertion failed: Expected n archs in otool output:
and
timestamp /Path/to/ Xcode-beta.app/Contents/Developer/usr/bin/ipatool exited with 1
While this can't be the final solution, try removing all problematic libraries mentioned in the logs between the two lines until ipatool exists successfully.
I also had this issue/error message. I realized that I had automatic signing deactivated and I had selected a provisioning profil with a distribution certificate.
Solution:
So if you want to run the app on your iphone directly from Xcode (not through testflight) you have to make sure you use a provisioning profil with a developer certificate.
This is probably not the case for most people facing this issue, but I faced it once several days ago and easily dealt with it by cleaning the build folder and switching to a legacy build. The second time I faced it, none of the suggested solutions seemed to be working.
I then noticed that because I'd almost run out of storage on my device, iOS had "offloaded" almost all of my apps. If there is a small cloud under your apps and the app needs to "install" again before launching, then this is the case with your phone too. Trying to launch all of the apps that I don't use regularly (so I never noticed the little clouds) "reinstalled" all of them and solved the issue entirely. Maybe this helps someone facing this for similar reasons.
I have the same problem,I modify the project setting
File --> Workspace Setting --> Build System --> Legacy Build System
it's OK for me
I also got this alert. That's because i run the app in release Build Configuration, but with a appstore Provisioning Profile . It's not allowed. So i change the appstore Provisioning Profile to a dev Profile. Then everything is ok.
Hope this can help you.
I found a way to solve this problem. After I upgraded iOS 13.1, the real machine also ran. Later, I found out that because I had archive operation the day before, the real machine running certificate changed from distribution mode to development mode and everything worked normally.
For my case (xcode 11, ios 12.4), change the Bundle identifier can solve this issue...
Before changing Bundle id, I've tried
using beta xcode
deleting app on iphone
deleting derived data
cleaning project
reopen xcode
Here's another solution. I had previously installed three other apps using XCode and got this error message when I tried to install a fourth.
I simply deleted one of my three existing apps (after hours of hair pulling and SO searching) and tried again. It worked.
Platform: iPad 2018 on v13.1 with XCode v11.1,
I was using different signing team/certificate for ...Tests target.
Setting the same for main target helped.
Update pods if you have.
pod update
just it.

Error: error MT: Failed to launch the simulator. MT0069: The app directory doesn't exist

I use in order to develop cross platform application in xamarin forms but I have an issue. I use vs 2015 enterprise. There is a problem, when I simulate my application on iphoneSimulator. I selected "Configuration" mode as Debug and "Platform" mode as IphoneSimulator. In Windows side I use Xamarin.ios 11.2 and macbook side is same xamarin.ios sdk too. And I can connect windows to macbook successfully. I use xcode version 9.2.
When I run my application,
Launch failed. The app 'ADF.XPF.iOS' could not be launched on 'iPhone 5s iOS 11.2'. Error: error MT0069: The app directory '/Users/yazilim/Library/Caches/Xamarin/mtbs/builds/ADF.XPF.iOS/3d07b519b07c870401ed8b5058cf1d91/bin/iPhoneSimulator/Debug/trgovegmmobil.app' does not exist.
Can you help me about it ?
I also met this before.
1.Delete the app in simulator
2.Delete bin,obj folder
3.Run again
This should solve the problem.
I hope this is helpful for somebody.
I had the same problem.
The message says that some folder of the path does not exists, so in my case i went to the MAC and i realized than the folder mtbs was not created.
Solution
Create the missing folder
After that clean, rebuild and launch the application again.
The accepted answer did not work for me. I took a slightly more radical reproach, and re-cloned my entire GitHub repository on my windows machine. I didn't change anything on the mac, and it worked first time.
I had a similar problem, nothing helped until I manually added the Xamarin.Build.Download package version 0.10.0
YourApp.iOS.csproj:
<PackageReference Include = "Xamarin.Build.Download" Version = "0.10.0" />

Can't start Cordova debugging to iOS simulator

I've followed the instructions at the link below to "Build and simulate a Cordova iOS app in the cloud". https://taco.visualstudio.com/en-us/docs/build_ios_cloud/
After completing the instructions I'm able to build and get the iOS simulator working, however, I'm unable to attach a debugger.
The message displayed in remotebuild is:
GET /cordova/build/5655/debug 500 10.865 ms - 28
In Visual Studio I see the following in the Debug window:
Starting launch process C:\Program Files (x86)\nodejs\node.exe "(redacted)\node_modules\vs-tac\emulator.js" --platform ios --action launch --path "(redacted)\buildInfo.json" --serverUrl https://(redacted):3000/cordova --certificateName (redacted) --language en-US --loglevel info --cliVersion 5.4.1 --npmInstallDir "(redacted)" --deployTarget "iPhone 5"
Timed out connecting debugger to remote Apache Cordova app. See Output window for JavaScript console output.
------ Cordova tools 5.4.1 already installed.
Requesting emulate on iOS Simulator for buildNumber 5655 on server https://(redacted):3000/cordova...
Emulated - Successfully sent to ios Simulator
------ Cordova tools 5.4.1 already installed.
Requesting debug on remote iOS device for buildNumber 5655 on server https://(redacted):3000/cordova...
Failed to Debug iOS remote for build (redacted)\buildInfo.json to https://(redacted):3000/cordova :
iPhone 5
My local development machine is using Visual Studio 2015 and Cordova 5.4.1. I have Node v0.12.2 installed locally and v0.12.9 installed on the MacInCloud. Following the instructions in the link above, I am NOT an admin on the Mac machine.
I've also already tried the instructions suggested in this SO answer: Visual Studio Debugger failing to connect to remote Apache Cordova app in iOS simulator
All the suggestions and the links provided by others were helpful but ultimately my assessment of the problem was not being admin/root on the Mac. The Visual Studio Cordova docs linked in my original question would suggest that you can do all that you need on a Mac without having admin/root access but in my experience that is just not the case.
To the credit of the MacInCloud group, they were very helpful in making changes that I requested to permissions and for reinstalling packages such as brew, ios-webkit-debug-proxy, remotebuild, etc... but after a while that back-and-forth kind of approach to fixing the issue proved painful. When I switched from a Managed MacInCloud server to a Dedicated one, everything worked almost immediately.
Looking back I think the initial execution of remotebuild, which executes brew -- without being admin on the box -- caused the whole process to go south. I was warned when I ran remotebuild for the first time that it would install some brew components that might need root access. That should have been a warning sign to me that not being admin on the box was going to be an issue...
Even though I was able to get a Dedicated MacInCloud server working, the lesson I learned about having control over the Mac prompted me to just buy a Mac Mini. That was a little more difficult to setup because I was now doing everything myself, but ultimately I think it will pay off in the end.
For anyone else struggling with similar issues here is a brain dump of some things I learned along the way:
You don't necessarily need to get Visual Studio talking to the Mac to debug Cordova applications. You can use Safari Web Inspector from the Mac. https://blog.nraboy.com/2015/10/debugging-your-apache-cordova-ios-app-with-safari/. Even though I finally got VS working, I actually prefer this because it is more like Chrome's debugger which I prefer to Visual Studio's.
The ios-webkit-debug-proxy NPM package mentioned in other comments and links is basically a proxy which Visual Studio uses to debug the simulator in exactly the same way Safari does as mentioned above. For this proxy to work you must also be allowed to connect to the Mac over ports 9221-9322. https://github.com/google/ios-webkit-debug-proxy. Prior to learning that I thought I only needed port 3000 open for the remotebuild proxy...
The package necessary for launching the iOS simulator from remotebuild is ios-sim and it will occasionally timeout when launching the simulator and cause the debugger not to attach. This is a known limitation. https://github.com/phonegap/ios-sim and https://blogs.msdn.microsoft.com/visualstudio/2014/11/13/tools-for-apache-cordova-update-ios-debugging-windows-8-1-support/ (see comments).
If you should feel the need to install/uninstall brew it is very easy to do. Just run the install script and if already installed it will give you instructions on how to uninstall. http://brew.sh/ and https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting. To uninstall or reinstall a NPM package is equally easy and Google is your friend.
Read and re-read both of these links for setting up a Mac: https://taco.visualstudio.com/en-us/docs/ios-guide/ and https://taco.visualstudio.com/en-us/docs/build_ios_cloud/. Getting the RemoteBuild.config right is crucial for getting secure connections to work -- especially if you want to access your Mac Mini at home from across the internet.
If you are remoting to a Mac I highly recommend iRAPP or some other VNC alternative. My experience has been that VNC is painfully slow and having a bad connection when you're troubleshooting issues just leads to more aggravation. http://www.coderebel.com/products/irapp/
As mentioned above, the MacInCloud guys were great when I asked for support, but if you do need root access for more than six months the cost of a Mac Mini is less than a Dedicated server plan.
Cheers
Since it is the call to /cordova/[...]/debug that is failing it looks like you might not have ios_webkit_debug_proxy installed. You could try making sure that homebrew is installed (from http://brew.sh) and running brew install ios-webkit-debug-proxy. Afterwards you should be able to run ios_webkit_debug_proxy without an error.
If that runs successfully then you should be able to quit out of ios_webkit_debug_proxy and debugging should work via remotebuild.

iOS Simulator failed to install the application

I have created a Cordova 2.1.0 app, It ran fine for the first 2-3 times. But now when I am trying to run it through terminal it is giving me the following error.I didn't change anything.
Ankurs-Mac-mini:~ ankur$ /Users/ankur/Desktop/CordovaSMS/cordova/emulate
Ankurs-Mac-mini:~ ankur$ 2012-10-17 16:11:08.695 ios-sim[7032:507] stderrPath:
/Users/ankur/Desktop/CordovaSMS/cordova/console.log
2012-10-17 16:11:08.698 ios-sim[7032:507] stdoutPath:
/Users/ankur/Desktop/CordovaSMS/cordova/console.log
[DEBUG] Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain
Code=1 "iOS Simulator failed to install the application." UserInfo=0x7fc643902320
{NSLocalizedDescription=iOS Simulator failed to install the application.,
DTiPhoneSimulatorUnderlyingErrorCodeKey=-1}
any help would be appreciated.
Thanks
Solved the problem
Deleting contents of ~/Library/Application Support/iPhone Simulator and re-run the project solved this problem.
or you can simply reset content and setting of the simulator.
Try manually launch the iOS Simulator and from the "iOS Simulator" menu, click "Reset content and settings", then close and rebuild your app.
My solution is:
From menu, iOS Simulator, Reset Content and Settings.
Close XCode 5.0: close project and close it from Dock and re-open the project and launch again, like in Windows :)
I tried everything mentioned above and nothing worked. My problem was iOS 7 specific. I was finally able to resolve the issue by assigning a non-empty value to Bundle versions string, short (CFBundleShortVersionString) in the -Info.plist file. Looks like iOS 7 doesn't like an empty value for the build number. I had a script that auto increments the bundle number by 1 every time I build the project so this field was empty. I just assigned a dummy value there to get it working.
You can also remove the app from the simulator.
This worked for me in iOS6.1
Solved here: https://stackoverflow.com/a/16279286/1927253
I copied a folder into XCode 4.6.2 with the name "Resources". When XCode asked, I created the folder references for any added folders.
Every time I did this, I would have to goto the Derived applications directory, and delete the build directory for my project to get it working again.
Solution: Do not copy a folder by reference into XCode with the name "Resources". Rename it to something else other than Resources.
Very annoying error.
just reset your simulator and re-run your project
Unfortunately none of these solutions solved my problem. I did everything, even restarting my mac but it was still failing. What actually did solve my problem was to go to the Organizer and delete the Derived Data and Snapshots.
Had the same problem after installing XCode 5. Had no iOS 6.1 Sim or SDK. Obtained these. Tried to run the App up under the iOS6.1 Sim and go the failed to install message. Having read through all of the above posts, I decided to simply remove the App from the Simulator and re-istall, re-run from the project window and that solved it for me.
I tried ALL these things and more including reinstalling Xcode 5 and nuking every xcode and simulator preference/application support file with no luck.
Then for the hell of it, I CHANGED my short bundle version string (it already had a value, it was not empty), and it fired right up.
3 hours gone but yeah
All the answers I looked for do not work for me!.
Finally
The only way to make it work is as follows
1.Check the version of titanium being used for the project in tiapp.xml
2.right click the prject in the project explorer window.
3.Select Properties
4.Choose project build path. Select Titanium Mobile SDk all versions of 3.* Tick all of them.
5.Now click apply and re run the project.
None of the above worked for me, I finally compared my info.plist to another project and found that I had somehow deleted the "Executable File = ${EXECUTABLE_NAME}" key/value pair, replacing it fixed the problem for me.
This error occurs on iOS 7.0 if you leave the "Build" empty.
Enter a build number!
What worked for me was to simply delete an old version of the app, which was made in a prior version of Xcode (likely 4, now running 5) from the simulator (tap-hold, jiggle, x).
I encountered this problem while trying to create a build for Facebook application approval. I found that for some reason, when I used the following command line:
xcodebuild -arch i386 -sdk iphonesimulator7.1 -scheme Mana -configuration Release
the files didn't end up in [project root]/build/... (as the instructions on Facebook suggest), but in ~/Library/Developer/Xcode/DerivedData/[app name + unique identifier]/Build/Products.
I'm not sure exactly what's going on here (anyone who knows more please enlighten me!) but I was able to run the files in the DerivedData directory on the simulator. Hopefully they'll also work for Facebook!
I tried everything mentioned above and nothing worked.
Finally the only way to make it work was unsetting DYLD_INSERT_LIBRARIES=/usr/lib/libimckit.dylib
How I did this:
Open terminal and typing "sudo vi /etc/launchd.conf"
Changing
"setenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib"
to
"unsetenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib"
Save changes
Reboot your system
In this post [1] explain what DYLD_INSERT_LIBRARIES is for
[1] https://stackoverflow.com/a/26053165/2091181
On Mavericks 10.9.5 using Xcode Version 6.0.1 (6A317) with an iOS SDK supporting 8.0 originally had Simulators all version 8 all getting this error. All the advice above was not working for me. So went to Xcode->Preferences->Downloads and saw as installable (but not yot installed) in the Components section were iOS Simulators 7.1 and/or 7.0. Went ahead and installed the 7.1 Simulators and got extra designations on the Product->Destination list Simulators of version 8.0 and 7.1, and using the 8.0 still had the same error, but the 7.1 Simulators all worked.

Resources