question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The iOS App crashed after scrolling by TouchActions, Action, IOS-Gestures

See original GitHub issue

The problem

The app crashed after scrolling via Appium

Environment

  • Appium version: 1.21.0
  • IOS: 14.7.1
  • Real device or emulator/simulator: real device

Details

I tried few ways to scroll, such as: TouchActions, Actions, IOS-Gestures But the app crashed after scrolling immediately.

This issue does not happen when testing by manual. So, I think the cause is in Appium or WebDriverAgent. Please help me define this cause.

Link to Appium logs

https://gist.github.com/anhphan-cwvn/9b5dbf864c13490806533a0f93293e62

Code To Reproduce Issue [ Good To Have ]

public void scrollToLeftInMenuBar() {
        int heightOfScreen = windowSize.getHeight();
        int widthOfScreen = windowSize.getWidth();
        int anchor = (int) (heightOfScreen * 0.115);
        int startPoint = (int) (widthOfScreen * 0.918);
        int endPoint = (int) (widthOfScreen * 0.0726);

        switch (LoadConfig.getAppiumPlatformName().toLowerCase()){
            case "ios":
                System.out.println("Swipe left in IOS by Actions");
                PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, "finger");
                Sequence dragNDrop = new Sequence(finger, 1);
                dragNDrop.addAction(finger.createPointerMove(Duration.ofMillis(0),
                        PointerInput.Origin.viewport(), startPoint, anchor));
                dragNDrop.addAction(finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
                dragNDrop.addAction(finger.createPointerMove(Duration.ofMillis(2700),
                        PointerInput.Origin.viewport(), endPoint, anchor));
                dragNDrop.addAction(finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
                mobileDriver().perform(Arrays.asList(dragNDrop));
                break;
            default:
                System.out.println("Swipe left in Android and Web by TouchAction");
                new TouchAction(mobileDriver())
                        .press(PointOption.point(startPoint, anchor))
                        .waitAction(WaitOptions.waitOptions((Duration.ofMillis(TimeoutConstants.SWIPE_WAIT_TIMEOUT))))
                        .moveTo(PointOption.point(endPoint, anchor)).release().perform();
                break;
        }
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
anhphan-cwvncommented, Sep 4, 2021

Could you collect log with appium:showIOSLog and appium:showXcodeLog capability?

I have Device log, is it ok?

https://gist.github.com/anhphan-cwvn/5750b7716d985109dc8935add8c960b2

Please tell me, if you need anything else

0reactions
KazuCocoacommented, Sep 4, 2021

Oh, interesting. Thanks for the proper information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

app crash on iOS 16.1(beta) when u… - Apple Developer
My app was built with XCode13 and we are now seeing occasional crashes on iOS16.1 (beta). This exception occurs when using the method:....
Read more >
9 Fixes for When Your iPhone Apps Keep Crashing
In this case, try exiting the app completely before relaunching it. Access the App Switcher, swipe to the opened app, and swipe up...
Read more >
iOS app crashing during swipe gesture? - Stack Overflow
The app will run, it just crashes when I execute a swipe. Here is my code: class ViewController: UIViewController, UIGestureRecognizerDelegate { ...
Read more >
touchAction use coordinate doesn't work · Issue #5298 - GitHub
the app crash when scroll. first i use scroll with out specifying an element, doesn't work. i use instrument to record the operation...
Read more >
Scroll - Appium
Scroll on the touch screen using finger based motion events ... TouchActions action = new TouchActions(driver); action.scroll(element, 10, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found