[TIMOB-8877] MobileWeb: Failure in using ACS with mobile web
GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-06-11T21:47:45.000+0000 |
Affected Version/s | Release 2.0.1 |
Fix Version/s | Release 2.1.0, Sprint 2012-11 MW |
Components | MobileWeb |
Labels | acs, mobileweb |
Reporter | Milt Grinberg |
Assignee | Chris Barber |
Created | 2012-04-24T13:46:21.000+0000 |
Updated | 2012-08-29T10:21:25.000+0000 |
Description
When I try to run a very simple example of creating a new user in the cloud, I get a failure with the "Application Error" Unknown Error displaying in the browser. In the browser it reports a failure on line 906 of the index.html. This is the end of a comment line.
Actual error
A parameter or an operation is not supported by the underlying object
*****************************************************************************/
I have attached a project. Just click the 'Create a New User'. This causes the proble.
Attachments
By the way, This works fine as a Android app.
This particular error is fixed when TIMOB-8440 was fixed. It's worth noting that while mobile web's code works, the api.cloud.appcelerator.com endpoint is throwing a 400 error.
So is there a "continuous build" that I can use to test if mobileweb will work with ACS?
Hi Milt, there sure is: http://builds.appcelerator.com.s3.amazonaws.com/index.html Select "master" from the drop down, then pick the build at the top of the list for your platform. I tested the attached test case and it works fine for me. Remember that the user being created in this file is hard coded and it fails if you try to create the user more than once.
So I pulled the latest build and this test app works in Chrome but not Firefox 11. The error I still get is A parameter or an operation is not supported by the underlying object *****************************************************************************/ index.html (line 894) previously it was failing on line 906. Have you tested it on Firefox or IE. Both cause the Application Error red screen. i will try my real app against Chrome to see if it gets passed the create user. (I did changed the username so it was creating a new user. However even if it already there it shouldn't throw the Application error screen.)
So I tried running the real app on Chrome. (This works fine as an android app). After login I get a 401 error. in the following index.html code. I will try to generate the next step for failure in chrome. This starts in line 10444 - 10462 of index.html "Ti/API":function(){ /* C:/Users/Milt/Documents/Workspace/ArtistEntry/build/mobileweb/titanium\Ti/API.js */ define(["Ti/_/Evented", "Ti/_/lang"], function(Evented, lang) { var api = {}; require.each(["debug", "error", "info", "log", "warn"], function(fn) { api[fn] = function() { console[fn]("[" + fn.toUpperCase() + "] " + lang.toArray(arguments).map(function(a) { [ERROR] undefined: 401 return require.is(a, "Object") ? a.hasOwnProperty("toString") ? a.toString() : JSON.stringify(a) : a === null ? "null" : a === void 0 ? "undefined" : a; }).join(' ')); }; }); return lang.setObject("Ti.API", Evented, api); }); }, The javascript console shows [INFO] ACS Request: { url: "users/login.json", verb: "POST", secure: YES, data: {"login":"test","password":"test"} }) index.html:10453[INFO] POST: https://api.cloud.appcelerator.com/v1/users/login.json?oauth_version=1.0&oauth_consumer_key=MVXby0rleyZqDcYUHQt0D1c00mrO7Im6&oauth_signature_method=HMAC-SHA1&oauth_nonce=xfTSS00q3seGIM4&oauth_timestamp=1335487247&oauth_signature=fKNe9yKevNJ%2FF517RO0ye7Ke6FM%3D index.html:10453[INFO] header: {} index.html:10453[INFO] data: {"login":"test","password":"test","ti_analytics":"{\"id\":\"1267B0B1-7029-4418-99F1-5C95FE45F96B\",\"mid\":\"C222A307-BDE9-411F-BF0E-A362E70E3CA0\",\"aguid\":\"1199c296-13ad-4668-a396-72673981cd24\",\"event\":\"cloud.users.login\",\"deploytype\":\"development\"}"} Refused to set unsafe header "Accept-Encoding" Refused to set unsafe header "Cookie" https://api.cloud.appcelerator.com/v1/users/login.json?oauth_version=1.0&oauth_consumer_key=MVXby0rleyZqDcYUHQt0D1c00mrO7Im6&oauth_signature_method=HMAC-SHA1&oauth_nonce=xfTSS00q3seGIM4&oauth_timestamp=1335487247&oauth_signature=fKNe9yKevNJ%2FF517RO0ye7Ke6FM%3DFailed to load resource: the server responded with a status of 401 (Unauthorized) index.html:10453[ERROR] undefined: 401 index.html:12362 XMLHttpRequestException
So I have a modified version of the app that again fails in Chrome when I try to query the collections. It gets a failure message of "Can't reach host". I was able to both create a user and login into the user using Chrome. However, I have different problems when trying to use Firefox. In Firefox, I get the error that I mentioned in my previous comment. I'm not sure how to attach my latest version of the app which basically tries to query for a collection. This runs properly both on my phone and in the Android Emulator.
Reopening this ticket as this continues to be an issue even though the duplicate issue has been resolved.
I think this is an issue with either the modules team or the ACS team. Mobile web loads the module just fine. I propose we move this ticket over and have whoever is responsible for Ti.Cloud look into the issue further.
Please investigate
I guess the question is "Is it time to give up on ACS with mobile Web.". Unless I am missing something this is a basic issue with the use of mobileWeb and ACS. I can log in in as a user but when asking for a collection I get the "can't reach host". This issue seems to have no traction eventhough it was highly touted at the release of 2.0.
@Chris - Please coordinate with Jeff E and bring a closure to this issue.
Just want to add - we've got a customer who has now waited a month for what Milt is building, so that's why Milt asked whether we should give up and go in another direction.
@Joe, Mitt - we are looking into these issues and some of them require an architecture change. We will fix these issues for 2.1.0 release due at the end of June.
We have resolved the issues with Mobile Web platform. There are few remaining issues with ACS CommonJS module that are being tracked in a MOD project ticket. Marking this ticket resolved as it is no longer a Mobile Web platform issue. We will have these fixes available in 2.1.0 release that due at the end of June.
I have just added some details to TC-810 as it would appear that this issue is not fixed but the ticket has been closed. I have tested the latest 2.2.0 ti.cloud example. Mobile web is still generating "Can't reach host" errors in Firefox (Android mobile 14.1 and desktop 15.0 versions). I have the Atomic Web Browser on my iPhone and it works. Specifically, I am trying to call the Create User functionality.