In Android 6.0 (API 23), webview can't load quasar default demo ?
-
In Android logcat, web view told me the following errors:
08-08 19:15:48.611 11163-11163/com.gofirebase.happybirthday I/chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Unexpected token [", source: http://192.168.0.110:8080/js/vendor.10642e46.js (1) 08-08 19:15:48.613 11163-11163/com.gofirebase.happybirthday I/chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Unexpected token )", source: http://192.168.0.110:8080/js/app.ff4b75bb.js (1)
I use this command to build:
quasar build
And I use python3 as the http server:
python -m http.server 8080
In chrome web brower, or Other android app’s webview, this demo runs OK, but in android 6.0, it always fails like this.
By the way, in android 6.0’s webview, It can load
https://quasar.dev/
very well. So I guess this is a bug of my quasar version.
My env is like this:
$ quasar info Operating System - Darwin(19.6.0) - darwin/x64 NodeJs - 12.17.0 Global packages NPM - 6.14.5 yarn - 1.22.4 @quasar/cli - 1.1.0 cordova - 9.0.0 (cordova-lib@9.0.1) Important local packages quasar - 1.12.13 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time @quasar/app - 2.0.6 -- Quasar Framework local CLI @quasar/extras - 1.9.3 -- Quasar Framework fonts, icons and animations eslint-plugin-quasar - Not installed vue - 2.6.11 -- Reactive, component-oriented view layer for modern web interfaces. vue-router - 3.2.0 -- Official router for Vue.js 2 vuex - 3.4.0 -- state management for Vue.js electron - Not installed electron-packager - Not installed electron-builder - Not installed @capacitor/core - Not installed @capacitor/cli - Not installed @capacitor/android - Not installed @capacitor/ios - Not installed @babel/core - 7.11.1 -- Babel compiler core. webpack - 4.43.0 -- Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff. webpack-dev-server - 3.11.0 -- Serves a webpack app. Updates the browser on changes. workbox-webpack-plugin - Not installed register-service-worker - 1.7.1 -- Script for registering service worker, with hooks typescript - 3.9.5 -- TypeScript is a language for application scale JavaScript development Quasar App Extensions *None installed* Networking Host - kermitMacBook-Pro.local en15 - 192.168.0.110
How can I fix it? Thanks.
-
I would enable IE11 support for Quasar .Then test if the app works in IE11 ( yes in actual ie11). If so it will (very likely) work in any android’s webview.
If not. It’s probably a 3rd party dependency in your app that is not IE11 compatible.
btw I had this exact problem.
-
@dobbel :
I would enable IE11 support for Quasar .Then test if the app works in IE11 ( yes in actual ie11). If so it will (very likely) work in any android’s webview.
If not. It’s probably a 3rd party dependency in your app that is not IE11 compatible.
btw I had this exact problem.@dobbel , I fixed this problem by replace coffee-script to coffeescript:
yarn global remove coffee-script yarn global add coffeescript npm remove --global remove coffee-script
Thanks
-
In addition, we also need to enable IE11 support for Quasar.