You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
I'm developing an GitHub application with AndroidAnnotations. This application isn't very complex and all works fine except when I don't have a good wireless connection on my smartphone.
With this bad connection, I receive a force closed exception with a online request. After that, I won't be able to succeed this request again. I restart the application but the exception come back.
I'm using the GitHub API v3. So, there aren't problems with the JSON.
The stack trace is :
01-14 22:35:16.082: E/AndroidRuntime(9317): FATAL EXCEPTION: pool-1-thread-101-14 22:35:16.082: E/AndroidRuntime(9317): Process: fr.univ.lille1.github, PID: 931701-14 22:35:16.082: E/AndroidRuntime(9317): org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 13; nested exception is com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1301-14 22:35:16.082: E/AndroidRuntime(9317): at org.springframework.http.converter.json.GsonHttpMessageConverter.readInternal(GsonHttpMessageConverter.java:143)01-14 22:35:16.082: E/AndroidRuntime(9317): at org.springframework.http.converter.AbstractHttpMessageConverter.read(AbstractHttpMessageConverter.java:147)01-14 22:35:16.082: E/AndroidRuntime(9317): at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:76)01-14 22:35:16.082: E/AndroidRuntime(9317): at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:655)01-14 22:35:16.082: E/AndroidRuntime(9317): at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:641)01-14 22:35:16.082: E/AndroidRuntime(9317): at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:484)01-14 22:35:16.082: E/AndroidRuntime(9317): at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:447)01-14 22:35:16.082: E/AndroidRuntime(9317): at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:422)01-14 22:35:16.082: E/AndroidRuntime(9317): at fr.univ.lille1.github.network.RestGithub_.getFollowings(RestGithub_.java:55)01-14 22:35:16.082: E/AndroidRuntime(9317): at fr.univ.lille1.github.FollowingActivity.backgroundRepository(FollowingActivity.java:36)01-14 22:35:16.082: E/AndroidRuntime(9317): at fr.univ.lille1.github.FollowingActivity_.access$101(FollowingActivity_.java:27)01-14 22:35:16.082: E/AndroidRuntime(9317): at fr.univ.lille1.github.FollowingActivity_$3.execute(FollowingActivity_.java:130)01-14 22:35:16.082: E/AndroidRuntime(9317): at org.androidannotations.api.BackgroundExecutor$Task.run(BackgroundExecutor.java:302)01-14 22:35:16.082: E/AndroidRuntime(9317): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)01-14 22:35:16.082: E/AndroidRuntime(9317): at java.util.concurrent.FutureTask.run(FutureTask.java:237)01-14 22:35:16.082: E/AndroidRuntime(9317): at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)01-14 22:35:16.082: E/AndroidRuntime(9317): at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)01-14 22:35:16.082: E/AndroidRuntime(9317): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)01-14 22:35:16.082: E/AndroidRuntime(9317): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)01-14 22:35:16.082: E/AndroidRuntime(9317): at java.lang.Thread.run(Thread.java:841)01-14 22:35:16.082: E/AndroidRuntime(9317): Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1301-14 22:35:16.082: E/AndroidRuntime(9317): at com.google.gson.Gson.fromJson(Gson.java:806)01-14 22:35:16.082: E/AndroidRuntime(9317): at com.google.gson.Gson.fromJson(Gson.java:734)01-14 22:35:16.082: E/AndroidRuntime(9317): at org.springframework.http.converter.json.GsonHttpMessageConverter.readInternal(GsonHttpMessageConverter.java:140)01-14 22:35:16.082: E/AndroidRuntime(9317): ... 19 more01-14 22:35:16.082: E/AndroidRuntime(9317): Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1301-14 22:35:16.082: E/AndroidRuntime(9317): at com.google.gson.stream.JsonReader.expect(JsonReader.java:339)01-14 22:35:16.082: E/AndroidRuntime(9317): at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:306)01-14 22:35:16.082: E/AndroidRuntime(9317): at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:79)01-14 22:35:16.082: E/AndroidRuntime(9317): at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60)01-14 22:35:16.082: E/AndroidRuntime(9317): at com.google.gson.Gson.fromJson(Gson.java:795)01-14 22:35:16.082: E/AndroidRuntime(9317): ... 21 more
Hello,
I'm developing an GitHub application with AndroidAnnotations. This application isn't very complex and all works fine except when I don't have a good wireless connection on my smartphone.
With this bad connection, I receive a force closed exception with a online request. After that, I won't be able to succeed this request again. I restart the application but the exception come back.
I'm using the GitHub API v3. So, there aren't problems with the JSON.
The stack trace is :