Can't use App.Repl() with newest update

I'm having an issue with the newest version of Xamarin.UITest on iOS, when calling Repl().
I get the following error message: "Only iOS v9 and later is supported when using Xcode v8"

But I'm using Xcode 9.1 and iOS 11.1 and have tried 11.2 too.

Any ideas?

Tagged:

Best Answer

Answers

  • SeanConlonSeanConlon USMember ✭✭

    I'm getting the same error and cant find any reason for it. I usually run tests on an ios 6 / 10.2 simulator.

  • JeremyGannaway.9065JeremyGannaway.9065 USUniversity ✭✭

    Same here, I'm running XCode 9.2 and iOS 11.2 SDK

    using NUnit.Framework;
    using Xamarin.UITest;
    using Xamarin.UITest.iOS;
    
    namespace UITestPlayground
    {
        [TestFixture]
        public class Tests
        {
            iOSApp app;
    
            [SetUp]
            public void BeforeEachTest()
            {
                app = ConfigureApp
                    .iOS
                    .DeviceIdentifier("AC1AC9CD-782B-49B8-981E-FFBDA72D7A5F")
                    .AppBundle("testing.app")
                    .StartApp();
            }
    
            [Test]
            public void AppLaunches()
            {
                app.Repl();
            }
        }
    }
    
    
    iOS test running Xamarin.UITest version: 2.2.1
    Skipping IDE integration as important properties are configured. To force IDE integration, add .PreferIdeSettings() to ConfigureApp.
    Skipping local screenshots. Can be enabled with EnableScreenshots() when configuring app.
    Initializing iOS app on 127.0.0.1:37265.
    Execution failed with exception: System.Exception: Only iOS v9 and later is supported when using Xcode v8
      at Xamarin.UITest.iOS.iOSAppLauncher.UseDeviceAgent (System.Int32 iosVersion, Xamarin.UITest.Configuration.IiOSAppConfiguration configuration) [0x0001f] in <5745119407a04120bc96f6ab09d7913e>:0 
      at Xamarin.UITest.iOS.iOSAppLauncher.ConnectToApp (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient) [0x00031] in <5745119407a04120bc96f6ab09d7913e>:0 
      at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x00234] in <5745119407a04120bc96f6ab09d7913e>:0 
      at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00000] in <5745119407a04120bc96f6ab09d7913e>:0 
      at Xamarin.UITest.Configuration.iOSAppConfigurator.ConnectToApp () [0x00008] in <5745119407a04120bc96f6ab09d7913e>:0 
      at <InteractiveExpressionClass>.Host (System.Object& $retval) [0x0002d] in <deaf231d628e4d358713e98889e7206a>:0 
      at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x0003e] in <e5610ebfe8c34526a8158db3c89186d4>:0 
      at Xamarin.UITest.Repl.Evaluation.MonoCSharpReplEngine.Evaluate (System.String line) [0x00017] in <6f48d9ab909d4f80a1d24c65a06d5dc2>:0 
      at Xamarin.UITest.Repl.Repl.ReplFacade.RunCode (System.String code) [0x00029] in <924ee46b353546c5be68cd8572511855>:0 
      at Xamarin.UITest.Repl.Program.Main (System.String[] args) [0x000ed] in <924ee46b353546c5be68cd8572511855>:0 
    Press any key to exit.
    
  • JeremyGannaway.9065JeremyGannaway.9065 USUniversity ✭✭

    Same here, I'm running XCode 9.2 and iOS 11.2 SDK

    using NUnit.Framework;
    using Xamarin.UITest;
    using Xamarin.UITest.iOS;
    
    namespace UITestPlayground
    {
        [TestFixture]
        public class Tests
        {
            iOSApp app;
    
            [SetUp]
            public void BeforeEachTest()
            {
                app = ConfigureApp
                    .iOS
                    .DeviceIdentifier("AC1AC9CD-782B-49B8-981E-FFBDA72D7A5F")
                    .AppBundle("testing.app")
                    .StartApp();
            }
    
            [Test]
            public void AppLaunches()
            {
                app.Repl();
            }
        }
    }
    
    
    iOS test running Xamarin.UITest version: 2.2.1
    Skipping IDE integration as important properties are configured. To force IDE integration, add .PreferIdeSettings() to ConfigureApp.
    Skipping local screenshots. Can be enabled with EnableScreenshots() when configuring app.
    Initializing iOS app on 127.0.0.1:37265.
    Execution failed with exception: System.Exception: Only iOS v9 and later is supported when using Xcode v8
      at Xamarin.UITest.iOS.iOSAppLauncher.UseDeviceAgent (System.Int32 iosVersion, Xamarin.UITest.Configuration.IiOSAppConfiguration configuration) [0x0001f] in <5745119407a04120bc96f6ab09d7913e>:0 
      at Xamarin.UITest.iOS.iOSAppLauncher.ConnectToApp (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient) [0x00031] in <5745119407a04120bc96f6ab09d7913e>:0 
      at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x00234] in <5745119407a04120bc96f6ab09d7913e>:0 
      at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00000] in <5745119407a04120bc96f6ab09d7913e>:0 
      at Xamarin.UITest.Configuration.iOSAppConfigurator.ConnectToApp () [0x00008] in <5745119407a04120bc96f6ab09d7913e>:0 
      at <InteractiveExpressionClass>.Host (System.Object& $retval) [0x0002d] in <deaf231d628e4d358713e98889e7206a>:0 
      at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x0003e] in <e5610ebfe8c34526a8158db3c89186d4>:0 
      at Xamarin.UITest.Repl.Evaluation.MonoCSharpReplEngine.Evaluate (System.String line) [0x00017] in <6f48d9ab909d4f80a1d24c65a06d5dc2>:0 
      at Xamarin.UITest.Repl.Repl.ReplFacade.RunCode (System.String code) [0x00029] in <924ee46b353546c5be68cd8572511855>:0 
      at Xamarin.UITest.Repl.Program.Main (System.String[] args) [0x000ed] in <924ee46b353546c5be68cd8572511855>:0 
    Press any key to exit.
    
  • LushLush USMember ✭✭

    Same here:

    Full log file: /var/folders/yg/6fgx51z50n92kxtttgr1bfq40000gp/T/uitest/log-2017-12-14_16-30-01-585.txt
    iOS test running Xamarin.UITest version: 2.2.2
    Skipping IDE integration as important properties are configured. To force IDE integration, add .PreferIdeSettings() to ConfigureApp.
    Skipping local screenshots. Can be enabled with EnableScreenshots() when configuring app.
    Initializing iOS app on http://127.0.0.1:37265/.
    Execution failed with exception: System.Exception:>  Only iOS v9 and later is supported when using Xcode v8
      at Xamarin.UITest.iOS.iOSAppLauncher.UseDeviceAgent (System.Int32 iosVersion, Xamarin.UITest.Configuration.IiOSAppConfiguration configuration) [0x0001f] in <0ea59db5aaf943039918d5008bfc5053>:0 
      at Xamarin.UITest.iOS.iOSAppLauncher.ConnectToApp (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient) [0x00031] in <0ea59db5aaf943039918d5008bfc5053>:0 
      at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x00234] in <0ea59db5aaf943039918d5008bfc5053>:0 
      at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00000] in <0ea59db5aaf943039918d5008bfc5053>:0 
      at Xamarin.UITest.Configuration.iOSAppConfigurator.ConnectToApp () [0x00008] in <0ea59db5aaf943039918d5008bfc5053>:0 
      at <InteractiveExpressionClass>.Host (System.Object& $retval) [0x0002d] in <26bfe4698c5f4f3b83463bb9aeb210ae>:0 
      at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x0003e] in <e5610ebfe8c34526a8158db3c89186d4>:0 
      at Xamarin.UITest.Repl.Evaluation.MonoCSharpReplEngine.Evaluate (System.String line) [0x00017] in <6f48d9ab909d4f80a1d24c65a06d5dc2>:0 
      at Xamarin.UITest.Repl.Repl.ReplFacade.RunCode (System.String code) [0x00029] in <924ee46b353546c5be68cd8572511855>:0 
      at Xamarin.UITest.Repl.Program.Main (System.String[] args) [0x000ed] in <924ee46b353546c5be68cd8572511855>:0 
    Press any key to exit.
    
  • BlankSparrowBlankSparrow NZMember
    edited December 2017

    Gave it another go with todays UITest update and Repl is still not working

    Using:
    Xamarin.UITest: 2.2.2.1678
    Xamarin.TestCloud.Agent: 0.21.4
    iOS: 11.2
    Xcode: 9.2
    macOS: 10.13.1

  • RezaAlemyRezaAlemy USMember ✭✭

    Same here. is there a way to revert to old versions for now?

  • RezaAlemyRezaAlemy USMember ✭✭

    For now, I did the following to get it back working, while waiting for an update.

    • remove Xamarin.UiTest v2.2.2 from my project
    • remove Xamarin.CloudTest.Agen v0.12.4 from my iOS project
    • add Xamarin.UITest V2.2.1
    • add Xamarin.CloudTest.Agent v.0.12.3
    • remove all bin and obj files from my project directory (yes, I am superstitious)
    • rebuild all.

    It starts working again.

  • NateVargheseNateVarghese USUniversity ✭✭

    Same here. Annoying. Downgrading as @RezaAlemy suggested worked nicely.
    Perhaps Xamarin isn't writing tests against their own products ¯_(ツ)_/¯

    @RezaAlemy please edit your post to correct the following typos:

    • Change "Remove Xamarin.CloudTest.Agen v0.12.4 from my iOS project" to "Remove Xamarin.TestCloud.Agent v0.21.4 from my iOS project"
    • Change "add Xamarin.CloudTest.Agent v.0.12.3" to "add Xamarin.TestCloud.Agent v.0.21.3"
  • I have a same problem, but I cannot downgrade calabash-ios framework on my iOS project. The only way to install calabash-ios is with calabash-ios download command but it will install the latest one - 0.21.4.
    @NateVarghese @RezaAlemy do you know the other way? Thank in advance.

  • RezaAlemyRezaAlemy USMember ✭✭

    @EmrahDautbegovic said:
    I have a same problem, but I cannot downgrade calabash-ios framework on my iOS project. The only way to install calabash-ios is with calabash-ios download command but it will install the latest one - 0.21.4.
    @NateVarghese @RezaAlemy do you know the other way? Thank in advance.

    I have not worked with Calabash-ios, but looking at the website I see the command:

    curl -sSL <don't have permission to post links>| bash
    

    If I was to give it a go, I would clone the repo (No permission to post links) then I would edit the Gemfile.OSX and decrease the maximum allowed version number:

    source "<no permission to post links. Jeez!>"
    gem "calabash-cucumber", ">= 0.20.4", "< 1.0"
    gem "calabash-android", ">= 0.9.0", "< 1.0"
    gem "xamarin-test-cloud", ">= 2.1.1", "< 3.0" .  <<------- this is the line I would edit.
    

    Sorry, I am quite a noob (I don't even have permission to post links!) and that is my 2 cents.

  • @RezaAlemy thank you,
    I'll try with Gemfile. We don't have a Gemfile in our iOS project. We installed calabash-ios with calabash-ios download command and it worked for months. After XCode update we had to update calabash-ios but this 0.21.4 version seems to have some bugs. Now, I will try to remove calabash framework, create Gemfile, specify calabash-ios version to 0.21.3 and do bundle install in project root directory.

  • NateVargheseNateVarghese USUniversity ✭✭

    @EmrahDautbegovic
    My apologies but I am not familiar with any package manager other that the standard Nuget UI embedded in Visual Studio. If you are using a command line interface I believe It would be unreasonable to have the inability to specify a version.

    What is the current command and method you are using?

  • Thanks @RezaAlemy, and you were so right to be superstition, was freaking out when I tried revert but clearing the bin worked a treat :D

  • @NateVarghese
    Thank you, I'm using Visual Studio on my side and it is possible to install the older versions of packages with Nuget, but on the application side, for iOS development we don't use Nuget and we must install it through command line interface. calabash-ios download command will always install the latest version and that's not what we want.

  • PeterSimonsPeterSimons GBMember ✭✭

    I had a similar problem with the ScrollDownTo IApp method, I reverted to 0.21.3 of the Xamarin.TestCloud.Agent and that resolved the problem for me, I have also logged it with TestCloud support to investigate

  • EmrahDautbegovicEmrahDautbegovic USMember ✭✭

    Hi @KentGreen,
    I'm not able to downgrade test-cloud agent in native iOS project. Do you have any instructions how to do that?
    The way we installed test-cloud agent is with calabash-ios download command, but it always installs the latest one.
    Thanks in advance,
    Emrah

  • Kent.GreenKent.Green USXamarin Team Xamurai

    Hi @EmrahDautbegovic, it looks like you should be able to do this by explicitly specifying the exact gem version to use:
    https://github.com/calabash/calabash-ios/wiki/Tutorial:-Link-Calabash-in-Debug-config#step-2-download-calabashframework

    https://rubygems.org/gems/calabash-cucumber/

    It looks like the last gem version released for Calabash was 0.21.2 rather than 0.21.3. I'm not sure if this could lead to any discrepancies but feel free to reach out if downgrading doesn't work.

  • EmrahDautbegovicEmrahDautbegovic USMember ✭✭

    Thanks @KentGreen,

    I've created Gemfile with calabash-cucumber 0.21.2 version and ran bundle install command. Then, I deleted calabash.framework from my project and ran calabash-ios download command. Calabash 0.21.2 is successfully installed.

  • NateCookPersonalNateCookPersonal USUniversity ✭✭

    @Kent.Green can we please get in the habit of providing some decent release notes for the iOS UI test agent? At least with the main UI Test package there are some notes on NuGet. With the test agent though there is just

    which is a broken link. This has happened to me on multiple occasions.

    Nothing fancy is needed. As an example, I'd like to see something like the following for 0.21.5:

    • Fixed a bug where app.REPL was not working for some users.

    Otherwise I have no idea what to expect from a package upgrade.

  • Kent.GreenKent.Green USXamarin Team Xamurai

    I took a quick look and confirmed a couple of the latest version links are missing or broken; I've passed your feedback on to our team members, my apologies for the inconvenience.

  • Excuse me. Does anyone know when will Calabash cucumber 0.21.5 release?
    It is really annoying of being unable to use app.repl() .

  • i need to modify the content of my question to >>
    " Does anyone know when will Xamarin.CloudTest.Agen v0.12.5 release? "

  • Kent.GreenKent.Green USXamarin Team Xamurai

    @anonymousisme Unfortunately I don't currently have an ETA on that release.

    Incidentally, Calabash Cucumber & Xamarin Test Cloud Agent versions have parity, they're actually the same but packaged differently; Calabash Cucumber is mainly for iOS Native Apps, while Xamarin Test Cloud Agent is for iOS apps written in C#.

  • Kent.GreenKent.Green USXamarin Team Xamurai

    I have several updates regarding this issue:

    • It turns out that Xamarin.UITest is at fault for the issue, but for an unexpected reason. Basically the Test Cloud Agent had been using a depreciated call and switched to the updated one, but UITest did not switch to the updated version. Because it was the Test Cloud Agent that changed, downgrading it works; but it wasn't technically the bugged tool.

    • A fix has been made for the issue in Xamarin.UITest and is expected to be released in the next version of the package. (This fix will not trigger an update in Test Cloud Agent or Calabash-Cucumber, since they aren't the tools applying the change.)

    • The fix has one way compatibility. Test Cloud Agent/Calabash-Cucumber 0.21.4+ will not be compatible to use the Repl() tool with versions of Xamarin.UITest 2.2.2 or below. But new versions of Xamarin.UITest should still be able to use the Repl() tool even with Test Cloud Agent/Calabash-Cucumber 0.21.3-, for at least a little while. So while when the fix comes out ideally get up to date on both of those, Xamarin.UITest is more essential to update.

    Unfortunately I still don't have a precise ETA on the release, just that the fix should be in the next stable release of Xamarin.UITest.

  • NateCookPersonalNateCookPersonal USUniversity ✭✭

    Thank you Kent, definitely appreciate you following up on this to keep us up to date with details, and for passing on the feedback regarding release notes.

  • Kent.GreenKent.Green USXamarin Team Xamurai

    A dev release of Xamarin.UITest with the App.Repl() fix is now available: https://www.nuget.org/packages/Xamarin.UITest/2.2.2.1684-dev

    As a dev build it hasn't fully passed QA, so I'd mainly recommend trying it if you had trouble with the workaround (either implementing it or hitting other issues); or perhaps if you're not in a rush and are just in the mood to try it. If the workaround is currently acceptable to you then I don't think trying to fix this issue with the dev build is likely to be terribly necessary.

    It might be more likely to encounter issues than the full release, but please feel free to reach out if you have any observations about using it.

Sign In or Register to comment.