sqlOpenDatabase is not defined

I have a project using Appstudio version 8.5.8.2 and the Voltbuilder build apk is working fine uptill now. I have a small modification in the code and rebuild with version 9.0.4.3. It show code.js error “Uncaught ReferenceError: SqlOpenDatabase is not defined.”.

Can I downgrade to 8.5.8.2 and rebuild? Or any other easy way to make it work to build the apk for Android?

I just changed to DB = SqlOpenDatabase(“localStorage”) and tick the “SQLite (WASM)”, then rebuild the Native App with Voltbuilder to apk with 9.0.4.3. It work now in Android device.

But when I “deploy to local folder” and run in Chrome, it show “sqliteFunctions.js” error. “Uncaught TypeError: window.openDatabase is not a function.” Any solution?

Deploy to local folder doesn’t work for SQLite right now - I’ll see if that can be fixed.

Start in Desktop Browser should work, as well as deploying to a website.

(PS. You were right to switch to AppStudio 9. With the latest changes Google made to Chrome, SQlite is no longer supported by earlier versions of AppStudio)

Is it no way to build the web app that can work with Chrome latest version now? If my customer still using the old version of Chrome, and the web app that I build using 8.5 (deploy to local folder) still work. Can I build using 9.0.4 (deploy to local folder) and it will work for my customer too?

Can you tell me more about what you are trying to accomplish?

There is no problem making web apps for the latest version of Chrome. Yes, Chrome has dropped support for WebSQL, but AppStudio has a workaround:

https://wiki.appstudio.dev/Using_SQLite_with_Chrome_119

I have an old project build (deploy to local folder) using version 8.5 and it is working fine with the mobile device to open it with old version of Chrome as web app. When I changed to version 9.0.4, I changed the SqlOpenDatabase(“localStorage”) and enabled the SQLite (WASM), then using the Voltbuilder to build the apk, it work fine too in the mobile device as native app. I try to use build (deploy to local folder) with version 9.0.4 and open with the mobile device to open it with latest version of Chrome as web app, it said “Uncaught TypeError: window.openDatabase is not a function. line 165 column 16”.

Or did I missed some steps to make it work?

I think I mentioned a few messages back that SQLite (WASM) is not supported on deploy to local folder. We are working on that.

I’m not sure I understand this sentence: “I have an old project build (deploy to local folder) using version 8.5 and it is working fine with the mobile device to open it with old version of Chrome as web app.”

If you have deployed to a local folder, how are you opening it with a mobile device?

After build (deploy to local folder), I copied them to the web. My customer using Android mobile device to open this web app. They keep to use the old version of Chrome (without upgrade) in the Android mobile device.

I think I understand what you are doing.

But why not set up the information about your remote server in AppStudio Preferences, and let AppStudio deploy directly to the web? That would cut out a step (and probably fix your issue).

https://wiki.appstudio.dev/Preferences