Closed
Bug 1021481
Opened 10 years ago
Closed 10 years ago
Handle app:// protocol for DEBUG=1 mode
Categories
(Firefox OS Graveyard :: Gaia::Build, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: yurenju, Assigned: chens)
References
Details
Attachments
(2 files, 3 obsolete files)
currently we use http:// for DEBUG=1 and app:// for device and b2g-desktop and we need to handle those two protocol shceme on build system like bug 1020167 we should register app:// protocol for DEBUG=1 mode to simplify build process.
Reporter | ||
Comment 1•10 years ago
|
||
I was wrong since bug 1020167 does not handle two protocol on build script, but we still use a lot of GAIA_SECHME (app:// or http:// for this variable) and GAIA_DOMAIN in $GAIA_DIR/build/*.
Assignee | ||
Comment 2•10 years ago
|
||
This WIP will register app protocol for DEBUG=1 mode and redirect to http protocol, which serves app data by httpd.js. But one problem comes into when I try to change scheme from |SCHEME=http://| to |SCHEME=app://|, it will get errors like: JavaScript error: http://system.gaiamobile.org:8080/shared/js/dump.js, line 24: settings is null JavaScript error: http://system.gaiamobile.org:8080/js/applications.js, line 85: apps.mgmt is null
Assignee: nobody → shchen
Comment 3•10 years ago
|
||
I imagine the channel.redirectTo() call isn't transparent enough. You may find some helpful tricks from the original app: protocol implementation, which was in JS in early releases (and now is in C++): http://mxr.mozilla.org/mozilla-b2g18/source/netwerk/protocol/app/AppProtocolHandler.js#53
Assignee | ||
Comment 4•10 years ago
|
||
Rewrite app: protocol handler as comment 3 suggested, and also change browser-helper to avoid errors in comment 2. This patch works well on original homescreen, but if change to vertical homescreen , it will not have any icons on homescreen.
Attachment #8441241 -
Attachment is obsolete: true
Comment 5•10 years ago
|
||
May be that because of GAIA_PORT=8080? Or something unexected now happens in post-manifest.js:manifestInterAppHostnames (which should be useless thanks to your patch)?
Assignee | ||
Comment 6•10 years ago
|
||
Tried on gaia master, still no icon on vertical homescreen, gaia commit hash is: 646efa07944adfe96c28d6075f95be1037eb657c
Assignee | ||
Comment 7•10 years ago
|
||
Comment on attachment 8441898 [details] [review] WIP Hi Yuren, how do you think about this patch? should we also take care GAIA_PORT in this one or file another bug to change it? As for vertical homescreen not showing any icon in DEBUG=1 mode, I've filed bug 1015865 to keep tracking it.
Attachment #8441898 -
Flags: feedback?(yurenju.mozilla)
Reporter | ||
Comment 8•10 years ago
|
||
Comment on attachment 8441898 [details] [review] WIP offline discussed with chens, we will keep GAIA_PORT for changing default http port and redirect app protocol to http server with GAIA_PORT.
Attachment #8441898 -
Flags: feedback?(yurenju.mozilla) → feedback+
Assignee | ||
Comment 9•10 years ago
|
||
Support app protocol and keep GAIA_PORT
Attachment #8441898 -
Attachment is obsolete: true
Attachment #8443197 -
Flags: review?(yurenju.mozilla)
Assignee | ||
Comment 10•10 years ago
|
||
(In reply to Sherman Chen [:chens] from comment #7) > As for vertical homescreen not showing any icon in DEBUG=1 mode, I've filed > bug 1015865 to keep tracking it. Correction, it should be bug 1027555.
Reporter | ||
Comment 11•10 years ago
|
||
Comment on attachment 8443197 [details] [review] Pull Request I would like to give f+ for this pr and redirect review request to Alex since I'm new to nsIProtocolHandler. and please file follow up bugs to remove domain or scheme from functions in utils such as getWebapp(), makeWebappsObject(), gaiaOriginURL(), gaiaManifestURL(), etc.
Attachment #8443197 -
Flags: review?(yurenju.mozilla)
Attachment #8443197 -
Flags: review?(poirot.alex)
Attachment #8443197 -
Flags: feedback+
Reporter | ||
Comment 12•10 years ago
|
||
thanks chens correct me, I mean port or scheme, not domain.
Assignee | ||
Comment 13•10 years ago
|
||
(In reply to Yuren [:yurenju] from comment #11) > and please file follow up bugs to remove domain or scheme from functions in > utils such as getWebapp(), makeWebappsObject(), gaiaOriginURL(), > gaiaManifestURL(), etc. File bug 1028069 for follow up.
Comment 14•10 years ago
|
||
Comment on attachment 8443197 [details] [review] Pull Request Looks good, thanks for this patch and the followup cleanup! I dropped a note about how easily map this new app protocol to build_stage: https://github.com/mozilla-b2g/gaia/pull/20654/files#discussion_r14067900
Attachment #8443197 -
Flags: review?(poirot.alex) → review+
Assignee | ||
Comment 15•10 years ago
|
||
(In reply to Alexandre Poirot (:ochameau) from comment #14) > Comment on attachment 8443197 [details] [review] > Pull Request > > Looks good, thanks for this patch and the followup cleanup! > > I dropped a note about how easily map this new app protocol to build_stage: > https://github.com/mozilla-b2g/gaia/pull/20654/files#discussion_r14067900 Getting rid of httpd sounds awesome! But we also need to take care of test-agent while mapping app protocol to build_stage. I would like to file another bug for that work, how do you think?
Comment 16•10 years ago
|
||
(In reply to Sherman Chen [:chens] from comment #15) > (In reply to Alexandre Poirot (:ochameau) from comment #14) > > I dropped a note about how easily map this new app protocol to build_stage: > > https://github.com/mozilla-b2g/gaia/pull/20654/files#discussion_r14067900 > > Getting rid of httpd sounds awesome! But we also need to take care of > test-agent while mapping app protocol to build_stage. I would like to file > another bug for that work, how do you think? Sure, I didn't expected that it would work as-is. We also need a filewatcher or something that would automagically refresh stage. But we should start testing to see if test agent is the only thing left to fix.
Assignee | ||
Comment 17•10 years ago
|
||
(In reply to Alexandre Poirot (:ochameau) from comment #16) > Sure, I didn't expected that it would work as-is. > We also need a filewatcher or something that would automagically refresh > stage. > But we should start testing to see if test agent is the only thing left to > fix. File follow up bug for replace httpd: bug 1029423
Assignee | ||
Comment 18•10 years ago
|
||
Merged to master https://github.com/mozilla-b2g/gaia/commit/7de7d836ac32a9803d503c2a776d4b08baf02e3f
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 19•10 years ago
|
||
Reopened because of regression in b2g-inbound.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 20•10 years ago
|
||
https://tbpl.mozilla.org/php/getParsedLog.php?id=42345470&tree=B2g-Inbound was the test failure/regression on b2g-i
Reporter | ||
Comment 21•10 years ago
|
||
revert commit decffedef4c0c79f8b1faf6feceb9d51e3493269
Assignee | ||
Comment 22•10 years ago
|
||
Attachment #8443197 -
Attachment is obsolete: true
Assignee | ||
Comment 23•10 years ago
|
||
Comment on attachment 8446321 [details] [review] Pull Request Change some manifest urls in app unit test, includes comms, settings, keyboard, and l10n in sharedtest.
Attachment #8446321 -
Flags: review?(yurenju.mozilla)
Reporter | ||
Comment 24•10 years ago
|
||
could you also paste your tbpl link for gecko try server?
Assignee | ||
Comment 25•10 years ago
|
||
(In reply to Yuren [:yurenju] from comment #24) > could you also paste your tbpl link for gecko try server? Gaia-try: https://tbpl.mozilla.org/?tree=Gaia-Try&rev=a2c027cf1c05040eb7fb51d70d799df96fb14fe0 Try: https://tbpl.mozilla.org/?tree=Try&rev=608980268a87
Reporter | ||
Comment 26•10 years ago
|
||
Comment on attachment 8446321 [details] [review] Pull Request good to me, r=yurenju
Attachment #8446321 -
Flags: review?(yurenju.mozilla) → review+
Reporter | ||
Comment 27•10 years ago
|
||
and please separate to two commits next time to help us review more effectively.
Assignee | ||
Comment 28•10 years ago
|
||
This patch also update before_script for unit-tests-in-firefox Travis: https://travis-ci.org/mozilla-b2g/gaia/builds/28485594 Gaia-Try: https://tbpl.mozilla.org/?tree=Gaia-Try&rev=57ccaf1ec701cf84287f5ca4da6c4e68c1a5704b Try: https://tbpl.mozilla.org/?tree=Try&rev=c80418e6ebdd
Attachment #8446952 -
Flags: review?(yurenju.mozilla)
Reporter | ||
Updated•10 years ago
|
Attachment #8446952 -
Flags: review?(yurenju.mozilla) → review+
Assignee | ||
Comment 29•10 years ago
|
||
Merged to master https://github.com/mozilla-b2g/gaia/commit/43fd8f8bff1f774cf5e9f9d8d3bbcfa2d4a30367
Assignee | ||
Updated•10 years ago
|
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•