Akylas / OSS-DocumentScanner

Android document document scanning app
https://www.akylas.fr
MIT License
607 stars 22 forks source link

[BUG] UnknownHostException when downloading Tesseract trained data using proxy #164

Closed eht16 closed 3 months ago

eht16 commented 3 months ago

Version

1.4.15.56

What platform are you using?

Android

OS Version

GrapheneOS Android 13

What happened?

When trying to download the trained data for Tesseract from within the app, an "UnknownHostException" is thrown.

This happens when a global proxy is set via "settings put global http_proxy proxy.example.com:8080"

The address in the error message is my configured proxy hostname.

Relevant log output

03-17 14:51:44.732  1630  2686 D CoreBackPreview: Window{1bf2af0 u0 com.akylas.documentscanner/com.akylas.documentscanner.MainActivity}: Setting back callback null
03-17 14:51:44.737  1630  2686 W InputManager-JNI: Input channel object '1bf2af0 com.akylas.documentscanner/com.akylas.documentscanner.MainActivity (client)' was disposed without first being removed with the input manager!
03-17 14:51:44.753  1630  1773 V WindowManager: Unknown focus tokens, dropping reportFocusChanged
03-17 14:51:44.796 31016 31057 W Parcel  : Expecting binder but got null!
03-17 14:51:44.803  1630  3360 D CoreBackPreview: Window{deca04e u0 com.akylas.documentscanner/com.akylas.documentscanner.MainActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@4c98a68, mPriority=0}
03-17 14:51:44.842  1630  3360 D CoreBackPreview: Window{deca04e u0 com.akylas.documentscanner/com.akylas.documentscanner.MainActivity}: Setting back callback null
03-17 14:51:44.844  1630  3360 W InputManager-JNI: Input channel object 'deca04e com.akylas.documentscanner/com.akylas.documentscanner.MainActivity (client)' was disposed without first being removed with the input manager!
03-17 14:51:44.876 31016 31057 W Parcel  : Expecting binder but got null!
03-17 14:51:44.880  1630  2686 D CoreBackPreview: Window{501f457 u0 com.akylas.documentscanner/com.akylas.documentscanner.MainActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@ad35629, mPriority=0}

Code of Conduct

bug_proxy_oss-ds

farfromrefug commented 3 months ago

@eht16 not sure what I can do about this. could this be an issue with your proxy being unable to contact github? I dont do anything special with http request so I guess they should work with proxy. can you access github using your global proxy from your browser?

edit: actually it is your proxy server the app can't connect to. thinking...

eht16 commented 3 months ago

The proxy server can contact Github just fine, it works via browser and any other app and it can be resolved via DNS.

eht16 commented 3 months ago

Argh, I denied the network permission when installing it.

After allowing the app network access, it works perfectly. Sorry for wasting your time :(.