Webview Database Error - android

I have the following problem.
I implemented a Webview in my Android App, the Webview should load a HTML File that uses JavaScript. This is the code:
WebView webView = (WebView) findViewById(R.id.webview);
webView.clearCache(true);
webView.setWebViewClient(new WebViewClient() {
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
System.out.println(errorCode);
}
});
System.out.println(getFilesDir());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
webView.getSettings().setAllowUniversalAccessFromFileURLs(true);
webView.getSettings().setJavaScriptEnabled(true);
if (Build.VERSION.SDK_INT < 18) {
webView.clearView();
} else {
webView.loadUrl("about:blank");
}
webView.loadDataWithBaseURL("file://"+getFilesDir()+File.separator+"0", line, "text/html", "UTF-8", null);
First everythings works fine, but if the WebView run for a view Hours, i will get the following Error and the app get terminated shortly after it:
I/SqliteDatabaseCpp: sqlite returned: error code = 14, msg = cannot open file at line 27862 of [ed759d5a9e], db=/data/data/com.example.rebmann.prozessueberwachungkonfignr2/databases/webview.db
I/SqliteDatabaseCpp: sqlite returned: error code = 14, msg = os_unix.c: open() at line 27862 - "" errno=2 path=/NotificationPermissions.db, db=/data/data/com.example.rebmann.prozessueberwachungkonfignr2/databases/webview.db
D/OpenGLRenderer: Flushing caches (mode 1)
D/OpenGLRenderer: Flushing caches (mode 0)
D/dalvikvm: GC_CONCURRENT freed 380K, 14% free 7767K/8967K, paused 5ms+2ms
Application terminated.
For that reason i trying to use the onReceivedError method to catch that Error, but the method never gets called. (I know it's the old version of the method, but since I use a old Version of Android on my Phone that's fine).
Does anyone have any idea why i get this Error and how i can handle it.
EDIT:
I upgraded my Android to the newest supported version (4.1.2) and now i'm getting a more detailed error log, maybe that helps:
E/SQLiteLog: (14) cannot open file at line 30241 of [00bb9c9ce4]
E/SQLiteLog: (14) os_unix.c:30241: (2) open(/FileSyetmQuota.db) -
D/WebKit: ERROR:
D/WebKit: SQLite database failed to load from /FileSyetmQuota.db
Cause - unable to open database file
D/WebKit: external/webkit/Source/WebCore/platform/sql/SQLiteDatabase.cpp(71) : bool WebCore::SQLiteDatabase::open(const WTF::String&, bool)
E/SQLiteLog: (14) cannot open file at line 30241 of [00bb9c9ce4]
E/SQLiteLog: (14) os_unix.c:30241: (2) open(/NotificationPermissions.db) -
D/WebKit: ERROR:
D/WebKit: SQLite database failed to load from /NotificationPermissions.db
Cause - unable to open database file
D/WebKit: external/webkit/Source/WebCore/platform/sql/SQLiteDatabase.cpp(71) : bool WebCore::SQLiteDatabase::open(const WTF::String&, bool)

Related

Cannot connect to mobilefirst adapter from device

Migrated our application from 6.2 to 7.0, the mobile web app works great on the phone as well as manually calling the HTTP js adapters. However when exported the apk to a phone, the application starts up but when invoking an adapter for data a 403 error is returned:
{"status":403,"invocationContext":null}
and the only server log:
"POST /SFMobileStudent/authorization/v1/clients/instance HTTP/1.1" 403 64 "-" "WLNativeAPI(bullhead; MMB29Q; Nexus 5X; SDK 23; Android 6.0.1)"
The adapter is doesn't have any security on it either
securityTest="wl_unprotected"
Not sure what we are missing, is there added/required security for 7.0?
Not a whole lot there but you can see the traffic from the device (comcast) to the server. I don't know what any of it means, just sort of repeats. tcpdump packet capture:
removed
LogCat
I/chromium(29279): [INFO:CONSOLE(1082)] "processMessage failed: Message: F09 WLAuthorizationManagerPlugin170261306 {"wlFailureStatus":"UNEXPECTED_ERROR","status":403,"responseText":"\n\n403 Forbidden</title>\n</head>\nForbidden</h1>\nYou don't have permission to access /SFMobileStudent/authorization/v1/clients/instance\non this server.</p>\n\nIBM_HTTP_Server at mobilet.sfcollege.edu Port 443</address>\n</body></html>\n","statusText":"Unexpected errorCode occurred. Please try again."}", source: file:///android_asset/www/default/worklight/cordova.js (1082)
More logCat
W/PluginManager(11209): THREAD WARNING: exec() call to WLAuthorizationManagerPlugin.getClientInstanceIdHeader blocked the main thread for 170ms. Plugin should use CordovaInterface.getThreadPool().
D/dalvikvm(11035): GC_EXPLICIT freed 153K, 39% free 8875K/14500K, paused 2ms+3ms, total 49ms
I/ConvCursor(11035): ConversationCursor caching complete pos=18
E/ThermalDaemon( 356): set temp 65000 to name /sys/class/hwmon/hwmon0/device/temp1_max
E/ThermalDaemon( 356): set temp -128000 to name /sys/class/hwmon/hwmon0/device/temp1_max_hyst
D/dalvikvm(11209): Trying to load lib /data/app-lib/com.SFStudent-1/libauthjni.so 0x41d12ef8
D/dalvikvm(11209): Shared lib '/data/app-lib/com.SFStudent-1/libauthjni.so' already loaded in same CL 0x41d12ef8
D/WifiStateMachine( 917): handleMessage: E msg.what=151572
D/WifiStateMachine( 917): processMsg: ConnectedState
D/WifiStateMachine( 917): processMsg: L2ConnectedState
D/WifiStateMachine( 917): handleMessage: X
D/WifiWatchdogStateMachine( 917): Fetch RSSI succeed, rssi=-68 mrssi=-68 txbad=245 txgood=47234
D/WifiWatchdogStateMachine( 917): Incremental loss=0/6 Current loss=0% volume=10.06
D/WifiWatchdogStateMachine( 917): Cache updated: loss[-68]=0% volume=27.82
D/dalvikvm(11209): GC_CONCURRENT freed 2032K, 45% free 8070K/14500K, paused 4ms+2ms, total 57ms
D/dalvikvm(11209): WAIT_FOR_CONCURRENT_GC blocked 8ms
W/PluginManager(11209): THREAD WARNING: exec() call to WLAuthorizationManagerPlugin.deleteAllAuthData blocked the main thread for 27ms. Plugin should use CordovaInterface.getThreadPool().
W/PluginManager(11209): THREAD WARNING: exec() call to WLAuthorizationManagerPlugin.getClientInstanceIdHeader blocked the main thread for 97ms. Plugin should use CordovaInterface.getThreadPool().
D/dalvikvm(11209): Trying to load lib /data/app-lib/com.SFStudent-1/libauthjni.so 0x41d12ef8
D/dalvikvm(11209): Shared lib '/data/app-lib/com.SFStudent-1/libauthjni.so' already loaded in same CL 0x41d12ef8
E/NONE (11209): [/apps/services/api/SFStudent/android/query] failure. state: 403, response: undefined
I/chromium(11209): [INFO:CONSOLE(301)] "Error in Error callbackId: WLAuthorizationManagerPlugin1867260175 : ReferenceError: deferred is not defined", source: file:///android_asset/www/default/worklight/cordova.js (301)
I/chromium(11209): [INFO:CONSOLE(1080)] "processMessage failed: Error: ReferenceError: deferred is not defined", source: file:///android_asset/www/default/worklight/cordova.js (1080)
I/chromium(11209): [INFO:CONSOLE(1081)] "processMessage failed: Stack: ReferenceError: deferred is not defined
I/chromium(11209): at Object.InitializeService.WL.Client.invokeProcedure.onFailure (eval at (file:///android_asset/www/default/js/libs/jquery/jquery-min.js:4:14070), :15:8)
I/chromium(11209): at Object.options.onFailure (file:///android_asset/www/default/worklight/worklight.js:8806:29)
I/chromium(11209): at Object.onInvokeProcedureFailure [as onFailure] (file:///android_asset/www/default/worklight/worklight.js:8718:14)
I/chromium(11209): at klass.window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.onFailure (file:///android_asset/www/default/worklight/worklight.js:3651:26)
I/chromium(11209): at klass.window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.onWlFailure (file:///android_asset/www/default/worklight/worklight.js:3600:12)
I/chromium(11209): at Object. (file:///android_asset/www/default/worklight/worklight.js:3440:27)
I/chromium(11209): at Object. (file:///android_asset/www/default/worklight/wljq.js:1202:33)
I/chromium(11209): at fire (file:///android_asset/www/default/worklight/wljq.js:1047:30)
I/chromium(11209): at Object.self.fireWith [as rejectWith] (file:///android_asset/www/default/worklight/wljq.js:1158:7)
I/chromium(11209): at Object.deferred.(anonymous function) [as reject] (file:///android_asset/www/default/worklight/wljq.js:1247:34)", source: file:///android_asset/www/default/worklight/cordova.js (1081)
I/chromium(11209): [INFO:CONSOLE(1082)] "processMessage failed: Message: F09 WLAuthorizationManagerPlugin1867260175 {"wlFailureStatus":"UNEXPECTED_ERROR","status":403,"responseText":"/*-secure-\n{\"reason\":\"App authenticity security check failed\"}*/","statusText":"Unexpected errorCode occurred. Please try again."}", source: file:///android_asset/www/default/worklight/cordova.js (1082)
Resolved. There is a new tag within the application-descriptor:
directUpdateAuthenticityPublicKey
Updated, exported the application with the keystore and all now works. Thanks for the help.
The issue:
http://www-01.ibm.com/support/docview.wss?uid=swg21970348

Issue libperfservice hotplug/cmd couldn't be open

I'm new on eclipse and android and I want for my first app do a wifi connection between the smartphone and an ip camera, unfortunately my app crash if when I want to see the stream of the camera.
My logcat said that:
03-06 18:11:26.879: E/(680): Could not open '/data/data/hotplug/cmd'<br/>
03-06 18:11:26.879: E/(680): error : 2, No such file or directory
[Edit k3b 2017-08-09]
I have the same issue on my andriod-4.4 my logcat contain this
08-09 20:38:40.436 1883-2035/? I/libPerfService: 1: set: 1
[ 08-09 20:38:40.436 1883:0x7f3 E/ ]
Could not open '/data/data/hotplug/cmd'
[ 08-09 20:38:40.436 1883:0x7f3 E/ ]
error : 2, No such file or directory
googleing "libPerfService" for found androidStudio log doesn't work
11-02 02:29:48.792 1014-1231/? I/libPerfService: 1: set freq: 1950000
11-02 02:29:48.792 1014-1231/? I/libPerfService: 1: set: 4
found https://census.tsyrklevich.net/file_permissions//system/lib/libperfservice.so with no description
Does anybody know where libPerfService comes from? is this a maleware waiting for command? I have not found any defintion for it.

Interstitial Ad not getting loaded in device (using google play services)

Did anyone face similar error?
Getting Error: SQLiteLog: (14) cannot open file at line 30241 of [00bb9c9ce4]
SQLiteLog: (14) os_unix.c:30241: (2) open(/NotificationPermissions.db) -
Followed all steps as per below link:
https://developers.google.com/mobile-ads-sdk/docs/admob/advanced
Please see log below:
06-01 16:11:43.613: E/GooglePlayServicesUtil(19506): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
06-01 16:11:43.643: D/LOG_TAG(19506): Interstitial ad was not ready to be shown.
06-01 16:11:43.673: D/dalvikvm(19506): GC_CONCURRENT freed 730K, 16% free 12073K/14279K, paused 6ms+6ms, total 63ms
06-01 16:11:43.724: I/brcm-gr(19506): [gralloc_lock]: new usage 0x933
06-01 16:11:43.764: E/GooglePlayServicesUtil(19506): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
06-01 16:11:43.774: E/GooglePlayServicesUtil(19506): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
06-01 16:11:43.804: D/MainGamePanel(19506): Surface is being destroyed
06-01 16:11:43.804: D/Surface Destroyed(19506): Thread was shut down cleanly
06-01 16:11:43.804: W/SurfaceView(19506): CHECK surface infomation creating=false formatChanged=false sizeChanged=false visible=false visibleChanged=true surfaceChanged=true realSizeChanged=false redrawNeeded=true left=false top=false
06-01 16:11:43.814: W/SurfaceView(19506): CHECK surface infomation creating=false formatChanged=false sizeChanged=false visible=false visibleChanged=false surfaceChanged=false realSizeChanged=false redrawNeeded=false left=false top=false
06-01 16:11:43.824: E/SpannableStringBuilder(19506): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-01 16:11:43.824: E/SpannableStringBuilder(19506): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-01 16:11:43.844: W/SurfaceView(19506): CHECK surface infomation creating=false formatChanged=false sizeChanged=false visible=false visibleChanged=false surfaceChanged=false realSizeChanged=false redrawNeeded=false left=false top=false
06-01 16:12:07.036: W/Ads(19506): Timed out waiting for ad response.
06-01 16:12:07.036: W/Ads(19506): Timed out waiting for ad response.
06-01 16:12:07.086: E/SQLiteLog(19506): (14) cannot open file at line 30241 of [00bb9c9ce4]
06-01 16:12:07.086: E/SQLiteLog(19506): (14) os_unix.c:30241: (2) open(/NotificationPermissions.db) -
06-01 16:12:07.086: D/WebKit(19506): ERROR:
06-01 16:12:07.086: D/WebKit(19506): SQLite database failed to load from /NotificationPermissions.db
06-01 16:12:07.086: D/WebKit(19506): Cause - unable to open database file
06-01 16:12:07.086: D/WebKit(19506): external/webkit/Source/WebCore/platform/sql/SQLiteDatabase.cpp(71) : bool WebCore::SQLiteDatabase::open(const WTF::String&, bool)
06-01 16:12:07.096: E/SQLiteLog(19506): (14) cannot open file at line 30241 of [00bb9c9ce4]
06-01 16:12:07.096: E/SQLiteLog(19506): (14) os_unix.c:30241: (2) open(/NotificationPermissions.db) -
06-01 16:12:07.096: D/WebKit(19506): ERROR:
06-01 16:12:07.096: D/WebKit(19506): SQLite database failed to load from /NotificationPermissions.db
06-01 16:12:07.096: D/WebKit(19506): Cause - unable to open database file
06-01 16:12:07.106: D/WebKit(19506): external/webkit/Source/WebCore/platform/sql/SQLiteDatabase.cpp(71) : bool WebCore::SQLiteDatabase::open(const WTF::String&, bool)
06-01 16:12:07.106: W/Ads(19506): Failed to load ad: 2
06-01 16:12:07.106: W/Ads(19506): Failed to load ad: 2

Sqlite: cannot open file at line

This error happened occasionally when I did some user/stress test on Android. Files under /data disapppeared and system server crashed after this error occurred. I am curious about the name of database "contacts2.db-mj7742599A4". Normally it should be contacts2.db. What does "*.db-mj7742599A4" mean? Anyone can help please?
02-28 19:21:43.161 660 695 E SQLiteLog: (14) cannot open file at line 30174 of [00bb9c9ce4]
02-28 19:21:43.169 660 695 E SQLiteLog: (14) os_unix.c:30174: (2) open(/data/data/com.android.providers.contacts/databases/contacts2.db-mj7742599A4) -
02-28 19:21:43.520 397 409 I am_crash: [660,android.process.acore,572933,android.database.sqlite.SQLiteCantOpenDatabaseException,unable to open database file (code 14),SQLiteConnection.java,-2]
02-28 19:21:43.536 397 5671 I am_crash: [397,system_server,-1,java.lang.IllegalArgumentException,NULL,StatFs.java,-2]

phonegap sqlitelog error

I'm trying to execute my android application using phonegap but I'm having the following error when I execute a plugin that i created:
15:33:12.912: E/SQLiteLog(2249): (14) cannot open file at line
30174 of [00bb9c9ce4] 10-31 15:33:12.912: E/SQLiteLog(2249): (14)
os_unix.c:30174: (2) open(/CachedGeoposition.db) - 10-31
15:33:12.912: D/WebKit(2249): ERROR: 10-31 15:33:12.921:
D/WebKit(2249): SQLite database failed to load from
/CachedGeoposition.db 10-31 15:33:12.921: D/WebKit(2249): Cause -
unable to open database file 10-31 15:33:12.921: D/WebKit(2249):
external/webkit/Source/WebCore/platform/sql/SQLiteDatabase.cpp(71) :
bool WebCore::SQLiteDatabase::open(const WTF::String&, bool)
By the way, I'm not using a sqlite database

Categories

Resources