JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.58k stars 2.49k forks source link

Enhancement/improvement: display alert if web search fetcher cannot succeed, instead of exception #6343

Closed ilippert closed 3 years ago

ilippert commented 4 years ago

reframing this as a small improvement relating to #6331

Problem I am always frustrated when I use google web search and get an exception - because I never immediately know what the issue is.

Proposed solution I would appreciate a specific error message (rather than getting an exception) "[X] is preventing you from more searches." or something similar. [X] is the Fetcher, e.g. google or ieee.

Log File org.jabref.logic.importer.FetcherException: Error while fetching from Google Scholar at org.jabref/org.jabref.logic.importer.fetcher.GoogleScholar.performSearch(Unknown Source) at org.jabref/org.jabref.gui.importer.fetcher.WebSearchPaneViewModel.lambda$search$1(Unknown Source) at org.jabref/org.jabref.gui.util.BackgroundTask$1.call(Unknown Source) at org.jabref/org.jabref.gui.util.DefaultTaskExecutor$1.call(Unknown Source) at org.jabref.merged.module/javafx.concurrent.Task$TaskCallable.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://scholar.googleusercontent.com/scholar.bib?q=info:fu-HqA2D0GoJ:scholar.google.com/&output=citation&scisdr=CgWDtGZeEK2YzlELkXM:AAGBfm0AAAAAXqQOiXNFaz5GoAYFVPqNRM7F4RqXPnnc&scisig=AAGBfm0AAAAAXqQOiduRwxTLbjmUUnOU60Ku7REjtsyZ&scisf=4&ct=citation&cd=17&hl=en at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source) at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source) at org.jabref/org.jabref.logic.net.URLDownload.asString(Unknown Source) at org.jabref/org.jabref.logic.net.URLDownload.asString(Unknown Source) at org.jabref/org.jabref.logic.importer.fetcher.GoogleScholar.downloadEntry(Unknown Source) at org.jabref/org.jabref.logic.importer.fetcher.GoogleScholar.addHitsFromQuery(Unknown Source) ... 11 more Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://scholar.googleusercontent.com/scholar.bib?q=info:fu-HqA2D0GoJ:scholar.google.com/&output=citation&scisdr=CgWDtGZeEK2YzlELkXM:AAGBfm0AAAAAXqQOiXNFaz5GoAYFVPqNRM7F4RqXPnnc&scisig=AAGBfm0AAAAAXqQOiduRwxTLbjmUUnOU60Ku7REjtsyZ&scisf=4&ct=citation&cd=17&hl=en at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at java.base/java.net.HttpURLConnection.getResponseCode(Unknown Source) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source) at org.jabref/org.jabref.logic.net.URLDownload.openConnection(Unknown Source) ... 15 more
ilippert commented 4 years ago

I think, this suggestion comes close to the suggestion at https://github.com/JabRef/jabref/issues/6376

github-actions[bot] commented 3 years ago

This issue has been inactive for half a year. Since JabRef is constantly evolving this issue may not be relevant any longer and it will be closed in two weeks if no further activity occurs.

As part of an effort to ensure that the JabRef team is focusing on important and valid issues, we would like to ask if you could update the issue if it still persists. This could be in the following form:

Thank you for your contribution!

ilippert commented 3 years ago

I wonder how difficult this feature is. If it is not much work, then I think it would really help minimise puzzlement for users who are not everyday users of jabref. I repeatedly stumble upon it after some weeks in which I do not search for literature...

Siedlerchr commented 3 years ago

@DominikVoigt As you have more insight, I think the text of the dialog has been changed, correct?

ilippert commented 3 years ago

JabRef 5.2--2020-12-07--c770310 Linux 5.9.11-200.fc33.x86_64 amd64 Java 15.0.1

just testing it. When I try to use google search nothing happens. when I type - into the search field, the field turns red.

github-actions[bot] commented 3 years ago

This issue has been inactive for half a year. Since JabRef is constantly evolving this issue may not be relevant any longer and it will be closed in two weeks if no further activity occurs.

As part of an effort to ensure that the JabRef team is focusing on important and valid issues, we would like to ask if you could update the issue if it still persists. This could be in the following form:

Thank you for your contribution!

ilippert commented 3 years ago

JabRef 5.3--2021-07-16--c99d61c Linux 5.13.4-200.fc34.x86_64 amd64 Java 16.0.1 JavaFX 16+8

The field turns red when entering - and a hover tip signals an invalid query element '-' at position X. I think this is a good solution for now. Therefore I close this issue.