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.

`appium --help` throws exception

See original GitHub issue

Running appium --help from the CLI gives an error with this stack trace

TypeError: parts.forEach is not a function
    at _getLines (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/argparse/lib/help/formatter.js:380:15)
    at HelpFormatter._formatUsage (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/argparse/lib/help/formatter.js:418:17)
    at /Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/argparse/lib/help/formatter.js:67:17
    at Array.map (native)
    at Section.formatHelp (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/argparse/lib/help/formatter.js:61:26)
    at HelpFormatter.formatHelp (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/argparse/lib/help/formatter.js:300:32)
    at ArgumentParser.formatUsage (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/argparse/lib/argument_parser.js:1026:20)
    at ArgumentParser.printUsage (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/argparse/lib/argument_parser.js:1082:27)
    at ArgumentParser.error (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/argparse/lib/argument_parser.js:1156:8)
    at ArgumentParser.parseKnownArgs (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/argparse/lib/argument_parser.js:297:10)
    at ArgumentParser.parseArgs (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/argparse/lib/argument_parser.js:234:21)
    at ArgumentParser.parser.parseArgs (../../lib/parser.js:752:29)
    at main$ (../../lib/main.js:146:4)
    at tryCatch (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at invoke (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at enqueueResult (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
    at F (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/core-js/library/modules/$.export.js:30:36)
    at AsyncIterator.enqueue (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
    at AsyncIterator.prototype.(anonymous function) [as next] (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at Object.runtime.async (/Users/danielgraham/.nvm/versions/node/v7.10.1/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
    at main (../../lib/main.js:152:13)
    at asyncify (lib/asyncbox.js:65:15)
    at Object.<anonymous> (../../lib/main.js:183:2)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:427:7)
    at startup (bootstrap_node.js:151:9)
    at bootstrap_node.js:542:3

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
dpgrahamcommented, Feb 7, 2018

@munkyjunky We have a fix ready. We’re waiting on a pull request for a third party library that we’re using (https://github.com/nodeca/argparse/pull/122) and then it will be in the next version of Appium.

1reaction
dpgrahamcommented, Oct 26, 2017

I’ll try it again tomorrow and try to fix it myself.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Appium Test Case Throws Exception - java - Stack Overflow
i am using real device. Appium Desktop application is installed. when i run program it gives me exception on that line AppiumDriver< ...
Read more >
Can on help if the internet disconnect wait before throw error
In ios testing can one help me in java code to wait until connection of internet returned before throw exception of element not...
Read more >
Try/except slow to throw exception on 2nd loop - Support
The problem I'm having is my try/except for elements that won't be present on some loops are taking a very long time to...
Read more >
Exception occurs in running appium using eclipse - Support
Hi, I am trying to use appium to launch whatsapp on my phone. But I am facing an exception. Code is public void...
Read more >
How to add exception here to catch pass /failed test case?
Hi, Preformatted text I'm using testObject platform to run test cases. I want to have test results as pass / failed.
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