Crash on opening media details activity
See original GitHub issueSummary:
Opening media details activity crashes the app
Steps to reproduce:
Click on any uploaded image to open media details.
System logs:
2018-11-25 23:52:08.022 11454-11924/fr.free.nrw.commons.beta E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #9
Process: fr.free.nrw.commons.beta, PID: 11454
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:353)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.io.IOError: org.xml.sax.SAXParseException: attr value delimiter missing! (position:START_TAG <img src='https://www.wikimedia.org/static/images/wmf.png' srcset='https://www.wikimedia.org/static/images/wmf-2x.png 2x' alt='null'>@20:163 in java.io.InputStreamReader@a90d559)
at fr.free.nrw.commons.mwapi.CustomApiResult.fromRequestBuilder(CustomApiResult.java:58)
at fr.free.nrw.commons.mwapi.CustomMwApi.makeRequest(CustomMwApi.java:177)
at fr.free.nrw.commons.mwapi.CustomMwApi.access$000(CustomMwApi.java:18)
at fr.free.nrw.commons.mwapi.CustomMwApi$RequestBuilder.get(CustomMwApi.java:34)
at fr.free.nrw.commons.mwapi.ApacheHttpClientMediaWikiApi.fetchMediaByFilename(ApacheHttpClientMediaWikiApi.java:340)
at fr.free.nrw.commons.MediaDataExtractor.fetch(MediaDataExtractor.java:72)
at fr.free.nrw.commons.media.MediaDetailFragment$3.doInBackground(MediaDetailFragment.java:263)
at fr.free.nrw.commons.media.MediaDetailFragment$3.doInBackground(MediaDetailFragment.java:248)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: org.xml.sax.SAXParseException: attr value delimiter missing! (position:START_TAG <img src='https://www.wikimedia.org/static/images/wmf.png' srcset='https://www.wikimedia.org/static/images/wmf-2x.png 2x' alt='null'>@20:163 in java.io.InputStreamReader@a90d559)
at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:147)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107)
at fr.free.nrw.commons.mwapi.CustomApiResult.fromRequestBuilder(CustomApiResult.java:43)
at fr.free.nrw.commons.mwapi.CustomMwApi.makeRequest(CustomMwApi.java:177)
at fr.free.nrw.commons.mwapi.CustomMwApi.access$000(CustomMwApi.java:18)
at fr.free.nrw.commons.mwapi.CustomMwApi$RequestBuilder.get(CustomMwApi.java:34)
at fr.free.nrw.commons.mwapi.ApacheHttpClientMediaWikiApi.fetchMediaByFilename(ApacheHttpClientMediaWikiApi.java:340)
at fr.free.nrw.commons.MediaDataExtractor.fetch(MediaDataExtractor.java:72)
at fr.free.nrw.commons.media.MediaDetailFragment$3.doInBackground(MediaDetailFragment.java:263)
at fr.free.nrw.commons.media.MediaDetailFragment$3.doInBackground(MediaDetailFragment.java:248)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
2018-11-25 23:52:08.022 11454-11923/fr.free.nrw.commons.beta E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #8
Process: fr.free.nrw.commons.beta, PID: 11454
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:353)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.io.IOError: org.xml.sax.SAXParseException: attr value delimiter missing! (position:START_TAG <img src='https://www.wikimedia.org/static/images/wmf.png' srcset='https://www.wikimedia.org/static/images/wmf-2x.png 2x' alt='null'>@20:163 in java.io.InputStreamReader@c82251e)
at fr.free.nrw.commons.mwapi.CustomApiResult.fromRequestBuilder(CustomApiResult.java:58)
at fr.free.nrw.commons.mwapi.CustomMwApi.makeRequest(CustomMwApi.java:177)
at fr.free.nrw.commons.mwapi.CustomMwApi.access$000(CustomMwApi.java:18)
at fr.free.nrw.commons.mwapi.CustomMwApi$RequestBuilder.get(CustomMwApi.java:34)
at fr.free.nrw.commons.mwapi.ApacheHttpClientMediaWikiApi.fetchMediaByFilename(ApacheHttpClientMediaWikiApi.java:340)
at fr.free.nrw.commons.MediaDataExtractor.fetch(MediaDataExtractor.java:72)
at fr.free.nrw.commons.media.MediaDetailFragment$3.doInBackground(MediaDetailFragment.java:263)
at fr.free.nrw.commons.media.MediaDetailFragment$3.doInBackground(MediaDetailFragment.java:248)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: org.xml.sax.SAXParseException: attr value delimiter missing! (position:START_TAG <img src='https://www.wikimedia.org/static/images/wmf.png' srcset='https://www.wikimedia.org/static/images/wmf-2x.png 2x' alt='null'>@20:163 in java.io.InputStreamReader@c82251e)
at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:147)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107)
at fr.free.nrw.commons.mwapi.CustomApiResult.fromRequestBuilder(CustomApiResult.java:43)
at fr.free.nrw.commons.mwapi.CustomMwApi.makeRequest(CustomMwApi.java:177)
at fr.free.nrw.commons.mwapi.CustomMwApi.access$000(CustomMwApi.java:18)
at fr.free.nrw.commons.mwapi.CustomMwApi$RequestBuilder.get(CustomMwApi.java:34)
at fr.free.nrw.commons.mwapi.ApacheHttpClientMediaWikiApi.fetchMediaByFilename(ApacheHttpClientMediaWikiApi.java:340)
at fr.free.nrw.commons.MediaDataExtractor.fetch(MediaDataExtractor.java:72)
at fr.free.nrw.commons.media.MediaDetailFragment$3.doInBackground(MediaDetailFragment.java:263)
at fr.free.nrw.commons.media.MediaDetailFragment$3.doInBackground(MediaDetailFragment.java:248)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Device and Android version:
Nexus 5. API 27.
Commons app version:
2.9-release
branch. Beta variant
Would you like to work on the issue?
Preferably not.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Why does my app keep crashing when launching the camera ...
I'm trying to launch the camera in a new activity but whenever I press the button to open the camera, my app keeps...
Read more >Unexpected App Crashes on Android and How to Deal with ...
An easy and convenient solution would be to check whether our existing app process was killed and recreated when the user resumes the...
Read more >Why Do My Apps Keep Crashing on Android? - Avast
Cached data helps apps remember your previous activity for convenience and speed. But sometimes, the cache saves data that makes an app keep ......
Read more >Crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >How to fix Premiere Pro crash issues - Adobe Support
Learn how you can fix common Premiere Pro freezing or crashing issues using these six simple steps.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Works in prod for me on API 27 Nexus S. No harm in fixing it for beta, but not a high priority IMO.
Seems to ve very old, also I can confirm from the logs that this has been fixed. Closing this issue