Skip to content

TypeError: Cannot read property 'statBarHeight' of undefined #287

Closed

Description

@setrar

with

$ ns --version                         
7.0.11

I am having this issue when testing with NativeScript Appium on MacOS against iOS

image

The issue seems to be coming from the below source code:

if (+sessionInfoDetails.statBarHeight === 0

  • appium.capabilities.json file
    "sim.iPhone12": {
        "platformName": "iOS",
        "platformVersion": "/14*/",
        "deviceName": "iPhone 12",
        "bundleId": "org.nativescript.b300098957",
        "noReset": true,
        "fullReset": false,
        "statBarHeight": 0,
        "app": ""
    }
  • command running the {N} test
$ npm run e2e -- --runType sim.iPhone12

What library am I missing?

Activity

  1. AlbanRicherPro commented on Dec 17, 2020

    @AlbanRicherPro

    I have the same problem 😕 .

    Did you find a solution?

  2. rob4226 commented on Dec 22, 2020

    @rob4226

    @AlbanRicherPro @setrar I also have the same problem. Any update?

  3. belloyang commented on Jan 8, 2021

    @belloyang

    Same issue.
    in the console log, it shows:

    Session info:  
    undefined
    Appium settings:  
    Current version of appium doesn't support appium settings! 
    Appium driver has started successfully!
    Something went wrong! Appium driver failed to start. Check appium config file. 
    TypeError: Cannot read property 'statBarHeight' of undefined 
    

    Session Info is undefined, why is it?

  4. vdbongard commented on Jun 11, 2021

    @vdbongard

    I had the same error and could solve it by using a different appium port.

    You can use the CLI argument --port or set an environment variable, either APPIUM_PORT or npm_config_port work.
    The default port is 4723, so I set the env variable APPIUM_PORT to 4724 and it worked again.

    Not sure why the default port is not working, there seems to be another instance of appium or another process running.

    If I just start appium in the terminal via $ appium I get an error:

    [HTTP] Could not start REST http interface listener. The requested port may already be in use. Please make sure there is no other instance of this server running already.
    Fatal Error: listen EADDRINUSE: address already in use 0.0.0.0:4723
    

    With appium --port 4724 it starts normally.

    (I am on Windows 10 btw)

  5. Kevonia commented on Aug 18, 2021

    @Kevonia

    I have the same problem confused .

    Did you find a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions