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

In some context, NoSuchElementException: No line found error thrown from telemetry #42058

Closed
apupier opened this issue Jul 23, 2024 · 6 comments · Fixed by #42071
Closed

In some context, NoSuchElementException: No line found error thrown from telemetry #42058

apupier opened this issue Jul 23, 2024 · 6 comments · Fixed by #42071
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins kind/bug Something isn't working
Milestone

Comments

@apupier
Copy link

apupier commented Jul 23, 2024

Describe the bug

It can be reproduced when using the devfile from the devfile registry and starting the remote dev

see devfile/api#1611

Expected behavior

no stacktrace

Actual behavior

there is a stacktrace logged:

tools: ----------------------------
tools: --- Help improve Quarkus ---
tools: ----------------------------
tools: * Learn more: https://quarkus.io/usage/
tools: * Do you agree to contribute anonymous build time data to the Quarkus community? (y/n and enter) 
tools: [WARNING] Failed to collect user input for analytics
tools: java.util.NoSuchElementException: No line found
tools:     at java.util.Scanner.nextLine (Scanner.java:1660)
tools:     at io.quarkus.maven.DevMojo.lambda$execute$0 (DevMojo.java:445)
tools:     at io.quarkus.analytics.ConfigService.lambda$userAcceptance$0 (ConfigService.java:79)
tools:     at java.util.concurrent.CompletableFuture$AsyncSupply.run (CompletableFuture.java:1768)
tools:     at java.lang.Thread.run (Thread.java:1583)
tools: [info] [Quarkus build analytics] Didn't receive a valid user's answer: `y` or `n`. The question will be asked again next time.

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

I wasn't able to reproduce with a local build devfile/api#1611 (comment)

@apupier apupier added the kind/bug Something isn't working label Jul 23, 2024
@geoand geoand added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins and removed triage/needs-triage labels Jul 23, 2024
@geoand
Copy link
Contributor

geoand commented Jul 23, 2024

cc @brunobat

@brunobat
Copy link
Contributor

brunobat commented Jul 23, 2024

This is just a harmless warning it can be avoided altogether by placing the following file:
~/.redhat/io.quarkus.analytics.localconfig
with contents:

{"disabled":false}

This way analytics will be on and user input will not be requested, therefore speeding up the application startup.

@apupier
Copy link
Author

apupier commented Jul 23, 2024

In the context the error is hit, it is using the ubi (Universal Base Image). I do not think that we should put this kind of file in this image.
An alternative would be to provide a specific image for Quarkus devfiles but it sounds a bit overkill just for that.

And if we place it, we must set "disabled": true, the telemetry must be something opt-in.

I think a good solution is to provide a nicer message instead of a stacktrace.

@brunobat
Copy link
Contributor

There was a nicer message: [WARNING] Failed to collect user input for analytics...

@quarkus-bot quarkus-bot bot added this to the 3.14 - main milestone Jul 23, 2024
@gsmet gsmet modified the milestones: 3.14 - main, 3.13.0 Jul 23, 2024
Copy link

quarkus-bot bot commented Aug 1, 2024

@maxandersen triage/backport* labels may not be added to an issue. Please add them to the corresponding pull request.

This message is automatically generated by a bot.

@maxandersen
Copy link
Member

this should be backported if possbile

@gsmet gsmet modified the milestones: 3.13.0, 3.8.6 Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants