I'm trying to build an app using Intel XDK, and I'm running into problems. Things were going well at first, but this morning I was prompted to update XDK, and now my app isn't working.
My login page works fine, and the resulting page with links to various pages in the app work. But when I click a link, the page loads, but is blank, and then I get a JS alert saying:
"It appears you have more than one script tag for cordova.js. There can only be one!"
I found the tag and commented it out to see what would happen, and the only thing that changed was I didn't get the alert. The page is still blank. The only coding I've done was the login script on the index page, so I don't know why it broke. I tried restarting the program, and even recreating the app, and it's doing the same thing. Any ideas why?
There were a variety of changes to the Emulate tab with the new version. I get the impression you're using the Emulate tab. I recommend that you test with the Debug tab on a real device, it will give more accurate results.
After some experimenting, I've come to realize that the problem was I was using List View buttons to navigate, and I was navigating to a different page altogether. That was causing my problem. I just combined all of the pages into one, and it works fine, now.
Related
I am working on a progressive web app and it has a file input button to choose a file from the device storage. It works fine offline on chrome desktop version but the android version disables the button. I have no idea how to fix this. There are no css in the project for now just the html and the javascript code for the service worker.
I figured out what was going on with my own page -- somehow every time I hit the app in the home screen, it would go to the saved offline page from Chrome instead of trying to actually use my PWA, and those saved offline pages have their inputs disabled.
I had to go delete the saved web page from Chrome to get mine to work again.
I only noticed because I changed some text around and nothing was correctly updated.
Your seems code is ok. So it might be the set up of the sys.
check the google tutorial
https://developers.google.com/web/fundamentals/codelabs/your-first-pwapp/?hl=en#download_the_code
I'm working on my first jQuery Mobile site, which is a (prototype for) a Location Based Game in Brisbane, Australia: www.jsjensen.dk/soleil/
My question is based on viewing from a mobile device, but a desktop device have very similar problems. I have tested with Chrome and Safari on iPhone, iPad, and Mac. Same problem everywhere.
I think it's related to how jQuery Mobile loads and displays pages, but I'm not using multiple pages in one HTML document, but have multiple HTML document.
If you go to the website above and then click "QUESTS" in the menu, followed by "Stairway to Knowledge" you will end on /soleil/quest01.html (desktop) and /soleil/#/soleil/quest01.html. That "#/soleil" really confuses me!
In this first try the JavaScript for handling answers in the text input is not loaded. That means nothing happens when you press "Unlock".
Now, if you reload on desktop or edit the address on iOS to /soleil/quest01.html (which is the actual and real file) it will reload the page with the right JavaScript loaded and initialized.
Now I'm able to go back (pressing "QUESTS" in the menu) and then go to another page (e.g. "Citadel of Fun") with the same problem: the JavaScript not loading. If I go back to the other one ("Stairway to Knowledge") the JavaScript is, however, still loaded and working just fine.
So what happens here? I'm pretty sure my linking/coding is correct, but it's just a basic understanding of jQuery Mobile that I'm missing. Can I change something to make this work? It could really be awesome!
So, I found a way to fix it, but not really a solution to the original problem.
I've added rel="external" to the tags pointing to the pages where I had problems. In this way it will not use the AJAX system to load these pages, but do it in a regular way. This solved my problem, but now I can't make any fancy transitions.
My page is hanging up with a blank/white screen until I touch it. The problem goes away when I comment out the following line:
<script type='text/javascript' src='https://static-na.payments-amazon.com/OffAmazonPayments/us/sandbox/js/Widgets.js?sellerId=ANQ73XOZ7PBIK'></script>
I am able to display an alert box both before and after the above line of code. Also, the problem goes away as soon as I re-load the app! It's only the first time the app is run that I have a problem.
My page uses PhoneGap and jQuery Mobile. I have tried moving the above line of code to before/after the PhoneGap/jQuery stuff. No difference.
Thank you for your help :)
P.S. I have also seen this problem occur off and on when loading my page within Android's regular browser. So I'm thinking it's more than a PhoneGap issue.
P.S.S Here is the page link https://www.mytrafficman.net/app/android/
since a few days there seems to be a problem with a audio player script (flash + javascript) on one of our pages that NEVER occured before and I changed absolutely nothing in the code (it has worked for a few years now) that could cause this issue.
We bought the audio player script a few years ago, and again, until a few days ago, it worked perfectly.
The error also behaves very strange. Let me explain...:
The page is www.imatunes.de . You can see these small audio players on each article there.
Feel free to check out the code, got nothing to hide there.
My coworkers told me, that suddenly nothing happened if they clicked on the "Play" buttons. Normally, the script should start the flash player, which plays an audio file.
Now comes the "somehow" strange part:
My coworkers are all using Google Chrome. When they open the page in Chrome and click on a "Play" button, the JavaScript console throws the following error:
"Error on calling method on NPObject".
Googling that error says it has to do something with actionscript, cross-domain policies and such. But the error will get stranger...:
I'm using Firefox, and there it works FLAWLESS. But it also works on MY Google Chrome flawless, so it's very hard to debug (that's why I'm here to ask).
My coworkers also tried it on their home PCs, also running Google Chrome and such, and it also doesn't work there.
Now comes the "very" strange part:
When they get this error and reload the page via the browser controls (F5 or the reload button), it still won't work.
But if they browse around the page or just click on the logo in the header (which basically takes them to the home page again), the script magically works.
And on every other page except for the home page, it will work on first try.
As I said before, this started a few days ago - before that, everything worked just fine. And I really didn't change anything in the code.
So regarding the fact that it works after they browse around the page and return to the home page, it somehow seems like some sort of caching error.
I really don't know how I could debug this, or what to do.
Thank your for every possible help in advance!
I have written a word game using HTML5 canvas tag and a little bit of audio. I developed the application on the chrome web browser on a linux system. Recently during the testing phase it was tried on safari 5.0.3 on Mac and the webpage froze. Not just the canvas element, but interactive element on the page froze. I have at some times experienced this problem on google chrome when I was developing but since the console did not throw any error before this happened, I did not give it much credence. Now as per requirements I am supposed to support both chrome and safari but this dismal performance on safari has left me shocked and I cannot see what error can be thrown which might lead to such a situation. Worse yet the CPU usage on using this application peaks to 70-80percent on my 2yr old macbook running ubuntu... I can only but pity the person who uses mac to operate this app, which undoubtedly is a heavier OS. Could someone help me out with a place I can start with to find out what exactly is causing this issue.
I have run profiles on this webapp on google chromes console and noticed that in the heap spanshot value increases steadily with the playing of the game, specifically (root) value which jumps up by 900 counts. Any help would be very appreciated!
Thanks
EDIT: I don't know if this helps, but I have noticed that even on refreshing the page after the app becomes unresponsive the page reloads and I am still not able to interact with the page elements but the tab scroll bar continues to work and I can see my application window completely. So to summaries the tab stops accepting any sort of user interaction inside the page.
Edit2: Nop. It doesn't work still... The app crashes on double click on the canvas element. The console is not throwing any errors either! =/ I have noticed this problem is isolated only to safari!
Edit3: Okay, so I performed some other tests today. I isolated the HTML5 widget and its HTML data only and ran it on safari locally to reproduce the error. Alas it works well! So I tried playing the game from my server without Facebook integration, and it works fine again! So The issue crops up only on safari on MAC OSX, while the widget is on Facebook canvas as a Facebook application. I am very hard-pressed to come up with a reduced test case scenario for this app... =/ It gets weirder, the game works well on safari for windows. Also after the tab freezes the other tabs continue to be responsive and well working. This tab too closes on clicking the close button and stuff, but if I load another page on this same tab after its frozen the page loads in the tab canvas, but I cannot interact with it. Not even google.com! So I am sure there is no bug with my game but its a safari bug... Will soon file a bug report, thanks for all the help people... :)
What you should do, in one sentence: Reproduce the problem with as little code as possible.
Start removing parts of your app until you find nothing that can be removed while still preserving the error. Start by throwing out external resources (css, images, etc) and leave just the html and javascript. Try removing the audio. Try removing as much gaming logic as possible. Try removing all user input code.
If this truly is a bug in Safari itself and not in your code, it should be possible to create a very small code example. Until you have that, saying "my web app doesn't work in safari", without any details or examples, will get you nowhere.