Description
Error, when the default HTML5 app is being previewed in browser.
It happens with packaged for mobile web app as well.
To reproduce
1. Create a default HTML5-based app
2. Run Mobile Web Preview in Browser
Actual result
[Warning] Invalid CSS property declaration at: * (index.html, line 151)
[Log] [INFO] Appcelerator Titanium 3.3.0 Mobile Web (index.html, line 2437)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (ApplicationWindowPlatform.js, line 0)
[Error] TypeError: 'undefined' is not a function (evaluating 'ApplicationWindowPlatform(self, webView, titleBarOn, drawerOn)')
ApplicationWindow (undefined, line 90)
[Warning] Invalid CSS property declaration at: * (index.html, line 151)
[Log] [INFO] Appcelerator Titanium 3.3.0 Mobile Web (index.html, line 2437)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found)
send ([native code], line 0)
load (index.html, line 1280)
requireDepClosure (index.html, line 1704)
req (index.html, line 1705)
scopedRequire (index.html, line 1162)
ApplicationWindow
global code (app.js, line 18)
[Error] TypeError: 'undefined' is not a function (evaluating 'ApplicationWindowPlatform(self, webView, titleBarOn, drawerOn)') (undefined, line 90)
[Warning] Invalid CSS property declaration at: * (index.html, line 146)
[Log] [INFO] Appcelerator Titanium 3.2.3 Mobile Web (index.html, line 2524)
[Error] Viewport argument value "device-width;" for key "width" is invalid, and has been ignored. Note that ';' is not a separator in viewport values. The list should be comma-separated. (index.html, line 12)
Expected result
"TARZAN OF THE APES" HTML file should be loaded
I am having this same issue with 3.3.0.GA, the server gives a 404 error when serving /mobileweb/ui/ApplicationWindowPlatform.js The file exists, but the server does not serve it.
Same issue on 3.4.1GA. Any progress? - or workarounds? I would really like to use Titanium to create my mobileweb apps as well. However, the html5 template does note work - and with Alloy (which I would prefer) I cannot find a way to create an control :-(
[~jda] The "HTML5" project template should never be used for a Titanium Mobile Web app. It's intended to be a boilerplate project for HTML5 apps inside a WebView. Doing this for Titanium Mobile Web is like trying to drive a car from the back seat. Not only is it a bad idea, it's also dangerous. Just create a default Alloy app and start hacking. Titanium Mobile Web does not support a lot of stuff and file uploads is one of them.
Thanks, Chris. So what you are saying is that I cannot use Titanium for this mobile web app that needs to use an control? I was trying to "hack" my way through a webview - where I can select the file or take a photo - just need to get it to communicat with the "real" mobile web page (which should be do-able via app events according to documentation)... But no success yet. /John
[~jda] In Titanium Mobile Web on a mobile browser, you cannot select a file or take a photo. The mobile browser doesn't support it and Titanium Mobile Web doesn't support it. Titanium Mobile Web doesn't even support the camera (though it should be possible). Furthermore, in Mobile Web, WebViews are just iframes and are subject to cross-domain restrictions. The Titanium bridge will only be inserted if the HTML contents originate from the same identical server as the Mobile Web app. I think we're getting off topic with regards to this Jira ticket. If you'd like to continue a dialogue on file uploads, cameras, WebView communication, etc, please ask a question in the community Q&A and we can help you get things sorted out: http://developer.appcelerator.com/question/ask.
Hi Chris, I agree - and I already had created a question in the Q&A ;-) http://developer.appcelerator.com/question/179292/best-practice-for-building-a-mobileweb-app
.... the most important thing for me to know in relation to this Jira ticket was that the html5 template was not meant to be used in the way I (and others) anticipated - and therefore, not an easy way to add the html controls directly ;-)
Titanium Mobile Web does not support the "HTML-based Application" template. This template was poorly named. I have created TISTUD-7073 to properly rename it to something else less confusing. You should use any of the other templates to build your Mobile Web app.
Agree. Makes sense ;-) ... now I just need to find out how to do this with my Alloy app - as I believe Alloy is the best way to create apps in Titanium.
Closing ticket as "Won't Fix".