Failed to connect to the simulator

Since yesterday, when a power failure to the area stopped everything, I have been unable to run the sim. All apps build but fails to proceed with "Failed to connect to the simulator".
No other apps appear to have been damaged.
I have tried
  • reboot the Mac - obviously reloads Eclipse
  • swap the SDK to an earlier version
Running Mac Mojave, SDK 3.0.5, Eclipse Oxygen.

Any other suggestions before I reinstall Eclipse?
  • Looks like a new SDK (3.0.6) was released just now. May as well try it, can't hurt.


    Installed, no change. Thanks
  • For anyone reading this thread who has the same problem with "Failed to connect to simulator" in Mac OS X:

    TL;DR the workaround is to run the simulator from Terminal with sudo.
  • FlowState And now, a couple of days later, and a couple of Mac restarts, the problem has evaporated!
    The simulator now starts normally from Eclipse, without any need to start the simulator in the terminal.

    I'm at a complete loss to understand this, but am delighted that it all works again!

  • Nice! At least if you ever have problems again, you have a workaround with sudo.
  • Hey folks, I've been tied up in some other business. I appreciate all the effort made as a community to work through this. I've received the files that you've sent, RaceQs. We will take a look at this. That's super strange. I also know that we actually make sure to sign all of the SDKs that we send out because of the permissions issues FlowState has described here. I've seen intermittent issues like this as well. What ended up being the culprit for me was actually some config files that Eclipse uses to define different aspects of workspaces. They end up getting corrupted or outdated and are not able to be overwritten by Eclipse. They are hidden files which means it's pretty easy to see them on Windows, but I seem to remember having to do some command line shenanigans to get them to show up in Mac. Inside of the workspace directory you use you will find a metadata directory. The path is:

    <workspace_directory>.metadata/.plugins/org.eclipse.core.runtime/.settings

    Where you will find two files:

    IQ_IDE.prefs

    and

    IQ_SdkManager.prefs

    This is generally where I see the issue. If I uninstall the plugin artifacts as described in this thread, then delete these two items 95% of the time, the problem is solved.

    There is also two other hidden directories that Eclipse makes:

    <user_root>/.eclipse

    and

    <user_root>/.p2

    All of these directories persist on your machine even after a fresh install of Eclipse. If they get you into a state where things aren't working, it can be a headache to work your way through them.

    Usually what I see happening when there is a failed to connect error or something of that nature, it's because the workspace IQ_IDE.prefs file has the SDK path preference wrong. Here is a (modified) example of what that file looks like:

    build_for_device_device_id=fenix5splus
    build_for_device_output_dir=C\:\\Users\\coleman\\Desktop
    build_for_device_project_name=MapSample
    build_for_device_target_sdk=3.0.0
    cmp_developerKey=E\:\\Keys\\coleman_triage_developer_key
    eclipse.preferences.version=1
    logging_log_file_location=C\:\\Users\\coleman\\AppData\\Local\\Temp\\GARMIN\\plugin.log
    notification_one_time_warning=true
    pathPreference=E\:\\SDKs\\2018-09\\Production\\connectiq-sdk-win-3.0.6-2018-11-27-33ec0d6


    I find that it's looking to an invalid location to launch the sim so it fails. I know that's kind of a book to read, but hopefully this is helpful if we run into it again.

    -Coleman
  • i'm getting 

    Failed to connect to the simulator. after 3.1.4 update

  • Former Member
    Former Member over 5 years ago

    I'm also getting Failed to connect to the simulator

    running from command line doesn't work as well.

    Already tried to reinstall everything... delete the files IQ_IDE.prefs and IQ_SdkManager.prefs

    Nothing.. =(

    I also tried to create a new workspace
    idk what else I can do

  • Former Member
    Former Member over 4 years ago in reply to Former Member

    Make sure the connect IQ apps are allowed to run on your system. OSX blocks apps from running that aren't from the app store. Delete and download the Connect IQ SDK again. Before opening ConnectIQ.app open system preferences > security & privacy and allow connect IQ to run. You will probably receive several prompts saying connect IQ isn't trusted when this happens click "allow" in the security & privacy window.

  • still struggling. emulator picks port 42877 instead of 12345. HELP!