Venkman can't load script source for files loaded by mozIJSSubScriptLoader.loadSubScript

RESOLVED FIXED

Status

Other Applications
Venkman JS Debugger
--
critical
RESOLVED FIXED
9 years ago
7 years ago

People

(Reporter: dbo, Assigned: Fallen)

Tracking

({regression})

Trunk
regression

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

9 years ago
I am having (relatively new) issues with venkman not loading scripts outside the components/ directory in lightning; some are hosted in js/. The scripts are properly executed and listed (lightning works etc), but clicking them in venkman raises errors like:

Error loading URL
<file:/Users/dbo/profiles/thunderbird/mst/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calItemModule.js
->
file:///Users/dbo/profiles/thunderbird/mst/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/js/calAttendee.js>:
[Exception... "Component returned failure code: 0x80520012
(NS_ERROR_FILE_NOT_FOUND) [nsIChannel.asyncOpen]" nsresult: "0x80520012
(NS_ERROR_FILE_NOT_FOUND)" location: "JS frame ::
chrome://venkman/content/venkman-url-loader.js :: loadURLAsync :: line 79"
data: no].

It seems this is related to bug 418356, and bug 418356 comment #67 suggested I should file a bug on venkman for that. I can reproduce it with lightning 0.8, thus can exclude a recent change in lightning has caused it.
(Reporter)

Comment 1

9 years ago
Leave me a note if I can in any way help on this bug, because it's really hindering my works on lightning.
(Reporter)

Comment 2

9 years ago
For reference: Debugging lightning 0.9pre on Thunderbird 2.0.0.14 works while Thunderbird 2.0.0.16 doesn't.
(Reporter)

Comment 3

9 years ago
- does also happen on Thunderbird 1.9.1 builds (Shredder etc)
- not related to Mac only (at least Linux shows this, too)

Can we please get more traction on this bug?
Severity: major → critical
OS: Mac OS X → All
Hardware: Macintosh → All
Version: 1.8 Branch → unspecified

Comment 4

9 years ago
(In reply to comment #3)
> - does also happen on Thunderbird 1.9.1 builds (Shredder etc)
> - not related to Mac only (at least Linux shows this, too)
> 
> Can we please get more traction on this bug?

Unfortunately, I was away for several months (July/August), and somehow missed this bug when going through bugmail. Additionally, I'm currently moving from .nl to London, UK, so I'm just a little bit busy. It should be easier in a week or two. I don't know anyone else still actively working on Venkman except perhaps Alex Vincent, WeirdAl on IRC. Or Karsten Düsterloh (Mnyromyr).
(Assignee)

Comment 5

9 years ago
Not sure this is related to venkman directly, from debugging venkman a bit it seems even the debugger service provides the URL with "->" in it to venkman.

I guess an ugly hack would be to fix venkman to filter out the correct url if it contains a " -> ". I don't know if its required by something else that jsds returns the url like that, but otherwise the fix is obviously there.

I also notice this type of url when there are error console messages coming from a such file.
(Assignee)

Comment 6

9 years ago
Caused by the patch for bug 418356.
Depends on: 418356
Keywords: regression
(Assignee)

Comment 7

9 years ago
Created attachment 341288 [details] [diff] [review]
Possible hack - v1

In case the ugly hack is the way to go, from shallow testing this patch seems to fix it.

Comment 8

9 years ago
Hrm. I'm not sure this is the right patch. The URL of course gets used in many other places. I haven't investigated if those places should use the url as such (as some kind of identifier?) or if it would be OK to change the URL, say, in the constructor? The latter would ideally be the best hack we can pull, I think.

What does ChromeBug do? (CC-ing JJB)

Comment 9

9 years ago
Actually, the same point should probably have a hackaround for bug 358286...

Comment 10

9 years ago
I'm not sure what the issue is here, but both this bug and bug 358286 involve file: URLs. The following comment in Firebug from Joe Hewitt might be helpful, 
    // For some reason, JSD reports file URLs like "file:/" instead of "file:///", so they
    // don't match up with the URLs we get back from the DOM

Updated

8 years ago
Duplicate of this bug: 509210

Comment 12

8 years ago
Sorry for not finding this bug (instead of filing Bug 509210), and thanks for your workaround, Philipp!

Updated

8 years ago
Summary: Venkman not loading scripts outside components directory → Venkman can't load script source for files loaded by mozIJSSubScriptLoader.loadSubScript
Version: unspecified → Trunk
(Assignee)

Comment 13

7 years ago
Created attachment 454915 [details] [diff] [review]
Fix - v2

I'd like to get this fixed, or at least hacked. I've had this patch applied for quite some time now, and I honestly don't know how apps that chromebug doesn't support yet manage debugging.

This patch takes care by fixing up the url in the url-loader, which is probably the one and only interface such urls will pass through.
Assignee: rginda → philipp
Attachment #341288 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #454915 - Flags: review?(gijskruitbosch+bugs)

Comment 14

7 years ago
Comment on attachment 454915 [details] [diff] [review]
Fix - v2

Seeing as nobody seems to be implementing a better way to deal with this, r=me.
Attachment #454915 - Flags: review?(gijskruitbosch+bugs) → review+
(Assignee)

Comment 15

7 years ago
Pushed to venkman <http://hg.mozilla.org/venkman/rev/007abfa3da81>
-> FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.