Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Bugs & Fixes 2 years ago
Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
I built my Ionic project on two different computers and got different result.
The first computer: Ionic Info
Ionic: ionic (Ionic CLI) : 4.2.1 (/usr/local/lib/node_modules/ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.0 Cordova: cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : android 7.1.1 Cordova Plugins : no whitelisted plugins (19 plugins total) System: NodeJS : v8.11.3 (/usr/bin/node) npm : 6.2.0 OS : Linux 4.15
Ionic:
ionic (Ionic CLI) : 4.2.1 (/usr/local/lib/node_modules/ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : android 7.1.1 Cordova Plugins : no whitelisted plugins (19 plugins total)
System:
NodeJS : v8.11.3 (/usr/bin/node) npm : 6.2.0 OS : Linux 4.15
FileReader only work when I put await in reader.readAsDataURL();
The second computer:
Ionic info cli packages: (/usr/local/lib/node_modules) @ionic/cli-utils : 1.19.2 ionic (Ionic CLI) : 3.20.0 global packages: cordova (Cordova CLI) : 8.0.0 local packages: @ionic/app-scripts : 3.1.8 Cordova Platforms : ios 4.5.4 Ionic Framework : ionic-angular 3.9.2
Ionic info
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2 ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.8 Cordova Platforms : ios 4.5.4 Ionic Framework : ionic-angular 3.9.2
my code:
async downloadFromURL(fileName, mimeType, url){ return new Promise((resolve,reject) => { try{ var self = this; var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.responseType='blob'; xhr.onloadend = async function(e) { if (xhr.status == 200) { var reader = new FileReader(); reader.onloadend = async function(event){ var response = self.insertFile({ 'type': mimeType, 'title': fileName }, event.target["result"].split(',')[1]); resolve(response); } await reader.readAsDataURL(xhr.response); } }; xhr.send(); } catch (error) { reject(); console.log("error", error); } }); }
So, my question is how can I fix this without update ionic and cordova?
And sorry for my bad english :D
Thanks in advance.
in your index.html try moving the script tag for cordova.js from the header to the body, below the build/polyfills.js script tag. My body tag now looks like this:
index.html
cordova.js
build/polyfills.js
<body> body>
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 10 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 9 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.