Closed Bug 754268 Opened 13 years ago Closed 13 years ago

Send application version info from native to the front end

Categories

(Pancake Graveyard :: Native iOS Wrapper, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: oyiptong, Assigned: st3fan)

Details

No description provided.
Assignee: nobody → sarentz
Fixed with https://bitbucket.org/mozillapancake/pancake-ios/changeset/820eff37ff87 The native app now responds to an "info" command that will return a dictionary with the following info: { "applicationIdentifier": "com.mozilla.internal.PancakeDev", "applicationVersion": "1.0", "deviceJailbroken": false, "deviceModel": "iPad", "deviceSystemVersion": "5.1.1", "hardwareMachine": "iPad3,3", "hardwareModel": "J2aAP" } Let me know if we want to add anything else.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
I see that handleCallWithName handles the 'info' message, and returns the info I need, but where does it return it to? I can send an 'acknowlege' string in the request for this (and all messages) which will be a one-time message name to respond to this request in the origin window.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I think the idea is that the FE grabs the version info from the native app and then submits to as part of lattice requests as described in https://bugzilla.mozilla.org/show_bug.cgi?id=754269
Oops commented on the wrong bug
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
please also capture the network type. wireless or wifi
Fixed with https://bitbucket.org/mozillapancake/pancake-ios/changeset/a6d4dcb53cc3 { "applicationIdentifier": "com.mozilla.internal.PancakeDev", ... "networkConnectionType": "WWAN" } There are two options: WiFi and WWAN.
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
I get the name/value pair reversed, so we get a X-Wifi header with value "networkConnectionType". Re-opening briefly while I fix this.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
We now get e.g. GET /lattice/sfoster@mozilla.com/stack/cf8ed349222b41028ef9b984d7627848/nodes HTTP/1.1 Host: colin.local:6543 User-Agent: Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B176 Accept: application/json X-HardwareMachine: x86_64 X-DeviceSystemVersion: 5.1 X-HardwareModel: MacBookPro8,2 X-Requested-With: XMLHttpRequest X-JsAppVersion: 1.0-localdev X-NetworkConnectionType: WiFi X-ApplicationIdentifier: com.mozilla.internal.PancakeDev Referer: http://colin.local:6543/drawer?platform=ios X-DeviceModel: iPad Simulator X-ApplicationVersion: 1.0 X-DeviceJailbroken: false Accept-Language: en-us Accept-Encoding: gzip, deflate Cookie: sessionid=b7687cbee787925b36945ed56555bf317e4b0890fd0f75d12dd747e29795e22b81437f13 Connection: keep-alive ..note: X-NetworkConnectionType: WiFi But also note: GET /lattice/sfoster%40mozilla.com/stack/cf8ed349222b41028ef9b984d7627848/nodes HTTP/1.1 X-Applicationidentifier: com.mozilla.internal.PancakeDev X-Hardwaremachine: x86_64 Accept-Encoding: gzip X-Applicationversion: 1.0 Host: play.fxhome.mozillalabs.com:4322 X-Devicejailbroken: false User-Agent: python-requests.org Connection: close X-Devicemodel: iPad Simulator Cookie: sessionid=b7687cbee787925b36945ed56555bf317e4b0890fd0f75d12dd747e29795e22b81437f13 X-Networkconnectiontype: WiFi X-Hardwaremodel: MacBookPro8,2 Content-Type: X-Jsappversion: 1.0-localdev X-Devicesystemversion: 5.1 .. the case of the headers is different. Not sure if this is important? I'll assume not as it was this way before, and close.
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
And added the X-NetworkConnectionTypes to the proxy's whitelist in: https://bitbucket.org/mozillapancake/pancake/changeset/911f8e0196e1
Uhhh are we sure we want to send and store all this info for every single request? Wouldn't it be better to do this once at the start of a session?
Actually, these could be sent on each stat or error log request. And with less headers.
Are we saying we should just add these headers in on requests to lattice/exceptions*and lattice/stat* ? Right now they are added to every lattice request.
Yep. It makes sense to only send them to those api endpoints
You need to log in before you can comment on or make changes to this bug.