Strange error in Android 6.0.1 - android

E/ItsOnOemAPI: Send local socket ADD_MEDIA_MAPPING failed
java.io.IOException: No such file or directory
at android.net.LocalSocketImpl.connectLocal(Native Method)
at android.net.LocalSocketImpl.connect(LocalSocketImpl.java:290)
at android.net.LocalSocket.connect(LocalSocket.java:130)
at com.itsoninc.android.ItsOnOemApi.sendLocalSocket(ItsOnOemApi.java:265)
at com.itsoninc.android.ItsOnOemApi.registerMediaMapping(ItsOnOemApi.java:245)
at java.lang.reflect.Method.invoke(Native Method)
at android.media.MediaPlayer.registerMediaMapping(MediaPlayer.java:1273)
at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1204)
at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1164)
at com.pakistantechhouse.quranmp3pro.activities.Start$MP1.doInBackground(Start.java:3138)
at com.pakistantechhouse.quranmp3pro.activities.Start$MP1.doInBackground(Start.java:3111)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
I am getting the above error while playing a mp3 file from internet same code is working on later versions of android and also on 6.0 on most of the devices but on my test device(Samsung Galaxy note Edge SP-N915P) its giving me the above error and not playing the media files.

Related

Unknown database and database operation found on my app

I am testing my android app using the android studio also I am using a lot of libraries from GitHub and my problem is when I check LogCat, it showing the unknown message from my phone there is no related app has installed to get this type of message.
What is the problem is my app is hacked?
0-23 12:41:56.486 19337-19379/? E/SQLiteDatabase: Error inserting imdata={"sender":"1007787459425466","is_video":true,"filesize":4229475,"alias":"aswin ps","original_id":".8HGNxeIGQGYKGdwELDentPbijFS","public_level":1,"sim_iso":"IN","type":"video"} is_public=1 buid=fof:fof object_id=.8HGNxeIGQGYKGdwELDentPbijFS original_id=.8HGNxeIGQGYKGdwELDentPbijFS view_type=1 timestamp=1540262393 group_num=0 message_read=0
android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: stories.buid, stories.object_id (code 2067)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:780)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1471)
at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1341)
at com.imo.android.imoim.util.v.a(SourceFile:79)
at com.imo.android.imoim.util.h.doInBackground(SourceFile:1026)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)

Android SSLHandShakeException: Handschake failed on Android 6.0.1

Since a week when doing a request, I get this SSLHandschakeException. Have been searching the internet, found nothing to solve the problem. The code used to work, and stopped working wihout a change. The SSL certificate is valid, it works in the browser, also on the Android device. But not in the app.
I run the app on a Nexus 5 with Android 6.0.1. The app uses Volley to make the requests, just normal stuff.
The weirdest thing is, when removing the app from the device, and than run the app, it works. But after that is doesn't.
The complete stacktrace:
com.android.volley.NoConnectionError: javax.net.ssl.SSLHandshakeException: Handshake failed
at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:151)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:112)
Caused by: javax.net.ssl.SSLHandshakeException: Handshake failed
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:396)
at com.android.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:103)
at com.android.okhttp.Connection.connect(Connection.java:143)
at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:185)
at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:437)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:388)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:501)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java)
at com.android.volley.toolbox.HurlStack.performRequest(HurlStack.java:110)
at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:96)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:112) 
Suppressed: javax.net.ssl.SSLHandshakeException: Handshake failed
... 16 more
Suppressed: javax.net.ssl.SSLHandshakeException: Handshake failed
... 16 more
Suppressed: javax.net.ssl.SSLHandshakeException: Handshake failed
... 16 more
Caused by: javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0xab1e5c00: Failure in SSL library, usually a protocol error
error:100c543e:SSL routines:ssl3_read_bytes:TLSV1_ALERT_INAPPROPRIATE_FALLBACK (external/boringssl/src/ssl/s3_pkt.c:972 0xab4705c0:0x00000001)
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:324)
... 15 more
Caused by: javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0xab1e5c00: Failure in SSL library, usually a protocol error
error:100c543e:SSL routines:ssl3_read_bytes:TLSV1_ALERT_INAPPROPRIATE_FALLBACK (external/boringssl/src/ssl/s3_pkt.c:972 0xab4705c0:0x00000001)
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:324)
... 15 more
Caused by: javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0xab1e5c00: Failure in SSL library, usually a protocol error
error:100c543e:SSL routines:ssl3_read_bytes:TLSV1_ALERT_INAPPROPRIATE_FALLBACK (external/boringssl/src/ssl/s3_pkt.c:972 0xab4705c0:0x00000001)
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:324)
... 15 more
Caused by: javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0xab1e5c00: Failure in SSL library, usually a protocol error
error:100c5410:SSL routines:ssl3_read_bytes:SSLV3_ALERT_HANDSHAKE_FAILURE (external/boringssl/src/ssl/s3_pkt.c:972 0xab4705c0:0x00000001)
error:100c009f:SSL routines:ssl3_get_server_hello:HANDSHAKE_FAILURE_ON_CLIENT_HELLO (external/boringssl/src/ssl/s3_clnt.c:750 0xab23259f:0x00000000)
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:324)
... 15 more
As explained here: https://github.com/square/okhttp/issues/1582#issuecomment-97104082
You could be in one of those situations:
You go to a site called https://example.com and you end up on a site that
to you appears to be on https://example.com but is giving you a
certificate for https://no-example.com. OkHttp will correctly fail the
connection. In a browser like Chrome you'd see a warning in the console along the
lines of "This isn't the page you think it is"
Other exceptions showed that a certificate was provided by the server,
but it wasn't trusted because the root certificate wasn't on the
client device (or may have expired)
You need to debug more your SSL problems, probably due to a wrong certificate configuration on server or a missing/expired certificate on the client. You can try to follow something similar to this when you have understood where is your problem

Failed to get the Accelerometer readings on Kaa SandBox server

I have tried to send the Accelerometer data to Kaa sandbox and do some data analytics
so I have created and activity to get the accelerometer sensor readings and I also created a Kaa manager to start the kaa client
but I got this error
03-06 17:10:42.117 2945-2978/org.kaaproject.kaa.demo.testAcc I/*ultOperationTcpChannel: Can't sync. Channel [default_operation_tcp_channel] is waiting for CONNACK message + KAASYNC message
03-06 17:10:42.163 2945-2983/org.kaaproject.kaa.demo.testAcc I/AbstractHttpChannel: Processing sync all for channel default_bootstrap_channel
03-06 17:10:42.178 2945-2980/org.kaaproject.kaa.demo.testAcc D/libc: [NET] android_getaddrinfofornetcontext+,hn 9(0x6c6f63616c686f),sn(),hints(known),family 0,flags 1024, proc=org.kaaproject.kaa.demo.testAcc
03-06 17:10:42.184 2945-2980/org.kaaproject.kaa.demo.testAcc E/DefaultBootstrapChannel: Failed to receive operation servers list {}
org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:9889 refused
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:193)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:169)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:124)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:379)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:492)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:470)
at org.kaaproject.kaa.client.transport.AndroidHttpClient.executeHttpRequest(AndroidHttpClient.java:112)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel.processTypes(DefaultBootstrapChannel.java:56)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel.access$200(DefaultBootstrapChannel.java:32)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel$BootstrapRunnable.run(DefaultBootstrapChannel.java:92)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
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:761)
Caused by: java.net.ConnectException: Permission denied
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:169)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:124)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:379)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:492)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:470)
at org.kaaproject.kaa.client.transport.AndroidHttpClient.executeHttpRequest(AndroidHttpClient.java:112)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel.processTypes(DefaultBootstrapChannel.java:56)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel.access$200(DefaultBootstrapChannel.java:32)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel$BootstrapRunnable.run(DefaultBootstrapChannel.java:92)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
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:761)
Caused by: java.net.SocketException: Permission denied
at java.net.Socket.createImpl(Socket.java:454)
at java.net.Socket.connect(Socket.java:584)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:136)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:149)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:169)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:124)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:379)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:492)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:470)
at org.kaaproject.kaa.client.transport.AndroidHttpClient.executeHttpRequest(AndroidHttpClient.java:112)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel.processTypes(DefaultBootstrapChannel.java:56)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel.access$200(DefaultBootstrapChannel.java:32)
at org.kaaproject.kaa.client.channel.impl.channels.DefaultBootstrapChannel$BootstrapRunnable.run(DefaultBootstrapChannel.java:92)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
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:761)
03-06 17:10:42.185 2945-2980/org.kaaproject.kaa.demo.testAcc I/DefaultFailoverManager: Server [BOOTSTRAP, -1835393002] failed
03-06 17:10:42.186 2945-2980/org.kaaproject.kaa.demo.testAcc W/DefaultChannelManager: Attempt to connect to the next bootstrap service will be made in 2000 ms, according to failover strategy decision
I have also tried to use the Cell monitor demo, bu I was not receiving anything on MongoDB. Also the source code was missing "kaaManager.start(this);"
After adding this line I got the same error stated above
please help me to solve this issue
Thanks
Joseph
I have solved the issue
1- Open Kaa Sandbox and navigate to
http://>>kaa-sandbox-IP-address<<:9080/sandbox/#management:
Troubleshooting guide
2- Update the Kaa host/IP with the machine host IP address
3- generate the SDK file for the requested platform
4- make sure you are not low disk space

File not found exception while downloading android expansion file

I'm creating a cordova plugin to download expansion files.
Currently, I'm implementing that the expansion files will be downloaded manually.
The request will be send, but I get the error
aborting request for download main.1000004.my.name.app.obb: while writing destination file: java.io.FileNotFoundException: /storage/emulated/0/Android/obb/my.name.app/main.1000004.my.name.app.obb.tmp: open failed: ENOENT (No such file or directory)
02-20 17:12:12.930 15355-15631/my.name.app W/System.err: com.google.android.vending.expansion.downloader.impl.DownloadThread$StopRequest: while writing destination file: java.io.FileNotFoundException: /storage/emulated/0/Android/obb/my.name.app/main.1000004.my.name.app.obb.tmp: open failed: ENOENT (No such file or directory)
W/System.err: at com.google.android.vending.expansion.downloader.impl.DownloadThread.writeDataToDestination(DownloadThread.java:515)
W/System.err: at com.google.android.vending.expansion.downloader.impl.DownloadThread.transferData(DownloadThread.java:350)
W/System.err: at com.google.android.vending.expansion.downloader.impl.DownloadThread.executeDownload(DownloadThread.java:308)
W/System.err: at com.google.android.vending.expansion.downloader.impl.DownloadThread.run(DownloadThread.java:236)
W/System.err: at com.google.android.vending.expansion.downloader.impl.DownloaderService.onHandleIntent(DownloaderService.java:1086)
W/System.err: at com.google.android.vending.expansion.downloader.impl.CustomIntentService$ServiceHandler.handleMessage(CustomIntentService.java:104)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err: at android.os.Looper.loop(Looper.java:148)
W/System.err: at android.os.HandlerThread.run(HandlerThread.java:61)
W/System.err: Caused by: java.io.FileNotFoundException: /storage/emulated/0/Android/obb/my.name.app/main.1000004.my.name.app.obb.tmp: open failed: ENOENT (No such file or directory)
W/System.err: at libcore.io.IoBridge.open(IoBridge.java:452)
W/System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:87)
W/System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:127)
W/System.err: at com.google.android.vending.expansion.downloader.impl.DownloadThread.writeDataToDestination(DownloadThread.java:496)
W/System.err: ... 8 more
W/System.err: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
W/System.err: at libcore.io.Posix.open(Native Method)
W/System.err: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
0W/System.err: at libcore.io.IoBridge.open(IoBridge.java:438)
Actually, my current main expansion version is 1000013. But it searches for 1000004. The content is the same, so it's not the problem.
The rights should be available
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
Any idea why this could happen?
I believe that this is happening because the Google Play Console does not have a correct expansion file associated with your current version code. Make sure that you uploaded and selected a correct expansion file along with your APK in Play Console.
If it doesn't help, check if your external storage can be mounted by calling Helpers.isExternalMediaMounted(). Your device may not have an SD card (emulator?). Additionally, you may want to check if your app has access to the OBB directory by calling Helpers.canWriteOBBFile(Context).
I recommend using the updated Downloader Library included in Better APK Expansion package. It has several issues fixed and also provides simplified API that minimizes chances to shoot yourself in the foot.
If you reach here and didn't find an answer then please try add this to Mainfests <application android:requestLegacyExternalStorage="true" ... >

SSL Error during Facebook Login in Android

I am implementing Facebook Login in my App but its not working on Api 2.3.6
I have tested the App in Emulator and its working Fine upto Api 23
Also it's working in Device with API 21 but not in 2.3.6
The Error is related to SSL
Bcoz I have read in an SO answer that,
in Api level 2.3.6 all connections and authorizations are handled by HTTPS only
while in Api levels above 2.3.6 its not the HTTPS that does every task
Also I have noticed that whenever I am trying to call any URL starting
with HTTPS it's not giving the final result but gets silently stopped as was the case
with Googles Direction Api.
Below is the StackTrace I am getting in 2.3.6 :
V/webkit: LoadListener.handleSslErrorRequest():
url:https://m.facebook.com/v2.4/dialog/oauth?
return_scopes=true&response_type=token%2Csigned_request&redirect_uri
=fbconnect%3A%2F%2Fsuccess&display=touch&sdk=android-
4.5.1&e2e=%7B%22init%22%1232%7D&client_id=1234&default_audience=friends
primary error: 3 certificate: Issued to: CN=*.facebook.com,O=Facebook\,
Inc.,L=Menlo Park,ST=CA,C=US;
Issued by: 1.2.840.113549.1.9.1=#1223,CN=Cyberoam SSL
CA_C016700030,OU=Cyberoam Certificate
Authority,O=Elitecore,L=Ahmedabad,ST=Gujarat,C=IN;
I/System.out: close [socket][/0.0.0.0:52994]
I/webkit/webview: WebView.stopLoading()
D/webkit/webview: WebView.stopLoading(): webcorethread is initialized
I/webkit/webview: WebView.stopLoading()
D/webkit/webview: WebView.stopLoading(): webcorethread is initialized
W/System.err: at
com.facebook.login.LoginManager.onActivityResult(LoginManager.java:173)
W/System.err: at
com.facebook.login.LoginManager$1.onActivityResult(LoginManager.java:139)
W/System.err: at
com.facebook.internal.CallbackManagerImpl.onActivityResult
(CallbackManagerImpl.java:82)
W/System.err: at
com.hogo.integrationapp.FirstActivity.onActivityResult
(FirstActivity.java:179)
W/System.err: at
android.app.Activity.dispatchActivityResult(Activity.java:3975)
W/System.err: at
android.app.ActivityThread.deliverResults(ActivityThread.java:2629)
W/System.err: at
android.app.ActivityThread.handleSendResult(ActivityThread.java:2675)
W/System.err: at
android.app.ActivityThread.access$2000(ActivityThread.java:156)
W/System.err: at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1030)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:130)
W/System.err: at android.os.Looper.loop(SourceFile:351)
W/System.err: at
android.app.ActivityThread.main(ActivityThread.java:3821)
W/System.err: at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err: at java.lang.reflect.Method.invoke(Method.java:538)
W/System.err: at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run\
(ZygoteInit.java:969)
W/System.err: at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:727)
W/System.err: at dalvik.system.NativeStart.main(Native Method)
Is there any Easy way to solve it ?
Also I want to understand why this is happening ?
I am using Facebook Sdk 4.5.1
For API 4.4.2 :
The Error was due to a File Transfer App open in my Device, when i closed it the error was gone
Thanks in Advance...

Categories

Resources