New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to launch appium after upgrade node 10.0.0 #10609

Closed
priyankshah217 opened this Issue Apr 26, 2018 · 19 comments

Comments

Projects
None yet
@priyankshah217

priyankshah217 commented Apr 26, 2018

The problem

Appium is not being launched after node upgrade to 10.0.0

Environment

  • Appium version (or git revision) that exhibits the issue: 1.8.0
  • Last Appium version that did not exhibit the issue (if applicable):
  • Desktop OS/version used to run Appium: High sierra 10.13.4 (17E199)
  • Node.js version (unless using Appium.app|exe): 10.0.0
  • Mobile platform/version under test: Not required
  • Real device or emulator/simulator: Not required
  • Appium CLI or Appium.app|exe: Not Required

Details

Appium 1.8.0 was working fine with older version of node, but after upgrade node to recent one (10.0.0), unable to launch appium.

Link to Appium logs

Please fine below appium logs.

internal/util.js:360
    const filename = frame.getFileName();
                           ^

TypeError: frame.getFileName is not a function
    at isInsideNodeModules (internal/util.js:360:28)
    at showFlaggedDeprecation (buffer.js:149:8)
    at new Buffer (buffer.js:174:3)
    at retrieveSourceMap (/usr/local/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:118:21)
    at mapSourcePosition (/usr/local/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:140:21)
    at wrapCallSite (/usr/local/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:303:20)
    at /usr/local/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:338:26
    at Array.map (<anonymous>)
    at Function.prepareStackTrace (/usr/local/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:337:24)
    at process.emit (/usr/local/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:387:52)
    at process._fatalException (internal/bootstrap/node.js:435:27)

Code To Reproduce Issue [ Good To Have ]

  • Upgrade node to latest one (10.0.0)

  • Launch appium

It working fine after downgrading node version.

@pavanbachu0604

This comment has been minimized.

Show comment
Hide comment
@pavanbachu0604

pavanbachu0604 Apr 26, 2018

even I am facing the same issue . @priyankshah217 : Did you find any resolution ?

pavanbachu0604 commented Apr 26, 2018

even I am facing the same issue . @priyankshah217 : Did you find any resolution ?

@FA-tvonmoll

This comment has been minimized.

Show comment
Hide comment
@FA-tvonmoll

FA-tvonmoll Apr 26, 2018

Same here. As he mentioned initially: reverting back (in my case, I went to 9.10.1) works as a temporary workaround.

FA-tvonmoll commented Apr 26, 2018

Same here. As he mentioned initially: reverting back (in my case, I went to 9.10.1) works as a temporary workaround.

@pavanbachu0604

This comment has been minimized.

Show comment
Hide comment
@pavanbachu0604

pavanbachu0604 Apr 26, 2018

@FA-tvonmoll how to downgrade npm to 9.10.1 ?

pavanbachu0604 commented Apr 26, 2018

@FA-tvonmoll how to downgrade npm to 9.10.1 ?

@FA-tvonmoll

This comment has been minimized.

Show comment
Hide comment
@FA-tvonmoll

FA-tvonmoll Apr 26, 2018

Depends how you installed it in the first place (and your OS). I use hombrew on macOS, so it's $ brew switch node 9.10.1.

Looks like you can do it via npm as well: https://exhesham.com/2017/12/01/how-to-downgrade-nodejs-and-npm-on-windows/

FA-tvonmoll commented Apr 26, 2018

Depends how you installed it in the first place (and your OS). I use hombrew on macOS, so it's $ brew switch node 9.10.1.

Looks like you can do it via npm as well: https://exhesham.com/2017/12/01/how-to-downgrade-nodejs-and-npm-on-windows/

@imurchie

This comment has been minimized.

Show comment
Hide comment
@imurchie

imurchie Apr 26, 2018

Member

I would highly recommend using a node version manager, like nvm (https://github.com/creationix/nvm).

In the meantime, I am looking into why this is happening.

Member

imurchie commented Apr 26, 2018

I would highly recommend using a node version manager, like nvm (https://github.com/creationix/nvm).

In the meantime, I am looking into why this is happening.

@pavanbachu0604

This comment has been minimized.

Show comment
Hide comment
@pavanbachu0604

pavanbachu0604 Apr 26, 2018

@imurchie when installing using nvm the node is getting saved in location /Users/xxxxx/.nvm/versions/node/v9.11.1/bin/node and appium is saved in /Users/xxxx/.nvm/versions/node/v9.11.1/bin/appium , the problem is while running the test cases it is trying to download the dependencies and I have firewall issue at work.

pavanbachu0604 commented Apr 26, 2018

@imurchie when installing using nvm the node is getting saved in location /Users/xxxxx/.nvm/versions/node/v9.11.1/bin/node and appium is saved in /Users/xxxx/.nvm/versions/node/v9.11.1/bin/appium , the problem is while running the test cases it is trying to download the dependencies and I have firewall issue at work.

@PaulysGitHub

This comment has been minimized.

Show comment
Hide comment
@PaulysGitHub

PaulysGitHub Apr 26, 2018

Yup, happening to me too! Can't even check the Appium version either. Rolling back node version.

PaulysGitHub commented Apr 26, 2018

Yup, happening to me too! Can't even check the Appium version either. Rolling back node version.

@priyankshah217

This comment has been minimized.

Show comment
Hide comment
@priyankshah217

priyankshah217 Apr 27, 2018

@PaulysGitHub , Do this in order to restore old node version.
Even I faced the same issue, downgrade node version by

  • Uninstall node brew uninstall node

  • Install node lower version of node brew install node@8

  • Do force link to node 8 brew link --overwrite node@8 --force

It will work.

Other than you can nvm to restore old version, and ensure that you need to reinstall appium.

priyankshah217 commented Apr 27, 2018

@PaulysGitHub , Do this in order to restore old node version.
Even I faced the same issue, downgrade node version by

  • Uninstall node brew uninstall node

  • Install node lower version of node brew install node@8

  • Do force link to node 8 brew link --overwrite node@8 --force

It will work.

Other than you can nvm to restore old version, and ensure that you need to reinstall appium.

@barotashish

This comment has been minimized.

Show comment
Hide comment
@barotashish

barotashish Apr 27, 2018

ashish@ashish-barot:~$ appium
internal/util.js:360
const filename = frame.getFileName();
^

TypeError: frame.getFileName is not a function
at isInsideNodeModules (internal/util.js:360:28)
at showFlaggedDeprecation (buffer.js:149:8)
at new Buffer (buffer.js:174:3)
at retrieveSourceMap (/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:118:21)
at mapSourcePosition (/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:140:21)
at wrapCallSite (/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:303:20)
at /home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:338:26
at Array.map ()
at Function.prepareStackTrace (/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:337:24)
at process.emit (/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:387:52)
at process._fatalException (internal/bootstrap/node.js:435:27)

Getting same error on Ubuntu 17.10

barotashish commented Apr 27, 2018

ashish@ashish-barot:~$ appium
internal/util.js:360
const filename = frame.getFileName();
^

TypeError: frame.getFileName is not a function
at isInsideNodeModules (internal/util.js:360:28)
at showFlaggedDeprecation (buffer.js:149:8)
at new Buffer (buffer.js:174:3)
at retrieveSourceMap (/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:118:21)
at mapSourcePosition (/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:140:21)
at wrapCallSite (/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:303:20)
at /home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:338:26
at Array.map ()
at Function.prepareStackTrace (/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:337:24)
at process.emit (/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:387:52)
at process._fatalException (internal/bootstrap/node.js:435:27)

Getting same error on Ubuntu 17.10

@lolotoms

This comment has been minimized.

Show comment
Hide comment
@lolotoms

lolotoms Apr 30, 2018

I have the same on mac OS platform. I installed the last nove version (brew install node) and tried to upgrade (node 10.0.0 already installed). Now i am trying to install appium (npm install -g appium) and had the result :
/usr/local/bin/appium -> /usr/local/lib/node_modules/appium/build/lib/main.js

appium-chromedriver@3.5.2 install /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver
node install-npm.js

Error trying to install Chromedriver binary. Waiting and trying again. frame.getFileName is not a function
...
Unable to import install script. Re-run install appium-chromedriver manually.

appium-selendroid-driver@1.7.0 install /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver
node ./bin/install.js

internal/util.js:360
const filename = frame.getFileName();
^

TypeError: frame.getFileName is not a function
at isInsideNodeModules (internal/util.js:360:28)
at showFlaggedDeprecation (buffer.js:149:8)
at new Buffer (buffer.js:174:3)
at Array. (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/node_modules/source-map-support/source-map-support.js:149:21)
at /usr/local/lib/node_modules/appium/node_modules/appium-base-driver/node_modules/source-map-support/source-map-support.js:53:24
at mapSourcePosition (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/node_modules/source-map-support/source-map-support.js:171:21)
at wrapCallSite (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/node_modules/source-map-support/source-map-support.js:343:20)
at /usr/local/lib/node_modules/appium/node_modules/appium-base-driver/node_modules/source-map-support/source-map-support.js:378:26
at Array.map ()
at Function.prepareStackTrace (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/node_modules/source-map-support/source-map-support.js:377:24)
at process.emit (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/node_modules/source-map-support/source-map-support.js:431:52)
at process._fatalException (internal/bootstrap/node.js:435:27)
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! appium-selendroid-driver@1.7.0 install: node ./bin/install.js
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the appium-selendroid-driver@1.7.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2018-04-30T09_15_45_743Z-debug.log

lolotoms commented Apr 30, 2018

I have the same on mac OS platform. I installed the last nove version (brew install node) and tried to upgrade (node 10.0.0 already installed). Now i am trying to install appium (npm install -g appium) and had the result :
/usr/local/bin/appium -> /usr/local/lib/node_modules/appium/build/lib/main.js

appium-chromedriver@3.5.2 install /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver
node install-npm.js

Error trying to install Chromedriver binary. Waiting and trying again. frame.getFileName is not a function
...
Unable to import install script. Re-run install appium-chromedriver manually.

appium-selendroid-driver@1.7.0 install /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver
node ./bin/install.js

internal/util.js:360
const filename = frame.getFileName();
^

TypeError: frame.getFileName is not a function
at isInsideNodeModules (internal/util.js:360:28)
at showFlaggedDeprecation (buffer.js:149:8)
at new Buffer (buffer.js:174:3)
at Array. (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/node_modules/source-map-support/source-map-support.js:149:21)
at /usr/local/lib/node_modules/appium/node_modules/appium-base-driver/node_modules/source-map-support/source-map-support.js:53:24
at mapSourcePosition (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/node_modules/source-map-support/source-map-support.js:171:21)
at wrapCallSite (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/node_modules/source-map-support/source-map-support.js:343:20)
at /usr/local/lib/node_modules/appium/node_modules/appium-base-driver/node_modules/source-map-support/source-map-support.js:378:26
at Array.map ()
at Function.prepareStackTrace (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/node_modules/source-map-support/source-map-support.js:377:24)
at process.emit (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/node_modules/source-map-support/source-map-support.js:431:52)
at process._fatalException (internal/bootstrap/node.js:435:27)
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! appium-selendroid-driver@1.7.0 install: node ./bin/install.js
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the appium-selendroid-driver@1.7.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2018-04-30T09_15_45_743Z-debug.log

@imurchie

This comment has been minimized.

Show comment
Hide comment
@imurchie

imurchie Apr 30, 2018

Member

Yes. As it stands, this WILL NOT WORK. The latest Appium was released before Node 10 was released. We are working on getting it working.

Member

imurchie commented Apr 30, 2018

Yes. As it stands, this WILL NOT WORK. The latest Appium was released before Node 10 was released. We are working on getting it working.

@whyboris

This comment has been minimized.

Show comment
Hide comment
@whyboris

whyboris May 2, 2018

For reference, I have a similar frame.getFileName error when running Protractor e2e tests (on an Angular app) on Node 10. No such problem occurs on previous (v8 & v9) versions of Node.

whyboris commented May 2, 2018

For reference, I have a similar frame.getFileName error when running Protractor e2e tests (on an Angular app) on Node 10. No such problem occurs on previous (v8 & v9) versions of Node.

@aKaltenb

This comment has been minimized.

Show comment
Hide comment
@aKaltenb

aKaltenb May 9, 2018

Node has been updated to 10.1.0.
appium is launching again

aKaltenb commented May 9, 2018

Node has been updated to 10.1.0.
appium is launching again

@imurchie

This comment has been minimized.

Show comment
Hide comment
@imurchie

imurchie May 9, 2018

Member

Appium 1.8.1-beta (npm install -g appium@beta ought to work.

Member

imurchie commented May 9, 2018

Appium 1.8.1-beta (npm install -g appium@beta ought to work.

@imurchie imurchie closed this May 9, 2018

@barotashish

This comment has been minimized.

Show comment
Hide comment
@barotashish

barotashish May 10, 2018

Let me try npm install -g appium@beta

as I am also getting error with npm install -g appium ( with Node version 10.0.0)

ashish@ashish-barot:~/Documents/Testing Tool$ npm install -g appium
/home/ashish/.nvm/versions/node/v10.0.0/bin/appium -> /home/ashish/.nvm/versions/node/v10.0.0/lib/node_modules/appium/build/lib/main.js

appium-chromedriver@3.5.2 install /home/ashish/.nvm/versions/node/v10.0.0/lib/node_modules/appium/node_modules/appium-chromedriver
node install-npm.js

Error trying to install Chromedriver binary. Waiting and trying again. frame.getFileName is not a function
Error trying to install Chromedriver binary. Waiting and trying again. frame.getFileName is not a function
Error trying to install Chromedriver binary. Waiting and trying again. frame.getFileName is not a function

barotashish commented May 10, 2018

Let me try npm install -g appium@beta

as I am also getting error with npm install -g appium ( with Node version 10.0.0)

ashish@ashish-barot:~/Documents/Testing Tool$ npm install -g appium
/home/ashish/.nvm/versions/node/v10.0.0/bin/appium -> /home/ashish/.nvm/versions/node/v10.0.0/lib/node_modules/appium/build/lib/main.js

appium-chromedriver@3.5.2 install /home/ashish/.nvm/versions/node/v10.0.0/lib/node_modules/appium/node_modules/appium-chromedriver
node install-npm.js

Error trying to install Chromedriver binary. Waiting and trying again. frame.getFileName is not a function
Error trying to install Chromedriver binary. Waiting and trying again. frame.getFileName is not a function
Error trying to install Chromedriver binary. Waiting and trying again. frame.getFileName is not a function

@aKaltenb

This comment has been minimized.

Show comment
Hide comment
@aKaltenb

aKaltenb May 10, 2018

updating to Node 10.1.0 solves this error

aKaltenb commented May 10, 2018

updating to Node 10.1.0 solves this error

@barotashish

This comment has been minimized.

Show comment
Hide comment
@barotashish

barotashish May 10, 2018

Yes Now my installation is successful

npm install -g appium@beta - this is working fine.

Thank you everyone for your help and input !

barotashish commented May 10, 2018

Yes Now my installation is successful

npm install -g appium@beta - this is working fine.

Thank you everyone for your help and input !

@imurchie imurchie added this to the Robot 26 milestone May 14, 2018

@justintoth

This comment has been minimized.

Show comment
Hide comment
@justintoth

justintoth May 22, 2018

This allows the installation of appium to work, but running appium gives the same error...

C:\Users\justin>appium -v
1.8.1-beta1

C:\Users\justin>appium
internal/util.js:360
const filename = frame.getFileName();
^

TypeError: frame.getFileName is not a function
at isInsideNodeModules (internal/util.js:360:28)
at showFlaggedDeprecation (buffer.js:149:8)
at new Buffer (buffer.js:174:3)
at Array. (C:\Users\justin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-espresso-driver\node_modules\source-map-support\source-map-support.js:149:21)
at C:\Users\justin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-espresso-driver\node_modules\source-map-support\source-map-support.js:53:24
at mapSourcePosition (C:\Users\justin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-espresso-driver\node_modules\source-map-support\source-map-support.js:171:21)
at wrapCallSite (C:\Users\justin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-espresso-driver\node_modules\source-map-support\source-map-support.js:343:20)
at C:\Users\justin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-espresso-driver\node_modules\source-map-support\source-map-support.js:378:26
at Array.map ()
at Function.prepareStackTrace (C:\Users\justin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-espresso-driver\node_modules\source-map-support\source-map-support.js:377:24)
at process.emit (C:\Users\justin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-espresso-driver\node_modules\source-map-support\source-map-support.js:431:52)
at process._fatalException (internal/bootstrap/node.js:435:27)

justintoth commented May 22, 2018

This allows the installation of appium to work, but running appium gives the same error...

C:\Users\justin>appium -v
1.8.1-beta1

C:\Users\justin>appium
internal/util.js:360
const filename = frame.getFileName();
^

TypeError: frame.getFileName is not a function
at isInsideNodeModules (internal/util.js:360:28)
at showFlaggedDeprecation (buffer.js:149:8)
at new Buffer (buffer.js:174:3)
at Array. (C:\Users\justin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-espresso-driver\node_modules\source-map-support\source-map-support.js:149:21)
at C:\Users\justin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-espresso-driver\node_modules\source-map-support\source-map-support.js:53:24
at mapSourcePosition (C:\Users\justin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-espresso-driver\node_modules\source-map-support\source-map-support.js:171:21)
at wrapCallSite (C:\Users\justin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-espresso-driver\node_modules\source-map-support\source-map-support.js:343:20)
at C:\Users\justin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-espresso-driver\node_modules\source-map-support\source-map-support.js:378:26
at Array.map ()
at Function.prepareStackTrace (C:\Users\justin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-espresso-driver\node_modules\source-map-support\source-map-support.js:377:24)
at process.emit (C:\Users\justin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-espresso-driver\node_modules\source-map-support\source-map-support.js:431:52)
at process._fatalException (internal/bootstrap/node.js:435:27)

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