Closed Bug 1045919 Opened 11 years ago Closed 11 years ago

JavaScript Error: "TypeError: AppWindowManager.getActiveApp(...) is null" {file: "app://system.gaiamobile.org/js/activity_window_manager.js"

Categories

(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gkw, Assigned: gduan)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1037780 +++ Boot up the phone and go to `adb logcat` - after booting up, swipe left to go into the Camera app. On or around the time the permissions dialog comes up - I chose not to share but also not remember this setting, the following JS error comes up: E/GeckoConsole( 289): [JavaScript Error: "TypeError: AppWindowManager.getActiveApp(...) is null" {file: "app://system.gaiamobile.org/js/activity_window_manager.js" line: 107}] I/GeckoDump( 289): XXX FIXME : Got a mozContentEvent: activity-choice
Flags: needinfo?(alive)
$ ./check_versions.sh Gaia 295967a0b824a355ae9d57fb08f3632ed2ad18dd Gecko https://hg.mozilla.org/mozilla-central/rev/a4dcfbebcb58 BuildID 20140728040209 Version 34.0a1 ro.build.version.incremental=110 ro.build.date=Fri Jun 27 15:57:58 CST 2014 B1TC00011230
Alive, any idea what's happening here?
Sounds a bug. Could you take this one if you have no other blocker?
Component: Gaia → Gaia::System::Window Mgmt
Flags: needinfo?(alive) → needinfo?(gduan)
Assignee: nobody → gduan
Flags: needinfo?(gduan)
Attached file PR to master
I think the root cause is, when boot up device, activeApp has not been updated to homescreen, so, when getActiveApp() will give us null.
Comment on attachment 8464529 [details] [review] PR to master I forgot to set review flag. Hi Alive, could you help to check my solution here? Please let me know your idea. Thanks.
Attachment #8464529 - Flags: feedback?(alive)
Comment on attachment 8464529 [details] [review] PR to master After thinking, I tend to use alternative to fix all the scenario: AppWindowManager should always returns a appWindow reference. If getActive() is null then let's return homescreenLauncher.getHomescreen().
Attachment #8464529 - Flags: feedback?(alive)
Comment on attachment 8464529 [details] [review] PR to master Hi Alive, could you review it? Thanks.
Attachment #8464529 - Flags: review?(alive)
Comment on attachment 8464529 [details] [review] PR to master you NEED a test.
Attachment #8464529 - Flags: review?(alive) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: