I have a button which when pressed opens twitter login page in a webview (as an activity). i'm using twitter4j version 2.2.6. the problem is this- when i click on the emulator or my samsung glaxy 2 it works perfectly witout any bugs, but when i click the button on my samsung galaxy 3 GT-I9300 (and my friends same phone) i get the following exception:
android.database.sqlite.SQLiteException: no such table: password: , while compiling: SELECT username, password FROM password WHERE (host == ?) at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method) at android.database.sqlite.SQLiteCompiledSql.(SQLiteCompiledSql.java:68) at android.database.sqlite.SQLiteProgram.compileSql(SQLiteProgram.java:143) at android.database.sqlite.SQLiteProgram.compileAndbindAllArgs(SQLiteProgram.java:361) at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:127) at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:94) at android.database.sqlite.SQLiteQuery.(SQLiteQuery.java:53) at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:47) at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1684) at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1569) at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1525) at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1605) at android.webkit.WebViewDatabase.getUsernamePassword(WebViewDatabase.java:990) at android.webkit.BrowserFrame.handleMessage(BrowserFrame.java:589) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:950) at java.lang.Thread.run(Thread.java:856)
the webview is an activity (extends Activity) i have plenty of free space at the point of crash:
total- 12187213824 free- 4315947008
my configuration at the crash:
FlipFont=0
compatScreenHeightDp=546
compatScreenWidthDp=320
compatSmallestScreenWidthDp=320
fontScale=0.93
hardKeyboardHidden=HARDKEYBOARDHIDDEN_YES
keyboard=KEYBOARD_NOKEYS
keyboardHidden=KEYBOARDHIDDEN_NO
locale=en_US
mcc=425
mnc=1
navigation=NAVIGATION_NONAV
navigationHidden=NAVIGATIONHIDDEN_YES
orientation=ORIENTATION_PORTRAIT
screenHeightDp=615
screenLayout=SCREENLAYOUT_SIZE_NORMAL+SCREENLAYOUT_LONG_YES
screenWidthDp=360
seq=46
smallestScreenWidthDp=360
textLayoutDirection=0
touchscreen=TOUCHSCREEN_FINGER
uiMode=UI_MODE_TYPE_NORMAL+UI_MODE_NIGHT_NO
userSetLocale=false
device features:
android.hardware.wifi
android.hardware.location.network
android.hardware.nfc
android.hardware.location
android.hardware.sensor.gyroscope
android.hardware.screen.landscape
android.hardware.screen.portrait
android.hardware.wifi.direct
android.hardware.usb.accessory
android.hardware.bluetooth
android.hardware.touchscreen.multitouch.distinct
android.hardware.microphone
android.hardware.sensor.light
android.hardware.camera.autofocus
android.software.live_wallpaper
android.hardware.camera.flash
android.hardware.telephony
android.software.sip
android.hardware.touchscreen.multitouch.jazzhand
android.hardware.sensor.barometer
android.hardware.usb.host
android.hardware.touchscreen.multitouch
android.hardware.sensor.compass
android.hardware.faketouch
android.hardware.camera
com.sec.feature.minimode
android.software.sip.voip
android.hardware.sensor.proximity
android.hardware.location.gps
android.hardware.telephony.gsm
android.hardware.camera.front
com.nxp.mifare
android.hardware.touchscreen
android.hardware.sensor.accelerometer
glEsVersion = 2.0
ENVIRONMENT:
getAndroidSecureContainerDirectory=/mnt/asec
getCloudStorageDirectory=/mnt/sdcard/cloud
getCloudStorageDirectoryPath=/mnt/sdcard/cloud
getDataDirectory=/data
getDownloadCacheDirectory=/cache
getExternalStorageAndroidDataDir=/mnt/sdcard/Android/data
getExternalStorageDirectory=/mnt/sdcard
getExternalStorageDirectoryUsbHost=/mnt/sdcard/Storages/usb
getExternalStorageState=mounted
getRootDirectory=/system
getSecureDataDirectory=/data
getSystemSecureDirectory=/data/system
isEncryptedFilesystemEnabled=false
isExternalStorageEmulated=true
isExternalStorageRemovable=false
Permissions:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.GET_TASKS"/>
In the webview i didnt made any sqllite transaction or nothing involved.
see my answer about this line ↑
I'm not a root user (meaning i have the write rights)
the code involving the webview is:
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
try{
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.twitter);
mIntent = getIntent();
String url = (String)mIntent.getExtras().get("URL");
WebView webView = (WebView) findViewById(R.id.webview);
WebSettings settings = webView.getSettings();
settings.setDatabaseEnabled(true);
settings.setDatabasePath("/data/data/"+getPackageName()+"/databases");
settings.setDomStorageEnabled(true);
settings.setJavaScriptEnabled(true);
settings.setAllowFileAccess(true);
settings.setSaveFormData(true);
settings.setSavePassword(true);
webView.setWebViewClient( new WebViewClient()
{
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
...
return false;
}
});
webView.loadUrl(url);
}catch(Exception e){
e.printStackTrace();
}
}
public void onExceededDatabaseQuota(String url, String
databaseIdentifier, long currentQuota, long estimatedSize, long
totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater) {
quotaUpdater.updateQuota(204801);
}
I've found this links that has some similarity:
- SQLiteException: no such table only on Motorola Plus?
- Android WebView throws SQLiteException
- SQLiteException - only happens on some devices
- http://www.anddev.org/networking-database-problems-f29/missing-table-in-sqlite-with-specific-version-of-desire-hd-t50364.html
I've looked on too many threads for a long week and i'm pretty frustrated about it
does anyone have any ideas? thanks