{IOS}Appium1.5 wrong BUNDLEID safari launcher

hi all i want to automate safari on real device,
i’m facing this :

[debug] [Instruments] [INST STDERR] 2016-04-12 16:25:39.540 instruments[762:19073] WebKit Threading Violation - initial use of WebKit from a secondary thread.
[debug] [Instruments] [INST STDERR] Instruments Usage Error: Specified target process is invalid: com.bytearc.SafariLauncher
instruments, version 7.3 (60133)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]]

i have these capabilities :

	public void SetUp () throws MalformedURLException {
		DesiredCapabilities Caps = new DesiredCapabilities();
		Caps.setCapability("platformVersion", "9.3");
		Caps.setCapability("platformName", "iOS");
		Caps.setCapability("deviceName", "iPad");
		Caps.setCapability("app", "/Users/admin/Documents/installations/appium/node_modules/appium-ios-driver/build/SafariLauncher");
		Caps.setCapability("udid", "MYUDID");
		driver = new IOSDriver(new URL(""), Caps);
		driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);


i launch ios webkit debug proxy and his launcher.js
i work with appium 1.5 i have xcode 7.3 and ipad under ios 9.3
i modified the bundle of the SafariLauncher then i think it’s my problem but i don’t know how to solve it …

In the appium api : http://appium.io/slate/en/1.5/?java#automating-mobile-web-apps
they say to get the identity code , the UUID but i don’t know where to use it , i always put the udid of my real device :confused:

thx to help me.

here are my complete appium logs :

Have you tried signing the code and installing the provisioning profile through xcode in the SafariLauncher project, i have been facing the same issue while running on real devices with ios9.3.1. I solved it by manually installing the provisioning profile and copying the SafariLauncher.app generated into the node_module/appium-ios-driver/build/SafariLauncher folder.
See if that works, if you need detailed steps, do let me know

hi thx to help me ! i was sad because i made 2 topics for this and no one was answering ^^,
Yes i tried to do it… if i don’t do what you say appium don’t want to show me this lign in logs :
[debug] [iOS] SafariLauncher exists
he crash before if i dont copy the .app and without the provisionning profile …
i beleived that was because of the safari launcher that was not for the version 1.5 but if you can … i can ^^ then i would ask you if you can tell me the detailed step i certainly missed something even if i tried many times .
if it’s can help i’m working with an i pad air 2

Hi Emile,
Sorry for the late reply, have been really busy,
Please find the steps below:

  1. Latest Appium build 1.5.2
  2. Apple Developers ID
  3. Provisioning Profile with your Devices(in your case iPad air 2) added to it
  4. Xcode supporting the iOS on you iPAD

Note: Keep your device connected

  1. Navigate to your folder where you downloaded the latest build of appium
  2. No navigate to /node_modules/safari-launcher
  3. Open the Safari-Launcher.xcode project in Xcode
  4. In Targets, Select SafariLauncher
  5. In General Settings -> Identity->Bundle ID, type : com.bytearc.SafariLauncher and in -> Team dropdown, select your Apple developers ID
  6. In Build Settings -> Code Signing -> Provisioning Profile -> Select your provisioning profile for all the fields and for code Signing Identity, select iPhone Developer
  7. Now the run the project
  8. When build is successful, safari Launcher would be downloaded to your iPAD.

Now run your tests.
Let me know if you need further details

Hi @dhruv_91,
It’s my turn to say sorry ^^, i’ve been really busy too…
I have just 2 questions, i saw many help from the community telling to use the com.bytearc.SafariLauncher

It’s not working for me. XCode is unhappy and say no it’s not your bundle id you can’t use it :stuck_out_tongue: " … i tried with a bundle like com.XXXX.SafariLauncher but it i get the instrument error then if you have any idea i would like You to help me please :slight_smile:

Else there is the guys which say that they are using the driver capability to set up theire bundle id
Like here : Appium 1.3.5 instruments startup uses wrong bundleId
But i already did this … and it’s doesn’t modify the bundleid …

I am also having trouble that I am trying to explicitly set the bundle id to be launched and it seems to be ignored:

Error launching com.bytearc.SafariLauncher: NotFound (4)

I have signed the the SafariLauncher app with a company provisioning profile. The trouble is that this provisioning profile is bound to the domain uk.co.(company).test.automation.

I am setting the bundle id in both the node-config.js and via the --default-capabilities parameter to Appium with “bundleId”:“uk.co.(company).test.automation.SafariLauncher” however no matter what
I do I still get the error:
Error launching com.bytearc.SafariLauncher: NotFound (4)
The XCode project refers to the package/bundle id: uk.co..test.automation.SafariLauncher
but it doesn’t make a difference.
The weird thing is testing was working yesterday but now today this problem has suddenly come up.
I am at the point desperately searching though the Appium JavaScript files looking for the place where this parameter is being passed to instruments. I can’t find it in instruments.js but that may be delegating to code in another file / library.

Hopefully this helps you:

Please try with below steps:

  1. Go to Apple Developer Page
  2. Open the page [Certificate, Identifiers & Profile]
  3. In the [Identifiers] click on [App IDs] --> Delete the old App IDs (which one has “uk.co.(company).test.automation.SafariLauncher”)
  4. Create a new one with type “Wildcard” and the bundle idle has to be: com.byterac.*
  5. In the [Provisioning Profile] click on [Development] then choose the iOS Provisioning Profile that you created before
    –> Edit it to change to the new App IDs which was created above.
  6. Download it and double click to open it in Xcode.
  7. Now, you need to rebuild the SafariLauncher again with the new Provisioning profile. DON’T forget to put [com.byterac.SafariLauncher] in the [Bundle Identifier] in Xcode
1 Like

Hi @emile and @CarlJokl,

@TuHuynh’s answer should solve your problem, as he has mentioned in the 4th step, it is important to create Wildcard App ID , as to how to rebuild SafariLauncher (step 7 in @TuHuynh’s answer), go through my previous answer.
Hope this helps.