yoshistabber / anymemo

Automatically exported from code.google.com/p/anymemo
GNU General Public License v2.0
0 stars 0 forks source link

Cannot download from Flashcardexchange #137

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Try to download from Flashcardexchange
2.Lists categories and cardsets OK
3.Failure message on trying to download cardset
4.Can download cardset from Anymemo OK

What is the expected output? What do you see instead?

What is the AnyMemo version  9.1.1

What is your Android phone model - superpad

What is your Android version 2.2

Original issue reported on code.google.com by robert.a...@wanadoo.fr on 30 Oct 2012 at 8:33

GoogleCodeExporter commented 8 years ago
Looks like FlashcardExchange website has changed something so it stops working. 
Need further investigation. Here is the error log:
V/org.liberty.android.fantastischmemo.downloader.DownloaderFE( 1363): Download 
url: 
http://api.flashcardexchange.com/v1/get_card_set?api_key=anymemo_android&card_se
t_id=841363
E/org.liberty.android.fantastischmemo.downloader.DownloaderFE( 1363): Error 
downloading
E/org.liberty.android.fantastischmemo.downloader.DownloaderFE( 1363): 
java.net.MalformedURLException: Protocol not found: null
E/org.liberty.android.fantastischmemo.downloader.DownloaderFE( 1363):   at 
java.net.URL.<init>(URL.java:178)
E/org.liberty.android.fantastischmemo.downloader.DownloaderFE( 1363):   at 
java.net.URL.<init>(URL.java:127)
E/org.liberty.android.fantastischmemo.downloader.DownloaderFE( 1363):   at 
org.liberty.android.fantastischmemo.downloader.DownloaderUtils.downloadFile(Down
loaderUtils.java:88)
E/org.liberty.android.fantastischmemo.downloader.DownloaderFE( 1363):   at 
org.liberty.android.fantastischmemo.downloader.DownloaderFE.downloadDatabase(Dow
nloaderFE.java:290)
E/org.liberty.android.fantastischmemo.downloader.DownloaderFE( 1363):   at 
org.liberty.android.fantastischmemo.downloader.DownloaderFE.access$3(DownloaderF
E.java:264)
E/org.liberty.android.fantastischmemo.downloader.DownloaderFE( 1363):   at 
org.liberty.android.fantastischmemo.downloader.DownloaderFE$2$1.run(DownloaderFE
.java:173)

Original comment by mrlhwlib...@gmail.com on 30 Oct 2012 at 8:49

GoogleCodeExporter commented 8 years ago
Root cause found. FlashcardExchange has changed their API.
"question_image_url":null

I will contact FlashcardExchange to fix the API.

Original comment by mrlhwlib...@gmail.com on 30 Oct 2012 at 9:02

GoogleCodeExporter commented 8 years ago
FlashcardExchange support contacted. Here quotes the email:

"""
Dear FlashcardExchange Support,

AnyMemo has been used  FlashcardExchange V1 API to download flashcard for a 
long time.
Today we got a customer ticket about downloading issue from FlashcardExchange:
http://code.google.com/p/anymemo/issues/detail?id=137

For my investigation, FlashcardExchange has changed the API format.
Using this API: 
http://api.flashcardexchange.com/v1/get_card_set?api_key=your_key&card_set_id=14
92997
"question_image_url":null
"answer_image_url":null

It was like this before:
"answer_image_url":""

While AnyMemo is still migrating to the now V2 API, please fix this issue ASAP 
since all our customers can't use FlashcardExchange due to this issue.

Sincerely,
Liberty
"""

Original comment by mrlhwlib...@gmail.com on 30 Oct 2012 at 9:10

GoogleCodeExporter commented 8 years ago
FlashcardExchange indicate they patched the issue. However it is more broken 
than before. Now we get this error when trying to search.
W/DefaultRequestDirector( 1044): Authentication error: Unable to respond to any 
of these challenges: {oauth=WWW-Authenticate: OAuth realm=""}
I/org.liberty.android.fantastischmemo.downloader.DownloaderUtils( 1044): 
Response: HTTP/1.1 401 Unauthorized
V/org.liberty.android.fantastischmemo.downloader.DownloaderFE( 1044): JSON 
String: Can't verify request, missing oauth_consumer_key or oauth_token

Original comment by mrlhwlib...@gmail.com on 1 Nov 2012 at 12:55

GoogleCodeExporter commented 8 years ago
FlashcardExchange support contacted again for the issue:

"""
Hi,

Thank you for the fast response. I verified using curl that the value has been 
restored.
However, the public deck searching function is now totally broken

curl 'http://api.flashcardexchange.com/v1/get_tag?api_key=my_key'
Can't verify request, missing oauth_consumer_key or oauth_token% 

In AnyMemo we got:

W/DefaultRequestDirector( 1044): Authentication error: Unable to respond to any 
of these challenges: {oauth=WWW-Authenticate: OAuth realm=""}
I/org.liberty.android.fantastischmemo.downloader.DownloaderUtils( 1044): 
Response: HTTP/1.1 401 Unauthorized
V/org.liberty.android.fantastischmemo.downloader.DownloaderFE( 1044): JSON 
String: Can't verify request, missing oauth_consumer_key or oauth_token

Sincerely,
Liberty
"""

Original comment by mrlhwlib...@gmail.com on 1 Nov 2012 at 12:59

GoogleCodeExporter commented 8 years ago
FlashcardExchange replied via email:

"""
liberty, thanks for being patient, we will fix this shortly.

thanks
"""

Original comment by mrlhwlib...@gmail.com on 1 Nov 2012 at 4:32

GoogleCodeExporter commented 8 years ago
fixed yet?

Original comment by Sebastia...@gmail.com on 1 Nov 2012 at 11:02

GoogleCodeExporter commented 8 years ago
I just verified Flashcardexchange has fixed issue. Coupled with AnyMemo 9.1.2, 
it should be fine by now.

Original comment by mrlhwlib...@gmail.com on 1 Nov 2012 at 11:47

GoogleCodeExporter commented 8 years ago
The login function in FlashcardExchange is still broken. FlashcardExchange 
support contacted again.

Original comment by mrlhwlib...@gmail.com on 2 Nov 2012 at 4:43

GoogleCodeExporter commented 8 years ago
Hi,

Many thanks.

I can now download "public" card sets but "Access Private Cards" does not
work.

Original comment by robert.a...@wanadoo.fr on 3 Nov 2012 at 8:54

GoogleCodeExporter commented 8 years ago
There is nothing I can't do on AnyMemo side for short term. Once 
FlashcardExchange fix the issue, it will work.
For the long term, AnyMemo need to migrate to their new V2 API. But it require 
a lot of work and V2 API is very new and could not be very stable too.

Original comment by mrlhwlib...@gmail.com on 3 Nov 2012 at 9:05

GoogleCodeExporter commented 8 years ago
The private card access is still broken. FE support contacted:

"""
The callback url is recovered now. The  weird thing is that the Signpost 
library AnyMemo is using return an exception when I try to get access token. I 
also got confused by the exception. I need to dig into the library to see what 
it is really doing. Here are some debugging log.

Request part:

I/ActivityManager(  880): START {act=android.intent.action.VIEW 
cat=[android.intent.category.BROWSABLE] 
dat=anymemo-fe://fe?oauth_token=9a1e440de252e3aa72d9efe1089a883e05098a1b6&oauth_
verifier=506c0c5cae cmp=org.liberty.android.fantastischmemo/.downloader.FEOauth 
(has extras)} from pid 1891

Got the token:

D/Oauth   ( 1891): 
anymemo-fe://fe?oauth_token=9a1e440de252e3aa72d9efe1089a883e05098a1b6&oauth_veri
fier=506c0c5cae

code that got exception:

92: provider.retrieveAccessToken(consumer, verifier);

Exception:

W/System.err( 1891): oauth.signpost.exception.OAuthCommunicationException: 
Communication with the service provider failed: null
W/System.err( 1891):    at 
oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:21
4)
W/System.err( 1891):    at 
oauth.signpost.AbstractOAuthProvider.retrieveAccessToken(AbstractOAuthProvider.j
ava:99)
W/System.err( 1891):    at 
org.liberty.android.fantastischmemo.downloader.FEOauth.onNewIntent(FEOauth.java:
93)
W/System.err( 1891):    at 
android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1123)
W/System.err( 1891):    at 
android.app.ActivityThread.deliverNewIntents(ActivityThread.java:2042)
W/System.err( 1891):    at 
android.app.ActivityThread.performNewIntents(ActivityThread.java:2055)
W/System.err( 1891):    at 
android.app.ActivityThread.handleNewIntent(ActivityThread.java:2064)
W/System.err( 1891):    at 
android.app.ActivityThread.access$1400(ActivityThread.java:123)
W/System.err( 1891):    at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1194)
W/System.err( 1891):    at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 1891):    at android.os.Looper.loop(Looper.java:137)
W/System.err( 1891):    at 
android.app.ActivityThread.main(ActivityThread.java:4424)
W/System.err( 1891):    at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 1891):    at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err( 1891):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
W/System.err( 1891):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
W/System.err( 1891):    at dalvik.system.NativeStart.main(Native Method)
W/System.err( 1891): Caused by: android.os.NetworkOnMainThreadException
W/System.err( 1891):    at 
android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099)
W/System.err( 1891):    at 
java.net.InetAddress.lookupHostByName(InetAddress.java:391)
W/System.err( 1891):    at 
java.net.InetAddress.getAllByNameImpl(InetAddress.java:242)
W/System.err( 1891):    at java.net.InetAddress.getAllByName(InetAddress.java:220)
W/System.err( 1891):    at 
org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(Default
ClientConnectionOperator.java:137)
W/System.err( 1891):    at 
org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
W/System.err( 1891):    at 
org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapt
er.java:119)
W/System.err( 1891):    at 
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirecto
r.java:360)
W/System.err( 1891):    at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:5
55)
W/System.err( 1891):    at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:4
87)
W/System.err( 1891):    at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:4
65)
W/System.err( 1891):    at 
oauth.signpost.commonshttp.CommonsHttpOAuthProvider.sendRequest(CommonsHttpOAuth
Provider.java:64)
D/dalvikvm( 1891): GC_CONCURRENT freed 426K, 7% free 7463K/8007K, paused 0ms+0ms
W/System.err( 1891):    at 
oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:17
7)
W/System.err( 1891):    ... 16 mor
"""

Original comment by mrlhwlib...@gmail.com on 6 Nov 2012 at 5:41

GoogleCodeExporter commented 8 years ago
When I try to log in to flashcardexchange.com it lets me log in but then there 
is no way to import my flashcards.

Original comment by mengler...@gmail.com on 10 Jul 2013 at 4:00

GoogleCodeExporter commented 8 years ago
The flashcardexchange log in is still broken.  It seems like Flashcard exchange 
login part will not work without completely rewrite that part to suite the new 
website.

Original comment by mrlhwlib...@gmail.com on 10 Jul 2013 at 4:13

GoogleCodeExporter commented 8 years ago
Probably not a lot of people are using FE's upload function. I will remove it 
in favor of Quizlet and AnyMemo's own upload server.

Original comment by mrlhwlib...@gmail.com on 17 Dec 2013 at 2:12

GoogleCodeExporter commented 8 years ago
Issue 289 has been merged into this issue.

Original comment by mrlhwlib...@gmail.com on 24 Dec 2013 at 6:24

GoogleCodeExporter commented 8 years ago
FE upload / private card function removed since it is not working. I don't have 
interest to keep their ownership change.

Original comment by mrlhwlib...@gmail.com on 28 Dec 2013 at 7:06