I started to get this error when trying to run my CordovaApp in Debug Mode: Unable to attach.Operation timed out. First i was getting it quite often but still sometimes it was able to attach and now i'm always getting it.
The application is deployed and started successfully in the emulator or on my Android Device.
How can I solve this? Is it possible to increase timeout threshold? (maybe if I wait more it can attach as sometimes it was working before).
EDIT:
Reproducible on 3 different machines.
I had the same issue,
find some workaround that works for me without restarting.
all is done in emulator UI
in the emulator -> apps (show all apps installed including yours that refuse to run)
side bar -> click "menu" and select "Manage Apps"
scroll down to your app
click "clear data" and "force stop"
go back to apps and click on your app.
cross your fingers and wait few seconds ..
hope it's helps
Related
I recently upgraded some Firebase packages in my iOS Xamarin app, and now the thing refuses to work. The app opens (shows a splash screen) and immediately closes without producing an error.
While I want to fix the package problem, I have no clue where to start. I set a breakpoint on the App.xaml.cs constructor, but this never gets hit when I run the iOS version. So my next idea was to read the output like I do on Android.
I've been Googling around for a few hours, and everyone seems to say 'Go to Debug > Open System Log...', but this is absolutely rubbish! The system log seems to show everything except for my app running... (E.g. I run the app in the simulator, reload the system logs, and the freshest thing is from 10 minutes ago...)
I'm at my wits end here. Does anyone know a trick for viewing my app output in the simulator? Even just an exit code would be useful đ„
You could view the logs in these locations:
Mac â ~/Library/Logs/Xamarin/Simulator.Server
Windows â %LOCALAPPDATA%\Xamarin\Logs\Xamarin.Simulator
I want to use Bluestacks as android studio emulator, but when I try to run app I get this error:
com.android.ddmlib.SyncException: unknown command 'SEND' (444e4553)
Error while Installing APK
I tried adb kill and start server, reinstalling Bluestacks, but nothing helps
I had the same problem and solved it. I had trouble finding an up-to-date Q&A thread so I am glad you asked this question in 2019.
As of 2019, two meaningful changes have occurred that you need to look out for.
Bluestacks has now INTENTIONALLY BLOCKED adb connections out-of-the-box
Android Studio has introduced instant run feature, which may be kinda broken in different development setups
You should check issue 1 first before moving on to checking issue 2
Instructions for issue 1:
Open bluestacks. Find the actual settings for the bluestacks program itself, which is a gear symbol in the grey bar at the top. To do this, select the gear icon, the click "settings". click the preferences tab then make sure "Enable Android Debug Bridge (ADB)" is checked. This should be unchecked by default in newest version of bluestacks.
Instructions for issue 2:
Go to android studio. From the menu items at the top. Click File->Settings, which opens a dialog. Click the "Build, Execution, Deployment" item on the left. THis will expand and you will see "instant run" as a sub option. Click it, then make sure the "enable instant run" checkbox on the right is unchecked.
Finally, as some side pointers:
Always open bluestacks first before android studio. This avoids the need for any adb commands. If you for got this, then do the adb kill-server, adb start-server, but don't forget to run adb connect localhost:5555 after you have killed then started the adb server. Since the sdk/platform-tools is usally in a very strange appdata location, I recommend adding the sdk/platform-tools folder to your path.
I have not tested whether it is actually necessary to disable instant run, if you make sure adb is enabled on bluestacks. You may need to test this for yourself. However I do not know if instant-run is that beneficial so I jsut choose to not use it just in case.
So I'm trying to track down an issue that crops up when I'm NOT debugging with Xcode on the Apple watch, and I've discovered that the Apple Watch has some serious problems with console output if it wasn't launched via the debugger. Given the following code:
- (IBAction)onPrint:(id)sender
{
NSLog(#"############## Printing! ##################");
printf("************** Printf! ******************\n");
}
When launching via the debugger, it shows both lines in Xcode's console window. Great, no problems there.
If, however, I launch the watch app manually (from the watch itself), I get nothing in the console log via the devices window in Xcode, and nothing in the Console app on the mac (other than the normal "kernel[0] : prevent idle sleep list" messages the watch emits to the console from time to time).
I also tried connecting to the watch extension process using the Debug -> Attach to Process menu in Xcode, but it still won't print anything. Clear console, reload console... nothing works. I've looked all over SO for answers, and tried everything marked as an accepted answer or not, but nothing seems to work. This app is as simple as it can get: A single button that executes the code above to print to the console.
Is it just broken? Or is there some other arcane magic I must weave? I'm running Xcode 8.1 and WatchOS 3.1 on an Apple Watch 2.
It looks like this is just a limitation of WatchOS. The only way I've been able to get data back is by storing logs in a file and then fetching the file later.
Thing that can help you is called sysanalyse: you'll have to add special profile to both iPhone and Watch, and this will allow to see your app's logs in Console and via sysanalyse reports. Instructions and profiles are provided here.
If you are debugging background tasks, important to know: watchos's daemon will not terminate process what had already used it's background execution time limit if it is connected to debugger.
This is really odd because I was able to see log statements on the console. It's just now, I'm not. This is for Watch OS 6, xcode 11.2.1.
I setup a bot to build the project then test on all the simulators. This has been working, but today the integration had 28 errors. Each said the same thing (but for each simulator device name):
Xcode cannot launch apps on the simulated device âResizable iPadâ, as
it is currently running an app on âiPhone 5sâ. Only one simulated
device may be used at a time...
After manually running the bot I received no warnings. What could cause this? (I enjoy the success streak)
I only had one project running and had the same issue. Control Quit out of xcode and start it back up.
I had this same problem. I had multiple projects open and a different one still had
'Running appName on deviceName' displayed
Currently open projects can be accessed from the Window section on the toolbar on top. Pressing the Stop button (or the command from the Product Menu) on any projects that were still 'running' freed that particular device for other projects.
Alternatively, Rebooting Xcode works as it closes all projects.
See: https://stackoverflow.com/a/22267017/5172836
I encountered the same error today with the simulator.
The only way i've find is to reboot Xcode. After that the error disappeared and the application launch corectely in the simulator.
I don't know how the error has been originally produce, but Xcode is not a reliability model, so...
I sometimes get a dialog in Xcode which states "Simulator in use." Restarting Xcode didn't help.
I have no Simulator Icon in the Taskbar to quit it and I have no running Simulator.
Is there any solution without rebooting?
I know some of these points to not adress your specific issue since you wrote restarting Xcode would not help you but I'll try to provide a full list of possible fixes for people who might stumble upon this one day.
Is the "Stop" Button in the left corner of Xcode still clickable ? ==> Click It
Try to reset contents & settings of iOS Simulator
Clean Build & Clean Project
Quit iOS Simulator (look at the Activity Monitor if there is still something running)
Restart Xcode
Restart Mac
This is all I can think of. For me most of the times I can resolve it by just restarting Xcode. As you wrote this does not work for you so maybe some of the other points of my list will help you.
Normally this happens when you terminate the iOS Simulator but not the debug session itself, which is why most of the times the "Stop" button in the left corner is clickable most of the times...
This dialog (and the state that triggers it) comes entirely from Xcode and not the simulator itself. This dialog will present itself if Xcode is already using the simulator from another workspace. For example, if you have three projects open at the same time and you do a Build&Run (eg: click "play") in one of them, you will get this dialog if you do a Build&Run in one of the other projects.