"unable to open database file" after OS upgrade

by Mariano Kamp » Sat, 10 Apr 2010 00:36:27 GMT


Sponsored Links
 *bump*





--



"unable to open database file" after OS upgrade

by Mariano Kamp » Sat, 10 Apr 2010 02:30:20 GMT


  haven't been able to reproduce it on my own phones. Also the users that
reported it told me that this happens to other apps on their phones too. At
least the other apps force close, whatever the actual reason is.

I could ask the people with custom ROMs to check if the db-file is still
there.

So you never had this issue with one of your apps?

On Fri, Apr 9, 2010 at 6:39 PM, Mark Murphy <mmur...@commonsware.com> wrote:

> >


Sponsored Links


"unable to open database file" after OS upgrade

by Mariano Kamp » Sat, 10 Apr 2010 02:46:59 GMT


 >



That's a good idea, but it will take some time to deploy. As I haven't
gotten any other feedback I will still do that then.



No, me neither.

--



"unable to open database file" after OS upgrade

by Walter » Sat, 10 Apr 2010 13:25:30 GMT


 Some users of my apps also reported same issue, also same exception in
the log.

What you can do is:

Uninstall your app, power off, power on. if that doesn't work and the
phone is rooted,  ask the user to clean the app cache, and not install
app on SDCard.

That resolved all these kind of open database and file corruption
issues.

Walter







--



"unable to open database file" after OS upgrade

by Mariano Kamp » Sat, 10 Apr 2010 15:10:48 GMT


 Yes, that worked for me too. Actually re-installing the apps on the users'
phones alone was enough.

But this is just dealing with the symptoms and would've liked to know why
the OS updates break apps and if there are any counter measures the
developer can do?

And also meanwhile I got more than 50 of those issues (for a 65.000 active
installs app) and it really takes away from my time to work on my app.

As it seems that the Android OS developers don't chimp with enlightenment in
here I will automate the workaround then and let the user know that this
issue was caused by the OS updated and he should re-install my app and
potentially others.







>



"unable to open database file" after OS upgrade

by Mariano Kamp » Tue, 13 Apr 2010 00:36:02 GMT


 Now a user was nice enough to run some commands for me. It seems that the
database is there and is not corrupt:

# ls -l /data/data/com.newsrob/databases
ls -l /data/data/com.newsrob/databases

-rw-rw---- app_108  app_108     16384 2010-04-11 13:12 webview.db
-rw-rw---- app_108  app_108      6144 2010-04-11 13:12 webviewCache.db
-rw-rw---- app_108  app_108    277504 2010-04-11 16:38 newsrob.db

And with sqlite3 from the command line:

select count(*) from entries;
51

On Sat, Apr 10, 2010 at 9:10 AM, Mariano Kamp <mariano.k...@gmail.com>



Yes, that worked for me too. Actually re-installing the apps on the users'
phones alone was enough.

But this is just dealing with the symptoms and would've liked to know why
the OS updates break apps and if there are any counter measures the
developer can do?

And also meanwhile I got more than 50 of those issues (for a 65.000 active
installs app) and it really takes away from my time to work on my app.

As it seems that the Android OS developers don't chimp with enlightenment in
here I will automate the workaround then and let the user know that this
issue was caused by the OS updated and he should re-install my app and
potentially others.

On Sat, Apr 10, 2010 at 7:25 AM, Walter <androidremotecont...@gmail.com>



Some users of my apps also reported same issue, also same exception in
the log.

What you can do is:

Uninstall your app, power off, power on. if that doesn't work and the
phone is rooted,  ask the user to clean the app cache, and not install
app on SDCard.

That resolved all these kind of open database and file corruption
issues.

Walter





still

--



"unable to open database file" after OS upgrade

by skink » Tue, 13 Apr 2010 01:46:15 GMT


 



i had similar problem too, i solved it by adding flag
SQLiteDatabase.NO_LOCALIZED_COLLATORS when calling
SQLiteDatabase.openDatabase

hth
pskink

--



"unable to open database file" after OS upgrade

by Mariano Kamp » Tue, 13 Apr 2010 04:39:23 GMT


 Skink,

awesome. That sounds fantastic. I will try that.

Cheers,
Mariano






>



"unable to open database file" after OS upgrade

by Mariano Kamp » Thu, 15 Apr 2010 01:25:19 GMT


 I had a look into it and this approach doesn't work for me.

When using the SQLiteOpenHelper you cannot pass in this flag.

I tried to work around the SQLiteOpenHelper first, but then it delegates to
the context, which itself uses private API and now have to copy/patch at
least four classes. I also found a reference to private API (FileUtils) that
uses some obscure modes that I don't want to touch as I don't really
understand them.
I fear to take a problem that a couple of hundred users of my app have to a
problem that will affect every user ;)

But thanks for your hint anyway.








>>



"unable to open database file" after OS upgrade

by Emmanuel » Wed, 28 Apr 2010 08:01:43 GMT


 ello all,

I had the same issue recently, and after the reading of this thread, I
try this thing :

public class SQLHelper extends SQLiteOpenHelper
{
private File m_DBFile;
public SQLHelper(Context context, String name) {
super(context, name, null, 1);
m_DBFile = context.getDatabasePath( name );
}

public void onCreate(SQLiteDatabase db)
{

// My stuff here :
CreateTableWithDefaultValues(db);
}

@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int
newVersion)
{
return;
}
public synchronized SQLiteDatabase getWritableDatabase ()
{
SQLiteDatabase db;
if ( m_DBFile.exists() )
db = SQLiteDatabase.openDatabase(
m_DBFile.toString(), null,
SQLiteDatabase.NO_LOCALIZED_COLLATORS );
else
db = super.getWritableDatabase();
return db;
}
}

Actually, it runs OK on the emulator, so I hope it doesn't bring any
more issues, ... And that it solves the first crash !

Does it seem reasonable ?

Emmanuel / Alocaly
http://androidblogger.blogspot.com/
http://www.alocaly.com/

On Apr 14, 7:24pm, Mariano Kamp <mariano.k...@gmail.com> wrote:
> >>



"unable to open database file" after OS upgrade

by Yurii Vasylenko » Fri, 30 Apr 2010 13:41:44 GMT


 Actually, on Samsung GT-I5700 with Android 2.1 I've got this with
version of NewsRom, installed from Market. Older version 3.7.2, which
i used on Android 1.5 with the same device, still works perfect on 2.1




--



"unable to open database file" after OS upgrade

by Emmanuel » Mon, 03 May 2010 07:01:01 GMT


 ello all,

Just to let you know, I included this code in my version of my games
'Word Prospector' and 'Chasseur de mots', and I don't have any more
bug report with this issue !

Emmanuel
http://androidblogger.blogspot.com/
http://www.alocaly.com/



On Apr 28, 2:01am, Emmanuel <emmanuel.ast...@gmail.com> wrote:
> > >>



"unable to open database file" after OS upgrade

by Wizard » Tue, 18 May 2010 21:31:50 GMT


  am having the same problem, the difference is that I never open any
database.
My app users keep say "Force Close", and finally I got this log:

android.database.sqlite.SQLiteException: unable to open database file
at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)

The app never open any database itself. Somehow the OS open something
but failed.
I did has a webview.
Any suggestion what to do?

Thanks a lot,

On May 2, 7:00pm, Emmanuel <emmanuel.ast...@gmail.com> wrote:
> > > >>



"unable to open database file" after OS upgrade

by Emmanuel » Mon, 24 May 2010 19:58:05 GMT


 adly, I was over optimistic.

The bug occurred again.

If someone know for real how to get rid of it, it would be nice !!

Emmanuel
http://androidblogger.blogspot.com/
http://www.alocaly.com/

On May 3, 1:00am, Emmanuel <emmanuel.ast...@gmail.com> wrote:
> > > >>



Other Threads

1. fragmentation



It's really good to hear the Android team is currently working on
fixing that fragmentation problem they seem to think doesn't exist:

http://www.engadget.com/2010/03/29/exclusive-android-froyo-to-take-a-serious-shot-at-stemming-plat/


-- 
Greg Donald
destiney.com | gregdonald.com

-- 

2. left scrollbar

hello,
I'm working on adding rabic support to android.
when dealing with layouts, I have to change the position of scrollbars from
right to left,
the same thing for spinners and checkboxes.
where to modify in the android source code.
Please help.

-- 

3. Playing a audio stream not working using MediaPlayer

4. Changing the style attribute of a button according to its state

5. android 1.5: How do we use the AudioTrack class?

6. Ant Debug

7. email crashed