Skip to content
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

Throws: Cannot read property 'message' of undefined in error handler #96

Open
Borewit opened this issue Jan 29, 2020 · 2 comments · May be fixed by #136
Open

Throws: Cannot read property 'message' of undefined in error handler #96

Borewit opened this issue Jan 29, 2020 · 2 comments · May be fixed by #136

Comments

@Borewit
Copy link

Borewit commented Jan 29, 2020

Expected Behavior

Be able to run browserstack/karma-browserstack-example after updating the dependencies as done in PR: browserstack/karma-browserstack-example#4.

Actual Behavior

Karma catches an error (thrown by browserstack-local:
28 01 2020 21:48:06.733:ERROR [karma-server]: UncaughtException

Steps to Reproduce the Problem

Run the example with PR: browserstack/karma-browserstack-example#4

browserstack local arguments

Platform details

  1. browserstack-local-nodejs version: master branch, 1.4.5, d238484
  2. node version: 10.16.3
  3. os type and version: Linux Fedora 30

Details

Karma catches an error:
28 01 2020 21:48:06.733:ERROR [karma-server]: UncaughtException

caused by, Throws: Cannot read property 'message' of undefined in error handler in:

callback(new LocalError(data['message']['message']));

where

data = {}
TypeError: Cannot read property 'message' of undefined
    at /home/borewit/code/github/browserstack-local-nodejs/lib/Local.js:65:50
    at ChildProcess.exithandler (child_process.js:285:7)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16)
    at Socket.stream.socket.on (internal/child_process.js:389:11)
    at Socket.emit (events.js:198:13)
    at Pipe._handle.close (net.js:606:12)

Proposed fix: #97

@RohanImmanuel
Copy link

@Borewit I was unable to replicate the error using shared repo. To confirm if this is not caused by a corrupted binary could you try deleting the binary then execute the tests.

for Linux/Mac the binary is located at /Users/username/.browserstack

@Borewit
Copy link
Author

Borewit commented Mar 9, 2020

This issue might have been caused by an older version of the browserstack executable. Yet the error handling should not throw another error.

@SCG82 SCG82 linked a pull request Oct 16, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants