Get keyboard app working as chrome

RESOLVED FIXED

Status

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: gerard-majax, Assigned: apastor)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-pine)

Attachments

(4 attachments, 3 obsolete attachments)

(Reporter)

Description

3 years ago
03-18 16:17:04.210  2325  2325 E GeckoConsole: [JavaScript Error: "TypeError: this.inputLayouts.layouts[group] is undefined" {file: "chrome://gaia/content/system/js/keyboard_manager.js" line: 164}]
03-18 16:17:04.210  2325  2325 E GeckoConsole: km_activateKeyboard@chrome://gaia/content/system/js/keyboard_manager.js:164:1
03-18 16:17:04.210  2325  2325 E GeckoConsole: km_handleInputContextFocus@chrome://gaia/content/system/js/keyboard_manager.js:199:5
03-18 16:17:04.210  2325  2325 E GeckoConsole: km_handleEvent@chrome://gaia/content/system/js/keyboard_manager.js:215:9
03-18 16:17:04.210  2325  2325 E GeckoConsole: MozInputMethodManager.prototype.handleFocus@jar:file:///system/b2g/omni.ja!/components/MozKeyboard.js:236:20
03-18 16:17:04.210  2325  2325 E GeckoConsole: mozInputMethodReceiveMsg@jar:file:///system/b2g/omni.ja!/components/MozKeyboard.js:523:9
(Reporter)

Updated

3 years ago
Assignee: lissyx+mozillians → nobody
(Assignee)

Updated

3 years ago
Assignee: nobody → apastor
(Assignee)

Comment 1

3 years ago
Created attachment 8734320 [details] [diff] [review]
kb-pine.patch

That's what I did, but I'm not sure if it breaks something else :/
Attachment #8734320 - Flags: feedback?(lissyx+mozillians)
Created attachment 8734323 [details] [review]
[gaia] albertopq:kanikani-kb > mozilla-b2g:kanikani
(Assignee)

Updated

3 years ago
Attachment #8734320 - Flags: feedback?(fabrice)
Comment on attachment 8734320 [details] [diff] [review]
kb-pine.patch

Review of attachment 8734320 [details] [diff] [review]:
-----------------------------------------------------------------

This has no chances to be merged back in m-c, so I'd rather not take that hack.
Let's see if we need MOZ_CHILD_PERMISSIONS at all on desktop e10s for instance.
Attachment #8734320 - Flags: feedback?(fabrice) → feedback-
(Reporter)

Updated

3 years ago
Attachment #8734320 - Flags: feedback?(lissyx+mozillians)
I'm gonna take a look at that today.
Created attachment 8735666 [details] [diff] [review]
keyboard.patch

I added a "in chrome" flag to the OriginAttributes since this is what is used for these kind of checks.

The indexedDB change is needed because the keyboard app itself needs indexedDB. I haven't checked with regular web content, and I would not be surprised if this doesn't work for these frames. If this is the case, we should juts do what desktop e10s is doing, which is just not setting MOZ_CHILD_PERMISSIONS...
Attachment #8734320 - Attachment is obsolete: true
Attachment #8735666 - Flags: feedback?(lissyx+mozillians)
(Reporter)

Comment 6

3 years ago
Comment on attachment 8735666 [details] [diff] [review]
keyboard.patch

Review of attachment 8735666 [details] [diff] [review]:
-----------------------------------------------------------------

I'm not able to get the keyboard to show up in Mulet, and while I do see keys when typing them, I still see errors:
> XXX FIXME : Dispatch a mozChromeEvent: inputmethod-contextchange
> XXX FIXME : Dispatch a mozChromeEvent: inputmethod-contextchange
> JavaScript error: chrome://gaia/content/system/js/keyboard_manager.js, line 164: TypeError: this.inputLayouts.layouts[group] is undefined
> MozKeyboard.js: A frame with input-manage permission did not handle the inputcontextfocus event dispatched.
> XXX FIXME : Dispatch a mozChromeEvent: inputmethod-contextchange
> XXX FIXME : Dispatch a mozChromeEvent: inputmethod-contextchange
> XXX FIXME : Dispatch a mozChromeEvent: inputmethod-contextchange
> JavaScript error: chrome://gaia/content/system/js/keyboard_manager.js, line 164: TypeError: this.inputLayouts.layouts[group] is undefined
> MozKeyboard.js: A frame with input-manage permission did not handle the inputcontextfocus event dispatched.

Is it expected? Or you only hacked on device?
Attachment #8735666 - Flags: feedback?(lissyx+mozillians)
(Assignee)

Comment 7

3 years ago
Did you patch gaia as well with the attached patch?
Flags: needinfo?(lissyx+mozillians)
(Reporter)

Comment 8

3 years ago
No, I forgot :)
Flags: needinfo?(lissyx+mozillians)
Blocks: 1261025
No longer blocks: 1252143
Summary: No keyboard working → Get keyboard app working as chrome
(Reporter)

Comment 9

3 years ago
Comment on attachment 8735666 [details] [diff] [review]
keyboard.patch

Review of attachment 8735666 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/inputmethod/MozKeyboard.js
@@ +688,5 @@
> +      dump('MozKeyboard.jsm: no system app startup url set (pref is b2g.system_startup_url)');
> +    }
> +
> +    // FIXME: as in shell.js, the pref does not include /index.html yet.
> +    systemAppIndex = 'chrome://gaia/content/system/index.html';

I am fixing this in bug 1260992
(Reporter)

Comment 10

3 years ago
Ok, no keyboard gets displayed when focusing in rocketbar, but long pressing home and then opening a new window, focusing in the address bar, keyboard gets displayed, and we can switch between all of them. I could type chars.
(Reporter)

Comment 11

3 years ago
>  -*- Shell.js: Failed to get key: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getCharPref]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: chrome://b2g/content/shell.js :: checkReloadKey :: line 520"  data: no]

Everytime I tap on a key :)
(Reporter)

Comment 12

3 years ago
Created attachment 8736768 [details]
2016-03-31-16-18-56.png

this is on device when focusing in the address bar
Created attachment 8737401 [details] [diff] [review]
keyboard.patch v2

I talked to mrbkap and he confirmed that we can get rid of MOZ_CHILD_PERMISSIONS. That means that we don't need the mInChrome flag either!
Attachment #8735666 - Attachment is obsolete: true
Created attachment 8737791 [details] [review]
[gaia] albertopq:1257935-kb > mozilla-b2g:kanikani
(Assignee)

Updated

3 years ago
Attachment #8734323 - Attachment is obsolete: true
(Assignee)

Updated

3 years ago
Attachment #8737791 - Flags: review?(bfrancis)
Comment on attachment 8737791 [details] [review]
[gaia] albertopq:1257935-kb > mozilla-b2g:kanikani

Thanks
Attachment #8737791 - Flags: review?(bfrancis) → review+
(Reporter)

Comment 17

3 years ago
Comment on attachment 8737401 [details] [diff] [review]
keyboard.patch v2

Review of attachment 8737401 [details] [diff] [review]:
-----------------------------------------------------------------

looks good, testing this
Attachment #8737401 - Flags: review+
(Reporter)

Comment 18

3 years ago
Created attachment 8738116 [details]
Capture du 2016-04-05 14-18-44.png

On mulet
(Reporter)

Comment 19

3 years ago
Comment on attachment 8737401 [details] [diff] [review]
keyboard.patch v2

Review of attachment 8737401 [details] [diff] [review]:
-----------------------------------------------------------------

testing shows errors, looks like we need more work: 
4-05 15:33:11.538   321   321 I Gecko   : NeckoParent::AllocPHttpChannelParent: FATAL error: App does not have permission: KILLING CHILD PROCESS
04-05 15:33:11.538   321   321 I Gecko   : 
04-05 15:33:11.538   321   321 I Gecko   : ###!!! [Parent][DispatchAsyncMessage] Error: (msgtype=0xA20005,name=PNecko::Msg_PHttpChannelConstructor) Value error: message was deserialized, but contained an illegal value
04-05 15:33:11.538   321   321 I Gecko   : 
04-05 15:33:11.538   321   597 I Gecko   : [Parent 321] WARNING: waitpid failed pid:1381 errno:10: file /home/alex/codaz/Mozilla/gecko-cinnabar/ipc/chromium/src/base/process_util_posix.cc, line 272
04-05 15:33:11.538   321   920 I Gecko   : 
04-05 15:33:11.538   321   920 I Gecko   : ###!!! [Child][MessageChannel] Error: (msgtype=0x440003,name=PCompositorBridge::Msg_DidComposite) Channel error: cannot send/recv
04-05 15:33:11.538   321   920 I Gecko   : 
04-05 15:33:11.538   321   920 I Gecko   : 
04-05 15:33:11.538   321   920 I Gecko   : ###!!! [Child][MessageChannel] Error: (msgtype=0x440003,name=PCompositorBridge::Msg_DidComposite) Channel error: cannot send/recv
04-05 15:33:11.538   321   920 I Gecko   : 
04-05 15:33:11.578   321   321 I Gecko   : 
04-05 15:33:11.578   321   321 I Gecko   : ###!!! [Parent][MessageChannel] Error: (msgtype=0x2C005F,name=PBrowser::Msg_Activate) Channel error: cannot send/recv
04-05 15:33:11.578   321   321 I Gecko   : 
04-05 15:33:11.578   321   321 I Gecko   : 
04-05 15:33:11.578   321   321 I Gecko   : ###!!! [Parent][MessageChannel] Error: (msgtype=0x2C0001,name=PBrowser::Msg_AsyncMessage) Channel error: cannot send/recv
04-05 15:33:11.578   321   321 I Gecko   : 
04-05 15:33:11.598   321   321 I Gecko   : 
04-05 15:33:11.598   321   321 I Gecko   : ###!!! [Parent][MessageChannel] Error: (msgtype=0x2C005D,name=PBrowser::Msg_UpdateDimensions) Channel error: cannot send/recv
04-05 15:33:11.598   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : ###!!! [Parent][OnMaybeDequeueOne] Error: Channel error: cannot send/recv
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : ###!!! [Parent][OnMaybeDequeueOne] Error: Channel error: cannot send/recv
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : ###!!! [Parent][OnMaybeDequeueOne] Error: Channel error: cannot send/recv
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : ###!!! [Parent][OnMaybeDequeueOne] Error: Channel error: cannot send/recv
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : ###!!! [Parent][OnMaybeDequeueOne] Error: Channel error: cannot send/recv
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : ###!!! [Parent][OnMaybeDequeueOne] Error: Channel error: cannot send/recv
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : ###!!! [Parent][MessageChannel] Error: (msgtype=0xA,name=PAPZ::Msg_AcknowledgeScrollUpdate) Channel error: cannot send/recv
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : ###!!! [Parent][MessageChannel] Error: (msgtype=0x2C0076,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv
04-05 15:33:11.628   321   321 I Gecko   : 
04-05 15:33:11.628   321   321 I Gecko   : ############ ErrorPage.js
04-05 15:33:11.638   321   321 I Gecko   : 
04-05 15:33:11.638   321   321 I Gecko   : ###!!! [Parent][MessageChannel] Error: (msgtype=0x2C0076,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv
04-05 15:33:11.638   321   321 I Gecko   : 
04-05 15:33:11.798   321   321 E OomLogger: [Kill]: lowmem_shrink: convert oom_adj to oom_score_adj:
Attachment #8737401 - Flags: review+
(Reporter)

Updated

3 years ago
Blocks: 1262180
(Reporter)

Comment 20

3 years ago
Comment on attachment 8737401 [details] [diff] [review]
keyboard.patch v2

Review of attachment 8737401 [details] [diff] [review]:
-----------------------------------------------------------------

Ok, let's fix Necko in a follow up.
Attachment #8737401 - Flags: review+
(Reporter)

Comment 21

3 years ago
https://hg.mozilla.org/projects/pine/rev/3ded770346e7
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-pine
(Reporter)

Updated

3 years ago
Blocks: 1286190
You need to log in before you can comment on or make changes to this bug.