René's URL Explorer Experiment


Title: ListensToLogcatMessages.class function startLogcatBroadcast improvement · Issue #1352 · appium/java-client · GitHub

Open Graph Title: ListensToLogcatMessages.class function startLogcatBroadcast improvement · Issue #1352 · appium/java-client

X Title: ListensToLogcatMessages.class function startLogcatBroadcast improvement · Issue #1352 · appium/java-client

Description: The problem I tried using the 'addLogcatMessagesListener' for the appium Android Driver but it failed with an exception that it can not connect. Only after I looked into the issue more deeply I noticed, that the default port is hardcoded...

Open Graph Description: The problem I tried using the 'addLogcatMessagesListener' for the appium Android Driver but it failed with an exception that it can not connect. Only after I looked into the issue more deeply I not...

X Description: The problem I tried using the 'addLogcatMessagesListener' for the appium Android Driver but it failed with an exception that it can not connect. Only after I looked into the issue more deep...

Opengraph URL: https://github.com/appium/java-client/issues/1352

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ListensToLogcatMessages.class function startLogcatBroadcast improvement","articleBody":"## The problem\r\n\r\nI tried using the '[addLogcatMessagesListener](https://appium.github.io/java-client/io/appium/java_client/android/ListensToLogcatMessages.html)' for the appium Android Driver but it failed with an exception that it can not connect. Only after I looked into the issue more deeply I noticed, that the default port is hardcoded into the startLogcatBroadcast function. I think this is really confusing and unnecessary.\r\n```\r\n    default void startLogcatBroadcast() {\r\n        this.startLogcatBroadcast(\"localhost\", 4723);\r\n    }\r\n\r\n    default void startLogcatBroadcast(String host) {\r\n        this.startLogcatBroadcast(host, 4723);\r\n    }\r\n```\r\nHowever, it is possible to use this to not use the default host and port:\r\n```\r\n    default void startLogcatBroadcast(String host, int port) {\r\n        this.execute(\"executeScript\", ImmutableMap.of(\"script\", \"mobile: startLogsBroadcast\", \"args\", Collections.emptyList()));\r\n\r\n        URI endpointUri;\r\n        try {\r\n            endpointUri = new URI(String.format(\"ws://%s:%s/ws/session/%s/appium/device/logcat\", host, port, ((RemoteWebDriver)this).getSessionId()));\r\n        } catch (URISyntaxException var5) {\r\n            throw new IllegalArgumentException(var5);\r\n        }\r\n\r\n        this.getLogcatClient().connect(endpointUri);\r\n    }\r\n```\r\n\r\nWhat I do not get is why ListensToLogcatMessages.class doesn't simply use the host and port by the driver calling this class/function? Is there even a point in doing logcatListening to another appium service besides the one used by the driver?\r\nIs there a reason why this should not be automated? \r\nImho what it should do is this:\r\n```\r\n    default void startLogcatBroadcast() {\r\n        URL remoteAdress = this.getRemoteAddress();\r\n        this.startLogcatBroadcast(remoteAdress.getHost(), remoteAdress.getPort());\r\n    }\r\n```\r\n\r\n\r\n## Environment\r\n\r\n* Appium version (or git revision) that exhibits the issue: 1.17.1\r\n* Desktop OS/version used to run Appium: Manjaro\r\n* Mobile platform/version under test: Android\r\n* Real device or emulator/simulator: emulator\r\n* Appium CLI or Appium.app|exe: CLI\r\n\r\n## Details\r\n\r\n\r\n## Code To Reproduce Issue [ Good To Have ]\r\nFor testing the addLogcatMessagesListener I took this code:\r\nhttps://github.com/appium/java-client/blob/master/src/test/java/io/appium/java_client/android/AndroidLogcatListenerTest.java\r\n\r\nFor creating the appium service I used this code (which will always uses any free port it finds):\r\n```\r\n    public static URL createAppiumService() {\r\n        AppiumServiceBuilder builder = new AppiumServiceBuilder();\r\n        builder.usingAnyFreePort();\r\n        builder.withArgument(GeneralServerFlag.LOG_LEVEL, LogLevel);\r\n        builder.withArgument(GeneralServerFlag.LOG_TIMESTAMP);\r\n        builder.withArgument(GeneralServerFlag.RELAXED_SECURITY);\r\n        appium = AppiumDriverLocalService.buildService(builder);\r\n        appium.start();\r\n        Assert.assertTrue(appium.isRunning(), \"Der Appium Server läuft nicht!\");\r\n        return appium.getUrl();\r\n    }\r\n```\r\n\r\nThe driver can then be initialized like so:\r\n\r\n`AndroidDriver\u003cAndroidElement\u003e driver = new AndroidDriver\u003cAndroidElement\u003e(createAppiumService(), _YourDesiredCapsHere_);`\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/hwulfmeyer","@type":"Person","name":"hwulfmeyer"},"datePublished":"2020-05-26T12:16:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1352/java-client/issues/1352"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1d0dadb4-eb97-551a-efe7-fdf8d9f8e29f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA9A4:1E7DF5:CCAEF0:114DB6E:6A5F00DB
html-safe-nonce86b28f1bd1a2af84d6f4be583ee67e1d66a9e7b13e5839ab3582e4928c050de5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOUE0OjFFN0RGNTpDQ0FFRjA6MTE0REI2RTo2QTVGMDBEQiIsInZpc2l0b3JfaWQiOiIyMzc4NTU4Nzc0NDE0NjA2NTU1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac51ac271d65a8427003054b1e0e1b90ca580f070ba2cd21c0bc0c6d41eb0c7138
hovercard-subject-tagissue:624838995
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/appium/java-client/1352/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9f34bb55ad468ad47672bc2c57d460b27c78665452da88e495a51e0b4b532986/appium/java-client/issues/1352
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9f34bb55ad468ad47672bc2c57d460b27c78665452da88e495a51e0b4b532986/appium/java-client/issues/1352
og:image:altThe problem I tried using the 'addLogcatMessagesListener' for the appium Android Driver but it failed with an exception that it can not connect. Only after I looked into the issue more deeply I not...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehwulfmeyer
hostnamegithub.com
expected-hostnamegithub.com
Nonebf8fa4b42b6d150def6175efb9b0f1ec8e9628d7229ee2bdf6e850e7bdad923e
turbo-cache-controlno-preview
go-importgithub.com/appium/java-client git https://github.com/appium/java-client.git
octolytics-dimension-user_id3221291
octolytics-dimension-user_loginappium
octolytics-dimension-repository_id18454064
octolytics-dimension-repository_nwoappium/java-client
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id18454064
octolytics-dimension-repository_network_root_nwoappium/java-client
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7debc3c6cd5de09c6e22b47a1b9982acb2aabb7b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/appium/java-client/issues/1352#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fappium%2Fjava-client%2Fissues%2F1352
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fappium%2Fjava-client%2Fissues%2F1352
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=appium%2Fjava-client
Reloadhttps://github.com/appium/java-client/issues/1352
Reloadhttps://github.com/appium/java-client/issues/1352
Reloadhttps://github.com/appium/java-client/issues/1352
Please reload this pagehttps://github.com/appium/java-client/issues/1352
appium https://github.com/appium
java-clienthttps://github.com/appium/java-client
Please reload this pagehttps://github.com/appium/java-client/issues/1352
Notifications https://github.com/login?return_to=%2Fappium%2Fjava-client
Fork 756 https://github.com/login?return_to=%2Fappium%2Fjava-client
Star 1.3k https://github.com/login?return_to=%2Fappium%2Fjava-client
Code https://github.com/appium/java-client
Issues 269 https://github.com/appium/java-client/issues
Pull requests 1 https://github.com/appium/java-client/pulls
Discussions https://github.com/appium/java-client/discussions
Actions https://github.com/appium/java-client/actions
Projects https://github.com/appium/java-client/projects
Wiki https://github.com/appium/java-client/wiki
Security and quality 0 https://github.com/appium/java-client/security
Insights https://github.com/appium/java-client/pulse
Code https://github.com/appium/java-client
Issues https://github.com/appium/java-client/issues
Pull requests https://github.com/appium/java-client/pulls
Discussions https://github.com/appium/java-client/discussions
Actions https://github.com/appium/java-client/actions
Projects https://github.com/appium/java-client/projects
Wiki https://github.com/appium/java-client/wiki
Security and quality https://github.com/appium/java-client/security
Insights https://github.com/appium/java-client/pulse
ListensToLogcatMessages.class function startLogcatBroadcast improvementhttps://github.com/appium/java-client/issues/1352#top
https://github.com/hwulfmeyer
hwulfmeyerhttps://github.com/hwulfmeyer
on May 26, 2020https://github.com/appium/java-client/issues/1352#issue-624838995
addLogcatMessagesListenerhttps://appium.github.io/java-client/io/appium/java_client/android/ListensToLogcatMessages.html
https://github.com/appium/java-client/blob/master/src/test/java/io/appium/java_client/android/AndroidLogcatListenerTest.javahttps://github.com/appium/java-client/blob/master/src/test/java/io/appium/java_client/android/AndroidLogcatListenerTest.java
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.