Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odk collect 1.1.7 crashes getting formlist #336

Closed
mitchellsundt opened this issue Jul 9, 2015 · 7 comments
Closed

odk collect 1.1.7 crashes getting formlist #336

mitchellsundt opened this issue Jul 9, 2015 · 7 comments

Comments

@mitchellsundt
Copy link
Contributor

mitchellsundt commented Jul 9, 2015

Migrated to getodk/collect#43 by spacetelescope/github-issues-import

Originally reported on Google Code with ID 335

I'm trying to implement a custom server, so there's almost surely an issue on the server
side; however, even in the case of wrong or even malicious response from the server,
ODK collect should never crash.

It looks like it crashes when retrieving the formList over https if the server doesn't
have a valid certificate (I'm only guessing)

What steps will reproduce the problem?
1. get the form list from a server with https without a certificate

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

Expected is some meaningful error message to the user saying that the identity of the
server cannot be verified

Observed is that ODK Collect crashes


I think this is the relevant part of the log:

09-24 18:50:13.152 W/System.err(25941): javax.net.ssl.SSLPeerUnverifiedException: No
peer certificate
09-24 18:50:13.152 W/System.err(25941): at org.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:258)
09-24 18:50:13.152 W/System.err(25941): at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93)
09-24 18:50:13.152 W/System.err(25941): at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
09-24 18:50:13.152 W/System.err(25941): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:164)
09-24 18:50:13.152 W/System.err(25941): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
09-24 18:50:13.162 W/System.err(25941): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
09-24 18:50:13.162 W/System.err(25941): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:359)
09-24 18:50:13.162 W/System.err(25941): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
09-24 18:50:13.162 W/System.err(25941): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
09-24 18:50:13.162 W/System.err(25941): at org.odk.collect.android.utilities.WebUtils.getXmlDocument(WebUtils.java:216)
09-24 18:50:13.162 W/System.err(25941): at org.odk.collect.android.tasks.DownloadFormListTask.doInBackground(DownloadFormListTask.java:82)
09-24 18:50:13.162 W/System.err(25941): at org.odk.collect.android.tasks.DownloadFormListTask.doInBackground(DownloadFormListTask.java:1)
09-24 18:50:13.162 W/System.err(25941): at android.os.AsyncTask$2.call(AsyncTask.java:185)
09-24 18:50:13.162 W/System.err(25941): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
09-24 18:50:13.162 W/System.err(25941): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
09-24 18:50:13.172 W/System.err(25941): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
09-24 18:50:13.172 W/System.err(25941): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
09-24 18:50:13.172 W/System.err(25941): at java.lang.Thread.run(Thread.java:1027)
09-24 18:50:13.192 W/dalvikvm(25941): threadid=12: thread exiting with uncaught exception
(group=0x4001d5a0)
09-24 18:50:13.213 D/dalvikvm(25941): GC_CONCURRENT freed 418K, 50% free 3067K/6023K,
external 0K/0K, paused 1ms+1ms
09-24 18:50:13.213 E/AndroidRuntime(25941): FATAL EXCEPTION: AsyncTask #4
09-24 18:50:13.213 E/AndroidRuntime(25941): java.lang.RuntimeException: An error occured
while executing doInBackground()
09-24 18:50:13.213 E/AndroidRuntime(25941): at android.os.AsyncTask$3.done(AsyncTask.java:200)
09-24 18:50:13.213 E/AndroidRuntime(25941): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
09-24 18:50:13.213 E/AndroidRuntime(25941): at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
09-24 18:50:13.213 E/AndroidRuntime(25941): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
09-24 18:50:13.213 E/AndroidRuntime(25941): at java.util.concurrent.FutureTask.run(FutureTask.java:138)
09-24 18:50:13.213 E/AndroidRuntime(25941): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
09-24 18:50:13.213 E/AndroidRuntime(25941): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
09-24 18:50:13.213 E/AndroidRuntime(25941): at java.lang.Thread.run(Thread.java:1027)
09-24 18:50:13.213 E/AndroidRuntime(25941): Caused by: java.lang.NullPointerException
09-24 18:50:13.213 E/AndroidRuntime(25941): at org.odk.collect.android.utilities.WebUtils.getXmlDocument(WebUtils.java:327)
09-24 18:50:13.213 E/AndroidRuntime(25941): at org.odk.collect.android.tasks.DownloadFormListTask.doInBackground(DownloadFormListTask.java:82)
09-24 18:50:13.213 E/AndroidRuntime(25941): at org.odk.collect.android.tasks.DownloadFormListTask.doInBackground(DownloadFormListTask.java:1)
09-24 18:50:13.213 E/AndroidRuntime(25941): at android.os.AsyncTask$2.call(AsyncTask.java:185)
09-24 18:50:13.213 E/AndroidRuntime(25941): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
09-24 18:50:13.213 E/AndroidRuntime(25941): ... 4 more
09-24 18:50:13.213 W/ActivityManager( 1487):   Force finishing activity org.odk.collect.android/.activities.FormDownloadList

Reported by matteosistisette on 2011-09-24 17:02:19

@mitchellsundt
Copy link
Contributor Author

mitchellsundt commented Jul 9, 2015

Migrated to opendatakit/collect#43 (comment) by spacetelescope/github-issues-import

Reported by wbrunette on 2011-09-25 04:29:50

  • Labels added: Collect

@mitchellsundt
Copy link
Contributor Author

mitchellsundt commented Jul 9, 2015

Migrated to opendatakit/collect#43 (comment) by spacetelescope/github-issues-import

Reported by yanokwa on 2011-10-04 19:15:56

  • Status changed: Accepted
  • Labels added: Priority-Low
  • Labels removed: Priority-Medium

@mitchellsundt
Copy link
Contributor Author

mitchellsundt commented Jul 9, 2015

Migrated to opendatakit/collect#43 (comment) by spacetelescope/github-issues-import

Reported by yanokwa on 2012-05-25 15:46:40

@mitchellsundt
Copy link
Contributor Author

mitchellsundt commented Jul 9, 2015

Migrated to opendatakit/collect#43 (comment) by spacetelescope/github-issues-import

Reported by yanokwa on 2012-05-25 20:14:15

@mitchellsundt
Copy link
Contributor Author

mitchellsundt commented Jul 9, 2015

Migrated to opendatakit/collect#43 (comment) by spacetelescope/github-issues-import

Would be nice to document the various threads that discuss adding root certificates
to Android.  This is the nature of HTTPS protocols and works as designed.

Reported by mitchellsundt on 2012-06-30 00:33:02

  • Labels added: Documentation

@mitchellsundt
Copy link
Contributor Author

mitchellsundt commented Jul 9, 2015

Migrated to opendatakit/collect#43 (comment) by spacetelescope/github-issues-import

Do you mean that the new version does not crash any more and instead issues an error
message?

Reported by matteosistisette on 2012-06-30 01:22:13

@mitchellsundt
Copy link
Contributor Author

mitchellsundt commented Jul 9, 2015

Migrated to opendatakit/collect#43 (comment) by spacetelescope/github-issues-import

Yes, 1.2 issues an error message:

Form listing failed. Error: java.security.cert.CertPathValidatorException: TrustAnchor
for CertPath not found. while accessing https://..../formLIst.

This occurs if the server has a self-signed or other unrecognized SSL certificate configured.

If you get a crash on 1.2 (default tip of ODK Collect), then it is something other
than a bad SSL certificate. Update this ticket with the repro case and I'll try to
duplicate it.

Reported by mitchellsundt on 2012-07-02 18:11:55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants