I am trying to automate mobile web application in iOS. For that I need to launch safari. But unable to launch safari it showing following errors:
/usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 5.43 seconds
Using following to launch application via code:
String nodeJSPath = "/usr/local/bin/node";
String appiumJSPath = "/usr/local/lib/node_modules/appium/build/lib/main.js";
Describe in more detail the problem you have been experiencing, if necessary.
Create a gist which is a paste of your _full_ Appium logs, and link them here. Do _not_ paste your full Appium logs here, as it will make this issue very long and hard to read! If you are reporting a bug, _always_ include Appium logs!
Please remember that, with sample code; it's easier to reproduce bug and much faster to fix it.
Please git clone https://github.com/appium/sample-code and use one of your favourite languages and sample apps to reproduce issue.
In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.
Can you please provide the entire logs as a gist?
I am facing issue for launching Safari on only real device.
I copied the SafariLauncher.app manually which I installed on device too at location /usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/
Now in the logs I see ...
debug] [Instruments] Attempting to run app on real device with UDID '47b42fd2d0304ce7e143e8458cb988087d571c6e'
[debug] [Instruments] Found Insruments-Without-Delay: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-instruments/thirdparty/iwd7
[debug] [Instruments] Spawning instruments with command: '/Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /var/folders/qg/0b9gnqx96bj19_nztx69s9t80000gn/T/appium-instruments/instrumentscli0.trace -w 47b42fd2d0304ce7e143e8458cb988087d571c6e com.bytearc.SafariLauncher -e UIASCRIPT "/Users/zymr/Library/Application Support/appium/bootstrap/bootstrap-e1fa8bfd2faabbaf.js" -e UIARESULTSPATH /var/folders/qg/0b9gnqx96bj19_nztx69s9t80000gn/T/appium-instruments'
[debug] [Instruments] And extra without-delay env: {}
[debug] [Instruments] And launch timeouts (in ms): {"global":300000}
[debug] [Instruments] [INST STDERR] 2016-05-10 10:55:24.538 instruments[29061:1983875] 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)
[debug] [Instruments] [INST STDERR] usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]]
[Instruments] Error launching instruments: Instruments crashed on startup
[debug] [Instruments] Instruments exited with code 255
[iOSLog] [IOS_SYSLOG_ROW] May 10 10:55:25 Pavan-iphone gputoolsd[214] : schedule invalidation
So if I replace the bundle id which i highlighted and replace it with one which i used to install on real device and run this complete command on cli manually then it launches SafariLauncher for me.
Now I am not sure from where is this å Id value getting fetched while running.
I tried to replace expected bundle id of safarilauncher (com.launchSafariPO) in my case in every file which has string com.bytearc.SafariLauncher but it didnt help.
Note : There was no issue when working with simulator , where I could launch Safari browser and also could redirect to expected url with .get()
I encounter the same probleme ponkar. I tried same things ... and i didn't find any solution (anywhere on the internet)
I have same issue as well.
I have same issue.
Can someone post the complete Appium server logs for a failing case?
Hi,
I have the same issue:
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' appium/build/lib/main.js --address "127.0.0.1" --debug-log-spacing --platform-version "9.3" --platform-name "iOS" --udid "b08d743e4c8acc04d2ba4adf16b460916d54ae0e" --no-reset --device-name "iPhone 6" --launch-timeout "20000" --native-instruments-lib
[Appium] Welcome to Appium v1.5.3
[Appium] Non-default server args:
[Appium] address: '127.0.0.1'
[Appium] debugLogSpacing: true
[Appium] platformName: 'iOS'
[Appium] platformVersion: '9.3'
[Appium] deviceName: 'iPhone 6'
[Appium] launchTimeout: 20000
[Appium] udid: 'b08d743e4c8acc04d2ba4adf16b460916d54ae0e'
[Appium] noReset: true
[Appium] nativeInstrumentsLib: true
[Appium] Deprecated server args:
[Appium] --platform-name => --default-capabilities '{"platformName":"iOS"}'
[Appium] --platform-version => --default-capabilities '{"platformVersion":"9.3"}'
[Appium] --device-name => --default-capabilities '{"deviceName":"iPhone 6"}'
[Appium] -lt,--launch-timeout => --default-capabilities '{"launchTimeout":20000}'
[Appium] -U,--udid => --default-capabilities '{"udid":"b08d743e4c8acc04d2ba4adf16b460916d54ae0e"}'
[Appium] --no-reset => --default-capabilities '{"noReset":true}'
[Appium] --native-instruments-lib => --default-capabilities '{"nativeInstrumentsLib":true}'
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] platformName: 'iOS'
[Appium] platformVersion: '9.3'
[Appium] deviceName: 'iPhone 6'
[Appium] launchTimeout: 20000
[Appium] udid: 'b08d743e4c8acc04d2ba4adf16b460916d54ae0e'
[Appium] noReset: true
[Appium] nativeInstrumentsLib: true[Appium] Appium REST http interface listener started on 127.0.0.1:4723
[HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []
[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...
[HTTP] <-- GET /wd/hub/status 200 13 ms - 83[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"platformVersion":"9.3","deviceName":"iPhone de AECF","browserName":"Safari","platformName":"IOS"}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"platformVersion":"9.3","...
[Appium] Creating new IosDriver session
[Appium] Capabilities:
[Appium] platformVersion: '9.3'
[Appium] deviceName: 'iPhone TEST'
[Appium] browserName: 'Safari'
[Appium] platformName: 'IOS'
[Appium] launchTimeout: 20000
[Appium] udid: 'b08d743e4c8acc04d2ba4adf16b460916d54ae0e'
[Appium] noReset: true
[Appium] nativeInstrumentsLib: true
[BaseDriver] Session created with session id: 585e7f8e-b063-4f4d-ae89-1f5972501d83
[debug] [iOS] Not auto-detecting did.
[debug] [iOS] Creating iDevice object with did b08d743e4c8acc04d2ba4adf16b460916d54ae0e
Maybe the problem is that he seeks "BUNDLE_ID=com.bytearc.SafariLauncher" whereas me he did not call him that that I installed on the iPhone with Xcode, but how well the set?
I am unable to launch Safari Launcher with latest appium version 1.5.3 .While building safariLauncher app ,i gave bundle id as com.imom.TestingApplication ,but when appium session is running ,it is considering other bundle id com.byterac.SafariLauncher .
Please help me ,how to resolve this problem.
I am able to launch safariLauncher with Appium 1.4.13 version ,But this appium doesnt support for parallel execution
.Any has any idea ?
I have the same issue. Using protractor + appium .
Configuration
exports.config = {
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
cucumberOpts: {
require: 'features/step_definitions/*.step.js',
format: "pretty"
},
seleniumAddress: 'http://localhost:4723/wd/hub',
specs: ['features/*.feature'],
capabilities: {
browserName: 'safari',
'appium-version': '1.5.3',
platformName: 'iOS',
platformVersion: '9.1',
deviceName: 'Test iPad Mini',
udid: 'exampleudidnumber'
}
};
Error Logs https://gist.github.com/aluzardo/66176a41d36e3b3e08dab289f5df3aa8

Try below to solve this issue
BUNDLE_ID=com.bytearc.SafariLauncher
and
Set defaultValue to 30 in Root.plist
@Asimk21 which provision file need to be used?
@Asimk21 Where can I get the safarilauncher project?
Also, once I build it where I need to add in appium?
Thanks,
Sanoj
In appium v1.5.3, SafariLauncher project is bundled along and can be found in appium-ios-driver module. Build app and install on device, appium will auto pick it up from appium-ios-driver/safariLauncher/.. folder or from device (using bundle id).
@sanojqa Did that worked for you ?
I used the bundle id as you mentioned above and increased default time .I am able to launch safariLauncher ,but the launchsafari button is not clicking ,So that i am not able to navigate to safari browser and url is not loading
I guess it is timing out before new command. You can try and add defaultCapabilities like below or pass on from your script
--default-capabilities '{"newCommandTimeout": 30000}'
I am able to launch safariLauncher ,but the launchsafari button is not clicking
Please find the attached logs file for this issue .(https://github.com/appium/appium/files/337166/logs.txt).
Can you remove $.delay(5000) and references to that and try again ? I think before actual execution command this is causing to loss connection with Safari. (Referring to your appium logs)
[debug] [Instruments] [INST] 2016-06-28 13:53:19 +0000 Debug: Got new command 2 from instruments: try{
$.delay(5000); true;
} catch(err) { $.log("waitForAppScript err: " + error); false; };
[debug] [Instruments] [INST] 2016-06-28 13:53:19 +0000 Debug: evaluating try{
$.delay(5000); true;
} catch(err) { $.log("waitForAppScript err: " + error); false; };
[iOSLog] [IOS_SYSLOG_ROW] Jun 28 19:23:24 iPhone-6Plus gputoolsd[1260] <Notice>: schedule invalidation <DYTransport 0x14550bc30, error: lost transport connection (31)>
[iOSLog] [IOS_SYSLOG_ROW] Jun 28 19:23:24 iPhone-6Plus gputoolsd[1260] <Notice>: terminating daemon 0x145603c70
[debug] [Instruments] [INST] 2016-06-28 13:53:24 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-06-28 13:53:24 +0000 Debug: responding with:
yes .you are correct .It is working now .Thank you so much for your help.Really i am appreciating you for quick response
But after i remove that desired capability "$.delay(5000)".,the appium is hanging by getting the followin logs in the attached file.logs2.txt
and also scripts are running very slow with appium 1.5.2 version , but with appium 1.4.3 version ,it is very fast .Suppose for each testscript in appium 1.4.3 ,it takes 80 sec ,but with appium 1.5.2 ,it is taking 400 sec .
.Have you faced this issue?
Once I build the SafariLauncher Xcode project, where I need to place in Appium 1.5.3 (in which location)
/Users/nagarjuna/.npm-packages/lib/node_modules/appium/node_modules/appium-ios-driver/build
If you do not place in this location ,when appium is running for launching safarilauncher ,in appium logs it will throw an error like you missed this file in this location.
Hi @ponkar,
Did you fixed the problem? I have exactly the same problem as you.
I installed the SafariLaunch manually because appium was not able to do it.
After that appium instruments is not able to found SafariLauncher but it is installed.
[debug] [Instruments] [INST STDERR] 2016-07-06 15:01:37.449 instruments[749:16722] 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 (60134)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]]
Full Log here https://github.com/appium/appium/issues/6637
Better way would be to open SafariLauncher.xcodeproj from appium package and build SafariLauncher from their. SafariLauncher is bundled in v1.5 and above.
It should be at location node_modules/appium-ios-driver/node_modules/safari-launcher/SafariLauncher.xcodeproj/
Yes @Asimk21 I used this project.
I fixed the problem installing SafariLauncher in my iPad using Xcode. Using the project stored in /Users/adolfocabrera/.nvm/versions/node/v5.11.1/lib/node_modules/appium/node_modules/appium-ios-driver/node_modules/safari-launcher/SafariLauncher.xcodeproj/
But this only fixed the problem to install the SafariLauncher.
Now appium found the SafariLauncher but It is not able to launch.
https://gist.github.com/aluzardo/2bfd7975d143004ebada6946ffddc0fa
If above help resolved your issue.
I think then #6581 is also related to this bug as reset.sh is now removed, we need to build and install SafariLauncher manually using xcode (which reset.sh used to do automatically - if I am not incorrect).
@imurchie @jlipps : Can you please confirm?
Thanks
@aluzardo Did you try to increase the timeout and give proper bundle name (as I mentioned in above comments ) ?
@Asimk21 Yes I tried everything that you post in above comments? but still the same problem. =(
@aluzardo How do you start the appium server and webkit proxy ?
@Asimk21 To start appium server appium & for webkit proxy ios_webkit_debug_proxy
@aluzardo
Try starting using below in different terminals and then run tests
appium --default-capabilities "{\"newCommandTimeout\": 30000, \"udid\": \"xxxxx\"}" --port 1234 --bootstrap-port 1236 --webkit-debug-proxy-port 1238 --tmp /tmp/ios/
ios_webkit_debug_proxy -c xxxxx:27753 -d
Replace appropriate values in above commands.
Thanks @Asimk21
I tried but same error appears.
Here logs of the commands.
Appium start https://gist.github.com/aluzardo/85cd5185ffa144a653fb307145d335db
Ios Webkit Debug Proxy https://gist.github.com/aluzardo/cef03c3fd9d2458b083e4d069b5dbb96
I am able to see the iPad using the command instruments -s device
Known Devices:
Test iPad4 (9.3.2) [39d39a8bf0d6635268e5997dae574c04246f5e2b]
@aluzardo : What do you get when you run below on command line
/Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/ios/appium-instruments/instrumentscli0.trace -w 39d39a8bf0d6635268e5997dae574c04246f5e2b com.bytearc.SafariLauncher -e UIASCRIPT "/Users/adolfocabrera/Library/Application Support/appium/bootstrap/bootstrap-1f95f319c723b673.js" -e UIARESULTSPATH /tmp/ios/appium-instruments
Also, when you install SafariLauncher app try modifying the maximum value in Root.plist. I used to get the same issue but got over when increased the maximum value.
@Asimk21 I get this using this command.
2016-07-12 14:14:48.244 instruments[4688:1422130] WebKit Threading Violation - initial use of WebKit from a secondary thread.
Instruments Usage Error: Specified target process is invalid: com.bytearc.SafariLauncher
instruments, version 7.3 (60134)
I tried modifying the maximun value in Root.plist to 50 but nothing happens.
Good news @Asimk21
I fixed the problem restarting the iPad.
Only one more thing, is this line normal?
[debug] [Instruments] [INST STDERR] 2016-07-12 15:26:43.603 instruments[5389:1710111] WebKit Threading Violation - initial use of WebKit from a secondary thread.
Hi
Is this problem resolved??
SafariLauncher is not opening/launching safari browser even from Xcode when I try to run the the SafariLauncher project
I am running from source code, found Safari launcher xcode Project in appium/node_modules/safari-launcher/SafariLauncher
but in the logs the error is "appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app'. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name."
it is clear that the SafariLauncher is expecting .app in this location rather than "appium/node_modules/safari-launcher/SafariLauncher"
Please find my logs
node . -U be9c05c4344748a52f99c75672a4cda4715a44ca
[Appium] Welcome to Appium v1.5.3 (REV e026a14141230416e945fb6b49883b9993833f31)
[Appium] Non-default server args:
[Appium] udid: 'be9c05c4344748a52f99c75672a4cda4715a44ca'
[Appium] Deprecated server args:
[Appium] -U,--udid => --default-capabilities '{"udid":"be9c05c4344748a52f99c75672a4cda4715a44ca"}'
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] udid: 'be9c05c4344748a52f99c75672a4cda4715a44ca'
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"newCommandTimeout":30000,"platformVersion":"9.2.1","browserName":"Safari","platformName":"iOS","udid":"be9c05c4344748a52f99c75672a4cda4715a44ca","deviceName":"Automation","autoAcceptAlerts":true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"newCommandTimeout":30000...
[Appium] Creating new IosDriver session
[Appium] Capabilities:
[Appium] newCommandTimeout: 30000
[Appium] platformVersion: '9.2.1'
[Appium] browserName: 'Safari'
[Appium] platformName: 'iOS'
[Appium] udid: 'be9c05c4344748a52f99c75672a4cda4715a44ca'
[Appium] deviceName: 'Automation'
[Appium] autoAcceptAlerts: true
[BaseDriver] Session created with session id: 8e9272a1-6d6e-4407-80ff-ac10c5a9fca4
[debug] [iOS] Xcode version set to 7.3.1
[debug] [iOS] Not auto-detecting udid.
[debug] [iOS] Creating iDevice object with udid be9c05c4344748a52f99c75672a4cda4715a44ca
[debug] [iOS] Checking for presence of SafariLauncher at '/Users/z001hgg/Documents/shaik/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app'
[debug] [iOS] SafariLauncher does not exist
[debug] [iOS] SafariLauncher not found, building...
[iOS] Cleaning SafariLauncher
[debug] [iOS] Cleaning SafariLauncher for iphoneos9.3
[iOS] Error: Command 'xcodebuild -sdk iphoneos9.3 clean' errored out: Error: spawn xcodebuild ENOENT
at exports._errnoException (util.js:860:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:450:9)
at process._tickCallback (node.js:364:17)
at ChildProcess.
at emitOne (events.js:77:13)
at ChildProcess.emit (events.js:169:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:450:9)
at process._tickCallback (node.js:364:17)
[Error: Command 'xcodebuild -sdk iphoneos9.3 clean' errored out: Error: spawn xcodebuild ENOENT
at exports._errnoException (util.js:860:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:450:9)
at process._tickCallback (node.js:364:17)]
[iOS] Error: Command 'xcodebuild -sdk iphoneos9.3 clean' errored out: Error: spawn xcodebuild ENOENT
at exports._errnoException (util.js:860:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:450:9)
at process._tickCallback (node.js:364:17)
at ChildProcess.
at emitOne (events.js:77:13)
at ChildProcess.emit (events.js:169:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:450:9)
at process._tickCallback (node.js:364:17)
[Error: Command 'xcodebuild -sdk iphoneos9.3 clean' errored out: Error: spawn xcodebuild ENOENT
at exports._errnoException (util.js:860:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:450:9)
at process._tickCallback (node.js:364:17)]
[iOS] Bad app: '/Users/z001hgg/Documents/shaik/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app'. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name.
[MJSONWP] Encountered internal error running command: Error: Bad app: /Users/z001hgg/Documents/shaik/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name.
at IosDriver.configureApp$ (lib/driver.js:257:13)
at tryCatch (/Users/z001hgg/Documents/shaik/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as throw
at GeneratorFunctionPrototype.invoke (/Users/z001hgg/Documents/shaik/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/Users/z001hgg/Documents/shaik/appium/node_modules/core-js/library/modules/es6.promise.js:108:47)
at /Users/z001hgg/Documents/shaik/appium/node_modules/core-js/library/modules/es6.promise.js:119:28
at flush (/Users/z001hgg/Documents/shaik/appium/node_modules/core-js/library/modules/$.microtask.js:19:5)
at doNTCallback0 (node.js:428:9)
at process._tickCallback (node.js:357:13)
[HTTP] <-- POST /wd/hub/session 500 26076 ms - 384
Could you please explain the steps should I follow to launch safari in real
device using 1.5.3?
Which SafariLauncher project should I build?
Where I need to replace the Project inside Appium (which path)?
I read the values following values. Are they really needed?
BUNDLE_ID=com.bytearc.SafariLauncher
and
Set defaultValue to 30 in Root.plist
I am facing the SafariLauncher issue a long back. Please help me to get it
run.
Thanks,
Sanoj
On Tue, Jun 28, 2016 at 7:57 PM, knreddy036 [email protected]
wrote:
yes .you are correct .It is working now .Thank you so much for your
help.Really i am appreciating you for quick response—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/appium/appium/issues/6477#issuecomment-229065644, or mute
the thread
https://github.com/notifications/unsubscribe/AI5ccmDuwFawqXXMqka27Z3_sV106ogNks5qQS8_gaJpZM4IYjrv
.
_Thanks and Regards,_
_Sanoj S_* | *_Test Lead - Automation_
Mobile: +91-90-372-74348
Skype: sanoj.swaminathan1
https://journeyofquality.wordpress.com/
RapidValue http://www.rapidvaluesolutions.com/ | Blog
http://www.rapidvaluesolutions.com/blog/ | Video
http://www.slideshare.net/Rapidvaluesolutions/rapidvalue-corporate-video
| Linkedin http://goo.gl/jKF9dN
3C, 3rd floor, Phase 2, Carnival Infopark, Kakkanad, Kochi, 682030
_The information contained in this message is intended for the addressee
only and may contain classified information. If you are not the addressee,
please delete this message and notify the sender; you should not copy or
distribute this message or disclose its contents to anyone. Any views or
opinions expressed in this message are those of the individual(s) and not
necessarily of the organization. No reliance may be placed on this message
without written confirmation from an authorized representative of its
contents. No guarantee is implied that this message or any attachment is
virus free or has not been intercepted and amended._
@ASYB : As a workaround, you can copy build which might be in safari-launcher directory to appium-ios-driver directory.
@sanojqa Safari Launcher project is packaged with appium-ios-driver node in Appium 1.5 and above. Most probably it would be at location appium/node_modules/appium/node_modules/appium-ios-driver/node_modules/safari-launcher.
Detailed Steps:
/path/to/appium --default-capabilities "{\"newCommandTimeout\": 30000, \"udid\": \"xxxxx\"}" --port 1234 --bootstrap-port 1236 --webkit-debug-proxy-port 1238 --tmp /tmp/ios/ios_webkit_debug_proxy -c xxxxx:27753 -dHope it helps now. Thanks!!
@Asimk21
I'm facing the same problem with Appium 1.5.3 BUT there is a little different.
_Bad app: /usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name_
[Scenario 01] OK
--> Result: OK
[Scenario 02] Not Good
I replaced the step 02 above by starting the appium server programmatically. And I faced the problem!
In my code, I used below location to start the appium
CommandLine command = new CommandLine("/Users/UserHomeFolder/homebrew/bin/node");
command.addArgument("/usr/local/bin/appium");
Base on that, anyone can help me figure out what is the issue that I have been facing?
Much appreciate for any help!
Thanks
@TuHuynhVan
@Asimk21
Thank you so much man!
@Asimk21
Please help if you have any other ideas. Thank you so much man!
I uninstalled all related stuffs then reinstalled them.
The Bundle SafariLauncher is not originally existed in: [Location 01] /usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/
It's so strange.
.... :( !
@TuHuynhVan Can you gist appium server logs please?
@Asimk21 ,
Thank you for your reply!
I saw in the log that _"Could not initialize ideviceinstaller_" in the sever log although I had it on the system.
Let me try to uninstall ideviceinstaller, brewhome then re-install them again to see what happen.
If the issue still happens, I will give you the log.
@Asimk21
I could narrow down the issue.
The problem came from somewhere inside Eclipse (The IDE that I'm using).
I saw in the log that Could not initialize ideviceinstaller in the sever log although I had it on the system.
[Solution] Set the path for the execution.java file is [/usr/local]
--> That error disappeared.
After that, I faced another issue
Original error: Could not find path to Xcode by symlinks located in /var/db/xcode_select_link, or /usr/share/xcode-select/xcode_dir_link
Because when I used the same command via terminal on my Mac, I could start Safari successfully for my test. But when I include that command to run inside the code, I faced the issue.
(I checked by using ps aux | grep appium and can see the command started successfully)
So, I think the issue should come from somewhere with the path, I tried some ways but had no luck!
Hooray! I fixed it!
Just a workaround for those who need it when facing same issue.
printf "%s\n" $PATH-->The purpose is to print the current setting for you Mac's path
/usr/local/bin:/usr/bin:/usr/sbin:/sbinThanks @Asimk21 so much for your time and your support!
@Asimk21 When I set the BundleID in xcode to "com.bytearc.SafariLauncher" it gives me

I am able to build it when I give it a unique name but I then get the same issue as above where it is expecting the "com.bytearc.SafariLauncher" even when I set the bundle ID in the appium capabilities to the unique name.

Can you help me resolve this? Thanks!
@ashby-bowles: Did you try Fix issue? Refer
Out of curiosity, when building the SafariLauncher app with XCode, should it be built for running, testing or provisioning? Does it make a difference?
@Asimk21,
I did all the settings as mentioned above, Safari is launched and then errors out.
2016-09-22 01:59:56:399 - [debug] [UIAuto] Got result from instruments: {"status":0,"value":""}
2016-09-22 01:59:56:400 - [debug] [iOS] Clicked button, safari should be launching.
2016-09-22 01:59:56:400 - [debug] [iOS] Waiting for initial webview
2016-09-22 01:59:56:400 - [debug] [iOS] Waiting for 3000 ms before navigating to view.
2016-09-22 01:59:58:480 - [iOSLog] [IOS_SYSLOG_ROW] Sep 21 18:59:58 HDXLABs-iPad syncdefaultsd[234]
2016-09-22 01:59:58:490 - [iOSLog] [IOS_SYSLOG_ROW] Sep 21 18:59:58 HDXLABs-iPad syncdefaultsd[234]
2016-09-22 01:59:58:491 - [iOSLog] [IOS_SYSLOG_ROW] Sep 21 18:59:58 HDXLABs-iPad syncdefaultsd[234]
2016-09-22 01:59:59:401 - [debug] [iOS] Navigating to most recently opened webview
2016-09-22 01:59:59:404 - [debug] [iOS] Retrieving contexts and views
2016-09-22 01:59:59:405 - [debug] [iOS] Selecting by url: true (expected url: 'undefined')
2016-09-22 01:59:59:406 - [debug] [RemoteDebugger] Getting WebKitRemoteDebugger pageArray: localhost, 27753
2016-09-22 01:59:59:408 - [debug] [RemoteDebugger] Sending request to: http://localhost:27753/json
2016-09-22 01:59:59:526 - [MJSONWP] Encountered internal error running command: Error: Could not navigate to webview! Err: 504 -
Server error - server 127.0.0.1 is unreachable at this moment.
Please retry the request or contact your administrator.
at IosDriver.spinHandles$ (lib/commands/context.js:463:15)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
2016-09-22 01:59:59:532 - [HTTP] <-- POST /wd/hub/session 500 14261 ms - 428
2016-09-22 01:59:59:533 - [iOSLog] [IOS_SYSLOG_ROW] Sep 21 18:59:59 HDXLABs-iPad gputoolsd[231]
appreciate any help in this regards
guys any help on this ?
@Asimk21, @imurchie
I am getting the same error:
[debug] [iOS] Starting UIAutoClient, and launching Instruments.
[debug] [UIAuto] Instruments socket server started at /tmp/dir1/instruments_sock
[debug] [Instruments] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
[debug] [Instruments] Attempting to launch instruments, this is try #1
[Instruments] Launching instruments
[debug] [Instruments] Attempting to run app on real device with UDID 'c6c7665557414e944c8fcb38b8ec3383f8462b8f'
[debug] [Instruments] Found Insruments-Without-Delay: /usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-instruments/thirdparty/iwd7
[debug] [Instruments] Spawning instruments with command: '/Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/dir1/appium-instruments/instrumentscli0.trace -w c6c7665557414e944c8fcb38b8ec3383f8462b8f com.bytearc.SafariLauncher -e UIASCRIPT "/Users/magicsw/Library/Application Support/appium/bootstrap/bootstrap-dd6e0006f8e8c5b0.js" -e UIARESULTSPATH /tmp/dir1/appium-instruments'
[debug] [Instruments] And extra without-delay env: {}
[debug] [Instruments] And launch timeouts (in ms): {"global":90000}
[debug] [Instruments] [INST STDERR] 2016-10-10 12:52:57.938 instruments[4626:50247] 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 (60134)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]]
[debug] [Instruments] Instruments exited with code 255
[Instruments] Error launching instruments: Instruments crashed on startup
- My problem is that safari launcher is getting installed on the device but it is not launching. I have made a separate provisioning profile with "com.safarilauncher.
*" (*is for WildCard App ID) bundle identifier and used it in the project.- I have also removed each and every instance of "com.bytearc.SafariLauncher" from the SafariLauncher project under Appium.
I am using IOSDriver to start the session.
Any suggestion??
@rjmadhu
newCommandTimeout and other server timeout parameters.autowebview capability when starting server.--full-reset capability (to make sure it uses same provisioned SafariLauncher app)@TusharRastogi
I think the problem is related to your xcode instrument version. Also, check if you have followed the steps properly.
You should not have to change the bundleId. com.bytearc.SafariLauncher is what is launched, so it will not work without it.
Appium will build the project with the following configuration:
BUNDLE_ID = com.bytearc.SafariLauncher
IDENTITY_NAME = iPhone Developer
IDENTITY_CODE =
Hello,
I have a problem with this SafariLauncher app : when I put "com.bytearc.SafariLauncher" as Bundle Identifier, I can't build it on Xcode 7 or 8, I have the error :
"Failed to create provisioning profile. The app ID "com.bytearc.SafariLauncher" cannot be registered to your development team. Change your bundle identifier to a unique string to try again."
So I put another unique Bundle, like qa.mycompagny.SafariLauncher
Then I can build it on Xcode, open it on my real iPhone, but after, Appium can't launch it, I have "Instruments Usage Error: Specified target process is invalid: com.bytearc.SafariLauncher"
So what can I do with that ?
Thanks a lot
Hello,
I'm still block with this bundle thing, anybody know how to fix this ?
Thanks
Hi everyone!
After two days I found the solution that will work for everybody:
I am also getting the error from appium logs:
[debug] [Instruments] [INST STDERR] 2016-12-14 11:55:10.028 instruments[5232:5780352] 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
In xCode, when I set the bundleId "com.bytearc.SafariLauncher", I get this error:

appium 1.5.3
OSX 10.11
IOS 9.3.5
xcode 7.3
Try with latest version appium 1.6.6 and pls feel free to open a new issue if same exists
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@ASYB : As a workaround, you can copy build which might be in safari-launcher directory to appium-ios-driver directory.
@sanojqa Safari Launcher project is packaged with appium-ios-driver node in Appium 1.5 and above. Most probably it would be at location appium/node_modules/appium/node_modules/appium-ios-driver/node_modules/safari-launcher.
Detailed Steps:
/path/to/appium --default-capabilities "{\"newCommandTimeout\": 30000, \"udid\": \"xxxxx\"}" --port 1234 --bootstrap-port 1236 --webkit-debug-proxy-port 1238 --tmp /tmp/ios/ios_webkit_debug_proxy -c xxxxx:27753 -dNote: Replace appropriate values above, xxxxx --> is unique device identifier
Hope it helps now. Thanks!!