JabRef / jabref

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

IEEE Search not working #6837

Open djwoodhouse opened 4 years ago

djwoodhouse commented 4 years ago

I get the following error org.jabref.logic.importer.FetcherException: A network error occurred while fetching from https://ieeexploreapi.ieee.org/api/v1/search/articles?apikey=s6kcbenkaxdu55c8k8983pw9&querytext=earthing at org.jabref@5.1.60000/org.jabref.logic.importer.SearchBasedParserFetcher.getBibEntries(Unknown Source) at org.jabref@5.1.60000/org.jabref.logic.importer.SearchBasedParserFetcher.performSearch(Unknown Source) at org.jabref@5.1.60000/org.jabref.gui.importer.fetcher.WebSearchPaneViewModel.lambda$search$1(Unknown Source) at org.jabref@5.1.60000/org.jabref.gui.util.BackgroundTask$1.call(Unknown Source) at org.jabref@5.1.60000/org.jabref.gui.util.DefaultTaskExecutor$1.call(Unknown Source) at org.jabref.merged.module@5.1.60000/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://ieeexploreapi.ieee.org/api/v1/search/articles?apikey=s6kcbenkaxdu55c8k8983pw9&querytext=earthing 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@5.1.60000/org.jabref.logic.net.URLDownload.asInputStream(Unknown Source) ... 12 more Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://ieeexploreapi.ieee.org/api/v1/search/articles?apikey=s6kcbenkaxdu55c8k8983pw9&querytext=earthing 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@5.1.60000/org.jabref.logic.net.URLDownload.openConnection(Unknown Source) ... 13 more

MaxSchambach commented 4 years ago

I am experiences the same Issue. It seems like the used API Key is no longer valied. Viewing the API request in the browser, it returns "Developer Inactive".

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!

devinluo27 commented 3 years ago

I am experiences the same Issue. It seems like the used API Key is no longer valied. Viewing the API request in the browser, it returns "Developer Inactive".

Hi @MaxSchambach, Could you give a detailed instruction on how to reproduce the bug?

MaxSchambach commented 3 years ago

I have just tried it with the newer JabRef 5.2 version. Using the macOS version, everything works as expected. Under Linux however, seraching from IEEEXplore fails:

Error thrown: "A network error occured while fetching from [URL]"

Using "Test" as a search string, the URL is http://ieeexploreapi.ieee.org/api/v1/search/articles?apikey=null&max_records=20&start_record=01&querytext=%22Test%22

which results in an Developer Inactive error.

Also, I just tried it with e.g. SpringerLink which gives an identical error (of course with a different API call URL). To me, it seems weird that in both cases the URL passes apikey=null.

Full stacktrace:

<details>
<summary>Detail information:</summary>

Enabling live reloading of /usr/share/java/jabref/resources/main/org/jabref/gui/Base.css
Enabling live reloading of /usr/share/java/jabref/resources/main/org/jabref/gui/Base.css
Fix SSL exceptions by accepting ALL certificates
Error importing
org.jabref.logic.importer.FetcherException: A network error occurred while fetching from https://ieeexploreapi.ieee.org/api/v1/search/articles?apikey=null&max_records=20&start_record=01&querytext=%22Test%22
    at org.jabref@5.2/org.jabref.logic.importer.PagedSearchBasedParserFetcher.getBibEntries(PagedSearchBasedParserFetcher.java:34)
    at org.jabref@5.2/org.jabref.logic.importer.PagedSearchBasedParserFetcher.performSearchPaged(PagedSearchBasedParserFetcher.java:25)
    at org.jabref@5.2/org.jabref.logic.importer.PagedSearchBasedFetcher.performSearchPaged(PagedSearchBasedFetcher.java:33)
    at org.jabref@5.2/org.jabref.logic.importer.PagedSearchBasedFetcher.performSearch(PagedSearchBasedFetcher.java:50)
    at org.jabref@5.2/org.jabref.gui.importer.fetcher.WebSearchPaneViewModel.lambda$search$1(WebSearchPaneViewModel.java:107)
    at org.jabref@5.2/org.jabref.gui.util.BackgroundTask$1.call(BackgroundTask.java:59)
    at org.jabref@5.2/org.jabref.gui.util.DefaultTaskExecutor$1.call(DefaultTaskExecutor.java:160)
    at javafx.graphics/javafx.concurrent.Task$TaskCallable.call(Task.java:1425)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://ieeexploreapi.ieee.org/api/v1/search/articles?apikey=null&max_records=20&start_record=01&querytext=%22Test%22
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1982)
    at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1977)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1976)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1544)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1528)
    at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
    at org.jabref@5.2/org.jabref.logic.net.URLDownload.asInputStream(URLDownload.java:279)
    at org.jabref@5.2/org.jabref.logic.importer.PagedSearchBasedParserFetcher.getBibEntries(PagedSearchBasedParserFetcher.java:29)
    ... 13 more
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://ieeexploreapi.ieee.org/api/v1/search/articles?apikey=null&max_records=20&start_record=01&querytext=%22Test%22
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1932)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1528)
    at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
    at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:308)
    at org.jabref@5.2/org.jabref.logic.net.URLDownload.openConnection(URLDownload.java:335)
    at org.jabref@5.2/org.jabref.logic.net.URLDownload.asInputStream(URLDownload.java:272)
    ... 14 more

Enabling live reloading of /usr/share/java/jabref/resources/main/org/jabref/gui/Base.css
Import canceled

</details>

System: JabRef 5.2--ArchLinux--1 Linux 5.11.16-arch1-1 amd64 Java 15.0.2

koppor commented 3 years ago

We got a world-wide limit of 200 calls/day for IEEE. IEEE cannot provide unlimited API access for all JabRef users. We are working on a solution, but we cannot promise anything yet.

Information on the implementation and limits is available at https://devdocs.jabref.org/advanced-reading/fetchers.

koppor commented 3 years ago

Please discuss on the rate limit at https://discourse.jabref.org/t/ieee-rate-limit/2222.