What can cause an android database to be recreated? - java

Over the last couple of years, I have been creating an app for a customer (also the reason that I unfortunately cannot share the code on here). The last version uploaded to the play store was targeted at API 25, and was published around July 2017.
I am currently testing a new update, and am finding that opening the database via the SQLiteOpenDatabase is causing the onCreate function to run. The data from the previous version of the app gets lost. I have installed the previous version of the app both via the play store and manually, but the upgrade is always performed directly from the new versions APK.
Data stored on intermediate development versions of the app doesn't get lost, but they all erase data from the currently released version.
The classes for managing the database haven't changed, and are using the same version code for the database. I have checked the certificates, and all versions have been signed with the same one.
Is anyone aware of other reasons that the database may be recreated? This is a serious issue, that is preventing the release of the application.

Related

GAE Deployment error (Need to deploy my app multiple times to work )

Just recently my GAE app stopped working and it cannot connect to cloud storage and a couple of more issues. I am using GAE and Spring Boot Rest Api.
When I deploy the app on the same version multiple times, one of them randomly works. It is just crazy.
Anytime it does not work, I get different errors like:
java.lang.NoClassDefFoundError: io/jsonwebtoken/io/SerializationException
Sometime I get another error:
NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;J)V
If I deploy the app multiple times using IntelliJ, magically, I do not get any error for one of the deployments. Is something going on with GAE deployment?
I have used the latest version of BOM to prevent any conflicts in my Maven libraries, and still no luck. It just happened out of blue last week without even changing the code. The version that I had online, stopped working today and I had to deploy the app multiple times until one of them worked.
The app works perfectly on my local machine.
Anyone who encounters this issue. You need to update your appengine-api-1.0-sdk and google-cloud-storage to its latest version. I used Maven to update and fix the issues.
I also got multiple errors because of using io.jsonwebtoken. The error was:
io.jsonwebtoken.security.weakkeyexception: The verification key's size is 48 bits which is not secure enough for the HS256 algorithm
I changed my JWT to auth0 library, and now it works.
Guess why all these things happened? Because Google updated some of the structure of their GAE and if you do not update your app engine you will get an unlimited number of errors with a perpetual cycle of debugging. I hope Google updates people when they make such huge changes that affect many websites.

'Load Property...' An internal error has occured. java.lang.StackOverfrlowError

I cannot ALTER table in Data Studio for last few days.. Nothing really was updated (I guess it is Eclipse environment error). Any ideas what's going on? Note: it happens when I do right-click on the table then select Alter. But it happens only to that one table. Is it because the table contains CLOB column?
I think you are right, it seems to be an eclipse environment error. Something in the .metadata has gone corrupt. This is most probably leading to a function being called recursively and consequently the StackOverflowError.
It might also be the case that you might have done some unrelated system cleanup during the time Data Studio was not being used. There might be some system file that it needs and now is unable to find.
I would suggest you use the data studio web console to monitor the health of the said database -
http://www.ibm.com/support/knowledgecenter/SS62YD_4.1.0/com.ibm.datatools.db.web.health.doc/topics/introducing.html
If it does not give any valid results, then i am afraid a reinstall is required.
I think, you have missed authorization issues. SYSADM or SYSCTRL authority is not properly set for you. So it causes the issue.
If you ALTER any object from the Data Source Explorer or embedded SQL within an application, you must have ownership of the object and at least one of the following: ALTERIN privilege for the schema or all schemas. So SYSADM or SYSCTRL authority is needed.
Another issue, I want to say you to use updated Data Studio, Version 4.1.1 or more.
because, they give some additional features -
New and Changed Features for the Data Studio, Version 4.1.2
Eclipse SDK Uplift to ensure shell sharing with InfoSphere Data
Architect, Rational Application Developer and Rational Developer for
z/OS
New and Changed Features for the Data Studio, Version 4.1.1
Support for Fix Pack 4 for DB2 for Linux, UNIX and Windows v10.5. This
includes: The latest BLU capabilities, such as the ability to alter
BLU tables by adding columns.
For more, you can study -
Best practices when using Data Studio
What's New and Changed in IBM Data Studio Version 4.1.x

Is the Google Drive web host link feature in danger of being phased out?

I am working on an Android app that stores log on a client's Google Drive. We push static HTML/Javascript files to said Drive in order for the user to be able to read their logs in an user friendly way via their browser. This feature worked relatively well until now (notwithstanding some glitches due to server updates in the last few months).
2 weeks ago (.e. from the beginning of October 2014) we saw that the newer user interface of Google Drive has dropped the web host link capability altogether. For legacy accounts this feature is still there, but not for newer created accounts from the aforementioned date.
Does that mean that Google is planning to ultimately drop this feature, or is it going to be available for the foreseeable future, even if only accessible programmatically via SDK?
Note that we tested to see if programmatic access is affected, and it seems to work fine. We used java SDK function getWebViewLink() (class File) in order to get the link programmatically, and it still works no 1 for now. But the change in UI from Google does worry us that this feature will be dropped, like Dropbox dropped theirs recently. Is that the case? If so, what is the expected timeline of feature deprecation and eventual disappearance?
It looks like they moved/changed it but didn't remove it altogether. The instructions from Google on how to host webpages with Drive worked for me using an account I created after the UI change (after you posted this question).
Since their latest blog post on deprecating APIs does not say anything about getting rid of the web host feature, you are probably fine.
If so, what is the expected timeline of feature deprecation and eventual disappearance?
If the APIs they're deprecating are anything to go by, even if they do get rid of web hosting it will be a couple of years between the time they announce it and it actually being unavailable. It's not a perfect comparison since those are entire APIs and this is just a feature but it doesn't seem like they make a habit of making something unavailable at the drop of a hat.

Domino nvapplet.jar Security Exception

I have a long standing domino application that uses embedded views to display data. This application has been moved from a server 2003, 32 bit, domino 8.5 environment to a new server 2008 R2 64 bit domino 8.5.3 FP6 environment.
I have everything up and working as before with the exception of embedded views. They are giving a SecurityException "Missing required Permissions manifest attribute in main jar: http://*.com/domjava/nvapplet.jar".
I have confirmed that the actionbar.jar, editor.jar, nvapplet.jar, and outline.jar are the current version on the server. I have even replaced them with the version from the IBM download (http://www-01.ibm.com/support/docview.wss?uid=swg21662233).
I can get this to work by displaying the view as HTML instead of Java Applet, but I don't understand what the issue is with the java version?
There were major security changes to Java in relation to applets. You can download the latest applets here.
http://www-01.ibm.com/support/docview.wss?uid=swg21662233
You may need to clear your browser cache if it still persists after that.
[update] The question now mentions that you installed Fixpack 6, installed the Jars then uninstalled Fixpack 6.
When you uninstall a fix pack, it reverts the files it touches back to what they were before the fix pack was installed. Although I have no details on it, it is quite likely that the updated security applets were also added to fix pack 6 (as it's the last fix pack for R8.5.3).
So during the uninstall the applets look the same as FP6 and it reverts them.
To solve this, after the revert you would need to drop in the updated applets again.
If the issue still persists at this point, you need to open the Java Console on your browser and update your question with the logs it generates (as it pertains to the error).
Turns out this situation may have been a little unique, but I will post it here for future reference in case anyone else runs into this. The server was a fresh build of windows and domino all the way up to 8.5.3 FP6. The FP6 installer date stamps the jars in question with the install date of the system. So in my case I had people come to the site, download the jar with a file date newer than 1/17/2014, which is the date of the files IBM put in the fix mentioned above. Those files are a simple flat copy so they always maintain the 1/17/2014 date. Anyway, any user that came and picked up the newer date files 3/1/2014 for example would keep those files or rev date in their local java machine cache and ignore the 1/17/2014 file I had replaced them with, thus they continued to show the problem. Only by manually clearing their cache from the java were they able to pick up the 1/17/2014 file and no longer have the issue.
Actually from what I was told via IBM FP 6, does not include the fixed .jars. That was my main problem assuming it did.

Run SQLite commands on database in one app from another

I have an SQLite database stored in the assets resources of one application used to load UI and other stuff into the app, mainly just holding text nothing out of the ordinary. I want to be able to get a writable version of this database so I can modify it from another application.
Example:
First application is on the market with limited number of enabled features. User gets to a certain point where they need to buy extra content to do more stuff in the app. The original app has these features but they are not enabled in the app using the database. I want the user then to download a second app from the market which is just used to change one field in the database from disabled to enabled thus unlocking the new features.
I have an idea I may need to use content providers but my understanding is once created they are accessible to all applications. I need it, for piracy reasons I guess, to only be able to communicate with apps signed off by my key.
Thanks
Sam,
I understand what you intend to do, but you are going about it the wrong way. Your 'Unlock App' would not be able to modify the Database in the assets folder of your 'Free App'. That's just general android security model stuff.
You may want to look at this question: How can I use the paid version of my app as a "key" to the free version?
It describes how you can create a 'Unlock App' on the market to unlock features of your 'Free app' without needing to actually modify any of the original data in the 'Free App'.
Good luck

Categories