Failed to load module resource://gre/modules/devtools/gcli/util/filesystem.js in Firefox for Android

NEW
Unassigned

Status

()

Firefox
Developer Tools: Graphic Commandline and Toolbar
3 years ago
a year ago

People

(Reporter: nalexander, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
Starting the debugger in Firefox for Android spews a Failed to load module error (log below).  This appears to be a problem requesting the "Home" directory.  This just doesn't make sense on Android at all, so I'm not sure what should be done.  Make it a lazy accessor?  Audit consumers and make them do better things on Android?

Code is at:

https://dxr.mozilla.org/mozilla-central/source/toolkit/devtools/gcli/source/lib/gcli/util/filesystem.js?from=filesystem.js#38

|adb logcat| output:

I Gecko(14969)                console.error: 
E GeckoConsole(14969)         [JavaScript Error: "Failed to load module gcli/types/file: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIProperties.get]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/gcli/util/filesystem.js :: <TOP_LEVEL> :: line 38"  data: no]"]
I Gecko(14969)                  Failed to load module gcli/types/file: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIProperties.get]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/gcli/util/filesystem.js :: <TOP_LEVEL> :: line 38"  data: no]
I Gecko(14969)                console.error: 
E GeckoConsole(14969)         [JavaScript Error: "@undefined:38:NaN
E GeckoConsole(14969)         @resource://gre/modules/devtools/gcli/util/filesystem.js:38:16
E GeckoConsole(14969)         @resource://gre/modules/devtools/gcli/util/fileparser.js:22:18
E GeckoConsole(14969)         @resource://gre/modules/devtools/gcli/types/fileparser.js:19:17
E GeckoConsole(14969)         @resource://gre/modules/devtools/gcli/types/file.js:40:18
E GeckoConsole(14969)         exports.createSystem/system.addItemsByModule/</options.loader@resource://gre/modules/devtools/gcli/system.js:166:20
E GeckoConsole(14969)         exports.createSystem/loadModule@resource://gre/modules/devtools/gcli/system.js:113:30
E GeckoConsole(14969)         exports.createSystem/system.load/promises<@resource://gre/modules/devtools/gcli/system.js:211:16
E GeckoConsole(14969)         exports.createSystem/system.load@resource://gre/modules/devtools/gcli/system.js:209:22
E GeckoConsole(14969)         GcliActor<._getRequisition@resource://gre/modules/devtools/server/actors/gcli.js:253:32
E GeckoConsole(14969)         GcliActor<.specs<@resource://gre/modules/devtools/server/actors/gcli.js:96:12
E GeckoConsole(14969)         actorProto/</handler@resource://gre/modules/devtools/server/protocol.js:1006:19
E GeckoConsole(14969)         DSC_onPacket@resource://gre/modules/devtools/server/main.js:1456:15
E GeckoConsole(14969)         DebuggerTransport.prototype._onJSONOb
I Gecko(14969)                  @undefined:38:NaN
I Gecko(14969)                @resource://gre/modules/devtools/gcli/util/filesystem.js:38:16
I Gecko(14969)                @resource://gre/modules/devtools/gcli/util/fileparser.js:22:18
I Gecko(14969)                @resource://gre/modules/devtools/gcli/types/fileparser.js:19:17
I Gecko(14969)                @resource://gre/modules/devtools/gcli/types/file.js:40:18
I Gecko(14969)                exports.createSystem/system.addItemsByModule/</options.loader@resource://gre/modules/devtools/gcli/system.js:166:20
I Gecko(14969)                exports.createSystem/loadModule@resource://gre/modules/devtools/gcli/system.js:113:30
I Gecko(14969)                exports.createSystem/system.load/promises<@resource://gre/modules/devtools/gcli/system.js:211:16
I Gecko(14969)                exports.createSystem/system.load@resource://gre/modules/devtools/gcli/system.js:209:22
I Gecko(14969)                GcliActor<._getRequisition@resource://gre/modules/devtools/server/actors/gcli.js:253:32
I Gecko(14969)                GcliActor<.specs<@resource://gre/modules/devtools/server/actors/gcli.js:96:12
I Gecko(14969)                actorProto/</handler@resource://gre/modules/devtools/server/protocol.js:1006:19
I Gecko(14969)                DSC_onPacket@resource://gre/modules/devtools/server/main.js:1456:15
I Gecko(14969)                DebuggerTransport.prototype._onJSONObjectReady/<@resour
(Reporter)

Comment 1

3 years ago
jryans: these types of tickets seem to be your bailiwick.  Can you redirect as appropriate?
Flags: needinfo?(jryans)
I'm going to guess it's another fallout from the GCLI runAt change...  Although the "home" export did not change recently, runAt might have caused it to run on Android where it did not before.

Making the "home" export lazy is likely enough to fix it, but we might need to trace the callers to be sure.
Component: Developer Tools: Debugger → Developer Tools: Graphic Commandline and Toolbar
Flags: needinfo?(jryans)
Nick, does this block the debugger from working, or it spews an error and keeps working anyway?
Flags: needinfo?(nalexander)
I think the best solution here is for toolkit/devtools/gcli/commands/index.js to say something like this around line 50:

    if (fennec) {
      exports.baseModules = exports.baseModules.filter(module => module != "gcli/types/file");
    }
(Reporter)

Comment 5

2 years ago
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #3)
> Nick, does this block the debugger from working, or it spews an error and
> keeps working anyway?

It appears to work after this.  I tested in both a custom Nightly build and the most recently available Developer Edition.
Flags: needinfo?(nalexander)
(In reply to Joe Walker [:jwalker] (overloaded - needinfo me or ping on irc) from comment #4)
> I think the best solution here is for
> toolkit/devtools/gcli/commands/index.js to say something like this around
> line 50:
> 
>     if (fennec) {
>       exports.baseModules = exports.baseModules.filter(module => module !=
> "gcli/types/file");
>     }

Let me update that as a result of bug 1166835:

     if (fennec || process !== childProcess) {
       exports.baseModules = exports.baseModules
                     .filter(module => module != "gcli/types/file");
     }
Duplicate of this bug: 1166835
You need to log in before you can comment on or make changes to this bug.