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

add mobile logs broadcast #764

Merged
merged 4 commits into from
Apr 19, 2018

Conversation

KazuCocoa
Copy link
Member

Include "appium-base-driver": "^2.27.0"

[debug] [W3C] Calling AppiumDriver.getStatus() with args: []
[debug] [W3C] Responding to client with driver.getStatus() result: {"build":{"version":"1.8.0-beta","revision":"228ca6b3285b718b65c78d03d4b2170189145c5c"}}
[HTTP] <-- GET /wd/hub/status 200 58 ms - 98
[HTTP]
[HTTP] --> POST /wd/hub/session/b3d32a41-31f9-493b-803d-47c16b724f46/execute
[HTTP] {"script":"mobile: stopLogsBroadcast","args":[]}
[debug] [W3C] Calling AppiumDriver.execute() with args: ["mobile: stopLogsBroadcast",[],"b3d32a41-31f9-493b-803d-47c16b724f46"]
[W3C] Encountered internal error running command: TypeError: Cannot read property 'getWebSocketHandlers' of undefined
[W3C]     at AndroidDriver.callee$0$0$ (/Users/kazuaki/GitHub/appium/node_modules/appium-android-driver/lib/commands/log.js:105:35)
[W3C]     at tryCatch (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[W3C]     at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[W3C]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[W3C]     at invoke (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[W3C]     at enqueueResult (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
[W3C]     at new Promise (<anonymous>)
[W3C]     at new F (/Users/kazuaki/GitHub/appium/node_modules/core-js/library/modules/$.export.js:30:36)
[W3C]     at AsyncIterator.enqueue (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
[W3C]     at AsyncIterator.prototype.(anonymous function) [as next] (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[W3C]     at Object.runtime.async (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
[W3C]     at AndroidDriver.callee$0$0 [as mobileStopLogsBroadcast] (/Users/kazuaki/GitHub/appium/node_modules/appium-android-driver/build/lib/commands/log.js:186:30)
[W3C]     at AndroidDriver.callee$0$0$ (/Users/kazuaki/GitHub/appium/node_modules/appium-android-driver/lib/commands/execute.js:26:58)
[W3C]     at tryCatch (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[W3C]     at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[W3C]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[W3C]     at invoke (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[W3C]     at enqueueResult (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
[W3C]     at new Promise (<anonymous>)
[W3C]     at new F (/Users/kazuaki/GitHub/appium/node_modules/core-js/library/modules/$.export.js:30:36)
[W3C]     at AsyncIterator.enqueue (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
[W3C]     at AsyncIterator.prototype.(anonymous function) [as next] (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[W3C]     at Object.runtime.async (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
[W3C]     at AndroidDriver.callee$0$0 [as executeMobile] (/Users/kazuaki/GitHub/appium/node_modules/appium-android-driver/build/lib/commands/execute.js:48:30)
[W3C]     at AndroidDriver.callee$0$0$ (/Users/kazuaki/GitHub/appium/node_modules/appium-android-driver/lib/commands/execute.js:9:23)
[W3C]     at tryCatch (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[W3C]     at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[W3C]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[W3C]     at invoke (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[W3C]     at enqueueResult (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
[W3C]     at new Promise (<anonymous>)
[W3C]     at new F (/Users/kazuaki/GitHub/appium/node_modules/core-js/library/modules/$.export.js:30:36)
[W3C]     at AsyncIterator.enqueue (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
[W3C]     at AsyncIterator.prototype.(anonymous function) [as next] (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[W3C]     at Object.runtime.async (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
[W3C]     at AndroidDriver.callee$0$0 [as execute] (/Users/kazuaki/GitHub/appium/node_modules/appium-android-driver/build/lib/commands/execute.js:20:30)
[W3C]     at /Users/kazuaki/GitHub/appium/node_modules/appium-base-driver/lib/basedriver/driver.js:275:26
[W3C]     at tryCatcher (/Users/kazuaki/GitHub/appium/node_modules/bluebird/js/main/util.js:26:23)
[W3C]     at Promise._settlePromiseFromHandler (/Users/kazuaki/GitHub/appium/node_modules/bluebird/js/main/promise.js:510:31)
[W3C]     at Promise._settlePromiseAt (/Users/kazuaki/GitHub/appium/node_modules/bluebird/js/main/promise.js:584:18)
[W3C]     at Promise._settlePromiseAtPostResolution (/Users/kazuaki/GitHub/appium/node_modules/bluebird/js/main/promise.js:248:10)
[W3C]     at Async._drainQueue (/Users/kazuaki/GitHub/appium/node_modules/bluebird/js/main/async.js:128:12)
[W3C]     at Async._drainQueues (/Users/kazuaki/GitHub/appium/node_modules/bluebird/js/main/async.js:133:10)
[W3C]     at Immediate.Async.drainQueues (/Users/kazuaki/GitHub/appium/node_modules/bluebird/js/main/async.js:15:14)
[W3C]     at runCallback (timers.js:773:18)
[W3C]     at tryOnImmediate (timers.js:734:5)
[W3C]     at processImmediate [as _immediateCallback] (timers.js:711:5)
[HTTP] <-- POST /wd/hub/session/b3d32a41-31f9-493b-803d-47c16b724f46/execute 500 11 ms - 227
[HTTP]
^C[Appium] Received SIGINT - shutting down

@mykola-mokhnach
Copy link

I see the actual implementation like an additional webdriver feature, which allows it to emit signals (logcat messages in our case), which can then be asynchronously handled by one or multiple clients (depending on which type of signal listener(s) they define). The basic example: https://github.com/fnando/signal

In the future this can be extended to any type of signal if we add more web socket types.

@KazuCocoa
Copy link
Member Author

KazuCocoa commented Apr 5, 2018

a note for me : appium/java-client#858

@KazuCocoa KazuCocoa changed the title [WIP]add mobile logs broadcast add mobile logs broadcast Apr 15, 2018
@KazuCocoa KazuCocoa merged commit 74437a7 into appium:master Apr 19, 2018
@KazuCocoa KazuCocoa deleted the add-mobile-socket-logcat branch April 19, 2018 21:40
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 this pull request may close these issues.

2 participants