Page 1 of 1

iOS App Instrumentation

Posted: Tue Jan 10, 2017 10:46 am
by sboeck
Hi,

we are trying to instrument our iOS App with Ranorex 6.2.0.
Everytime we instrument the App via InstrumentationWizard in Ranorex Studio we get the following error:

Instrumentation failed:

Please make sure that
- The IPA minimum OS version matches the device OS version
- The IPA supports the device architecture
- The IPA is not already insrumented with static Ranorex lib
- You are not using an IPA backup from app store

With these details:

System.ArgumentException: Illegales Zeichen im Pfad.
bei System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
bei System.IO.FileStream..ctor(String path, FileMode mode)
bei Ionic.Zip.ZipEntry.InternalExtract(String baseDir, Stream outstream, String password)
bei Ranorex.Plugin.Mobile.Tools.Ios.Instrumentation.IpaFileZip.Extract()
bei Ranorex.Plugin.Mobile.Tools.Ios.Instrumentation.IosInstrumentation.StartInstrumentation()
bei Ranorex.Plugin.Mobile.Tools.Ios.IosToolRunner.Instrument(IIosOptions options, Action`2 progressCallback, String& instrumentedIpaPath)
bei Ranorex.Plugin.Mobile.Tools.Ios.IosToolRunner.Instrument(IOptions options, Action`2 progressCallback, Action`1 msgCallback)
bei Ranorex.Controls.Instrumentation.Workers.IosWorker.Run()
bei Ranorex.Controls.Instrumentation.IosResultPage.bgw_DoWork(Object sender, DoWorkEventArgs e)


Any help would be great!
Is there any way to log and trace Ranorex?

Re: iOS App Instrumentation

Posted: Tue Jan 10, 2017 5:06 pm
by sboeck
We found the NLog.config and set the minloglevel to Trace. If we now start Ranorex.Instrumentation.exe via the command line, we are able to see any information provided by Ranorex. Immediatly before stopping Ranorex shows the following exception:

2017-01-10 16:51:44.9852|ERROR|Ranorex.Libs.FileSystem|TryDeleteDirectory failed to delete path 'C:\Users\user\AppData\Local\RanorexStudio6\RxEnv\iOS\temp\instrumentation'. System.IO.IOException: Der Prozess kann nicht auf die Datei "lycio-integ.ipa" zugreifen, da sie von einem anderen Prozess verwendet wird.
bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
bei System.IO.FileInfo.Delete()
bei Ranorex.Libs.FileSystem.DeleteFileSystemInfoRecursive(FileSystemInfo info)
bei Ranorex.Libs.FileSystem.TryDeleteDirectory(String path)

Followed by this one:

Error:
Illegales Zeichen im Pfad.
2017-01-10 16:51:45.0945|ERROR|Ranorex.Plugin.Mobile.Device.State.DeviceStateManager|Error occurred during device state transition: System.Exception: Device is not connected to this PC via USB.
bei Ranorex.Plugin.Mobile.Device.Channels.PortForwardingNetworkChannel.Connect(TimeSpan connectTimeout)
bei Ranorex.Plugin.Mobile.XmlRpc.XmlRpcProtocolChannel.Connect(TimeSpan timeout)
bei Ranorex.Plugin.Mobile.Device.Channels.DeviceLogicChannel.Connect(TimeSpan timeout)
bei Ranorex.Plugin.Mobile.Device.State.Transitions.ConnectToDeviceTransition.Connect(TimeSpan timeout)
bei Ranorex.Plugin.Mobile.Device.State.Transitions.ConnectToDeviceTransition.Execute(IDeviceState currentState, TransitionDirection direction)
bei Ranorex.Plugin.Mobile.Device.State.DeviceStateManager.GotoStateAsyncWorker(Object threadStartArg)
2017-01-10 16:51:45.0945|INFO|Ranorex.Plugin.Mobile.Device.Channels.PortForwardingNetworkChannel|Setting up port forwarding with local port '31003' device port '29999' for device '13aadb8fd9f518fb31
2017-01-10 16:51:45.0945|INFO|Ranorex.Plugin.Mobile.Device.Channels.PortForwardingNetworkChannel|Setting up port forwarding with local port '31001' device port '31000' for device '13aadb8fd9f518fb31
2017-01-10 16:51:45.1101|ERROR|Ranorex.Plugin.Mobile.Device.State.DeviceStateManager|Device BuildUp transition failed. Details: System.Exception: Device is not connected to this PC via USB.
bei Ranorex.Plugin.Mobile.Device.Channels.PortForwardingNetworkChannel.Connect(TimeSpan connectTimeout)
bei Ranorex.Plugin.Mobile.XmlRpc.XmlRpcProtocolChannel.Connect(TimeSpan timeout)
bei Ranorex.Plugin.Mobile.Device.Channels.DeviceLogicChannel.Connect(TimeSpan timeout)
bei Ranorex.Plugin.Mobile.Device.State.Transitions.ConnectToDeviceTransition.Connect(TimeSpan timeout)
bei Ranorex.Plugin.Mobile.Device.State.Transitions.ConnectToDeviceTransition.Execute(IDeviceState currentState, TransitionDirection direction)
bei Ranorex.Plugin.Mobile.Device.State.DeviceStateManager.GotoStateAsyncWorker(Object threadStartArg)


The used command line options are /pagename /dn /ip /k /sd /pw /pp /ai.
If we try to just install the App we use /si and remove /sd from the options and the App gets installed on the device. From this we guess the devices is connected.

Re: iOS App Instrumentation

Posted: Thu Jan 12, 2017 4:18 pm
by Support Team
Hi sboeck,

Unfortunately, I'm not exactly sure what is causing this error.
May I ask you to send an email to [email protected] with a non-instrumented version of your IPA?
This will allow us to further analyze your issue.

Thank you in advance.

Sincerely,
Matthias

Re: iOS App Instrumentation

Posted: Wed Jan 18, 2017 10:05 am
by sboeck
Thanks to the Ranorex Support, we are now able to instrument our iOS App.

The InvalidCharacter-Exception was thrown because of the Character '*' in one of our files. This seems to be a bug in Ranorex. Just renaming the file helped.

Re: iOS App Instrumentation

Posted: Wed Jan 18, 2017 10:11 am
by odklizec
It's most probably not a bug in Ranorex. Simply, asterisk character should not be used for file names!

Re: iOS App Instrumentation

Posted: Wed Jan 18, 2017 2:24 pm
by krstcs
In the Windows file system, the "*" character is a wildcard and it is not allowed as part of a file or folder name. You must rename your files to NOT include the "*" character.

The following characters are invalid as file or folder names on Windows using NTFS:

Code: Select all

/ ? < > \ : * | " and any character you can type with the Ctrl key