Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Socket timeout #291

Open
lakshyagupta21 opened this issue Aug 6, 2019 · 2 comments
Open

Socket timeout #291

lakshyagupta21 opened this issue Aug 6, 2019 · 2 comments

Comments

@lakshyagupta21
Copy link
Contributor

Software and hardware versions

Android v7.1 and Android 9.0, device used...

Problem description

When transferring forms from Android 9 to Android 7.1, I'm getting socket timeout in Android 7.1 device logs while making the bluetooth connection, but the other way is working fine.

Steps to reproduce the problem

  1. Send forms from Android 9 via Bluetooth
  2. Select the sender as Android 9 Device
  3. Connection dialog is shown then it is stuck with the logs

Expected behavior

The connection should be established and transfer should happen without any problem.

Other information

2019-08-06 08:27:13.945 13155-13202/org.odk.share E/DownloadJob: java.io.IOException: read failed, socket might closed or timeout, read ret: -1
        at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:738)
        at android.bluetooth.BluetoothSocket.readInt(BluetoothSocket.java:750)
        at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:375)
        at org.odk.share.tasks.DownloadJob.setupDataStreamsAndReceive(DownloadJob.java:137)
        at org.odk.share.tasks.DownloadJob.initJob(DownloadJob.java:124)
        at org.odk.share.tasks.DownloadJob.onRunJob(DownloadJob.java:106)
        at com.evernote.android.job.Job.runJob(Job.java:132)
        at com.evernote.android.job.JobExecutor$JobCallable.runJob(JobExecutor.java:191)
        at com.evernote.android.job.JobExecutor$JobCallable.call(JobExecutor.java:176)
        at com.evernote.android.job.JobExecutor$JobCallable.call(JobExecutor.java:159)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:760)
@lakshyagupta21
Copy link
Contributor Author

One more log, could be the same issue

        at android.bluetooth.BluetoothAdapter.createNewRfcommSocketAndRecord(BluetoothAdapter.java:1755)
        at android.bluetooth.BluetoothAdapter.listenUsingInsecureRfcommWithServiceRecord(BluetoothAdapter.java:1702)
        at org.odk.share.tasks.UploadJob.setupDataStreamsAndRun(UploadJob.java:121)
        at org.odk.share.tasks.UploadJob.initJob(UploadJob.java:112)
        at org.odk.share.tasks.UploadJob.onRunJob(UploadJob.java:98)
        at com.evernote.android.job.Job.runJob(Job.java:132)
        at com.evernote.android.job.JobExecutor$JobCallable.runJob(JobExecutor.java:191)
        at com.evernote.android.job.JobExecutor$JobCallable.call(JobExecutor.java:176)
        at com.evernote.android.job.JobExecutor$JobCallable.call(JobExecutor.java:159)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:760)```

@huangyz0918
Copy link
Contributor

This issue can be reproduced by:

  • transfer data using bluetooth
  • finish the first transmission and success
  • press back in your bluetooth sender and click send again to enter the send page
  • receiver pair to the same sender
  • connection cannot not be established

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

No branches or pull requests

2 participants