Closed
Bug 560802
Opened 14 years ago
Closed 14 years ago
Errors after installing XPI produced by `cfx xpi` with empty 'tests' folder
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: erikvvold, Assigned: myk)
References
()
Details
Attachments
(3 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) Build Identifier: When I build a xpi with the jetpack sdk using the context menu module, the menu item is not added to the page, but it is when I use 'cfx run'. Reproducible: Always Steps to Reproduce: 1. clone http://github.com/erikvold/view-page-source-in-tab-jetpack 2. run 'cfx run -a firefox' with jetpack sdk, right click on a page, notice the "View Page Source in Tab" page context menu item is visible. Now close the opened firefox window. 3. run 'cfx xpi' then install the xpi to a blank firefox profile, notice that the menu item is no longer available. Actual Results: The menu item is no longer available when you install a built xpi, but works when running 'cfx run'. Expected Results: I should see the menu item as it is when using 'cfx run'.
Comment 1•14 years ago
|
||
Sorry about that Erik. Thanks for trying out the RC and reporting on it. I'm not able to reproduce this bug, though. I followed these steps. (I don't mean to be patronizing with all the detail; I'm including it in case the slight differences from your steps are important.) 1. Downloaded your package by clicking on the Download Source link on the Github page you linked to. I got a gzipped tarball at this link: http://github.com/erikvold/view-page-source-in-tab-jetpack/archives/master 2. Untarred the package. 3. Switched to my SDK directory, ran source bin/activate, switched back to your package's directory. 4. ran |cfx -a firefox -b my_path_to_firefox run|, and the item showed up in the context menu as expected. 5. ran cfx xpi, got an XPI. 6. Started Firefox from the command line with the -P switch. Made a new profile. Started Firefox with the new profile. Opened the add-ons manager, dragged the XPI to the Extensions tab. Restarted Firefox, and the item showed up in the context menu as expected. I tried with Firefox 3.6.3, 3.6.5pre, and 3.7a5pre, all on OS X. I'll try in my Windows VM and report back. Dumb question: If you don't set a context when you create an item, the page context is assumed. You have to click on a non-interactive part of the page to activate the page context, like a blank spot or plain text. Basically any spot that brings up the context menu with the Back, Forward, Reload, and Stop items. Clicking on a link or image or while text is selected for example won't trigger it. Is it possible you didn't trigger it when you tested the XPI?
Hey, this issue is repeatable for me, your steps seem fine however.. Can you try the attached xpi that I've built when you have a chance?
> You have to click on a non-interactive part of the page to
activate the page context, like a blank spot or plain text. Basically any spot
that brings up the context menu with the Back, Forward, Reload, and Stop items.
Clicking on a link or image or while text is selected for example won't
trigger it. Is it possible you didn't trigger it when you tested the XPI?
No, I'm clicking on the blank space under the text at erikvold.com, it works when I `cfx run` and not when I use the xpi generated from `cfx xpi`, like the xpi attached should display.
I wonder if my xpi is different than yours because I'm building on windows and you're probably using linux.. I'll try a build on mac, and ubuntu shortly..
Comment 6•14 years ago
|
||
Thanks Erik. Yeah, something's wrong with the XPI. This is dumped to my text console when I start Firefox after installing it: Error: directory not found: /Users/adw/Library/Application Support/Firefox/Profiles/pq8mpml0.tmp5/extensions/view_source_in_tab@erikvold.com/resources/9e562309-9aaa-4d24-a8a7-29465adc0178-view-page-source-in-tab-tests (file:///Users/adw/Library/Application%20Support/Firefox/Profiles/pq8mpml0.tmp5/extensions/view_source_in_tab@erikvold.com/components/harness.js:133) stack: Error("directory not found: /Users/adw/Library/Application Support/Firefox/Profiles/pq8mpml0.tmp5/extensions/view_source_in_tab@erikvold.com/resources/9e562309-9aaa-4d24-a8a7-29465adc0178-view-page-source-in-tab-tests")@:0 ensureIsDir([object XPCWrappedNative_NoHelper])@file:///Users/adw/Library/Application%20Support/Firefox/Profiles/pq8mpml0.tmp5/extensions/view_source_in_tab@erikvold.com/components/harness.js:133 buildLoader()@file:///Users/adw/Library/Application%20Support/Firefox/Profiles/pq8mpml0.tmp5/extensions/view_source_in_tab@erikvold.com/components/harness.js:156 ()@file:///Users/adw/Library/Application%20Support/Firefox/Profiles/pq8mpml0.tmp5/extensions/view_source_in_tab@erikvold.com/components/harness.js:257 Harness_load()@file:///Users/adw/Library/Application%20Support/Firefox/Profiles/pq8mpml0.tmp5/extensions/view_source_in_tab@erikvold.com/components/harness.js:276 Harness_observe(null,"app-startup",null)@file:///Users/adw/Library/Application%20Support/Firefox/Profiles/pq8mpml0.tmp5/extensions/view_source_in_tab@erikvold.com/components/harness.js:303
Comment 7•14 years ago
|
||
Atul, Erik has attached an XPI produced from cfx xpi that causes some errors to be dumped to text console on the first restart after installation (see comment 6). The extension doesn't work. Do you know what might be going on? Erik, it's strange that if you follow my steps it works OK, so is it possible to be any more specific about your steps in running cfx xpi?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Jetpack SDK context menu module not working when I build xpi → Errors after installing XPI produced by cfx xpi, extension unusable
These are my steps: C:\Documents and Settings\erikvold>cd \temp C:\temp>hg clone http://hg.mozilla.org/labs/jetpack-sdk/ destination directory: jetpack-sdk requesting all changes adding changesets adding manifests adding file changes added 538 changesets with 1332 changes to 492 files updating to branch default 235 files updated, 0 files merged, 0 files removed, 0 files unresolved C:\temp>cd jetpack-sdk C:\temp\jetpack-sdk>bin\activate Welcome to the Jetpack SDK. Run 'cfx docs' for assistance. (C:\temp\jetpack-sdk) C:\temp\jetpack-sdk>cd \github\view-source-in-tab-jetpack (C:\temp\jetpack-sdk) C:\github\view-source-in-tab-jetpack>cfx run -a firefox OK Total time: 16.844000 seconds Program terminated successfully. (C:\temp\jetpack-sdk) C:\github\view-source-in-tab-jetpack>cfx xpi Exporting extension to view-page-source-in-tab.xpi.
Reporter | ||
Comment 10•14 years ago
|
||
Built with Jetpack SDK 0.3 on osx (not winXP).
Comment 11•14 years ago
|
||
OK, the problem is that harness-options.json in the bad XPI references the test directory, but the test directory doesn't exist in the XPI. The good XPI doesn't have the references. So the question is why are those references there?
Reporter | ||
Comment 12•14 years ago
|
||
Ah, I have an empty 'tests' folder on my machine, and that is probably why there is a reference to it.
Comment 13•14 years ago
|
||
Great. Does removing the folder fix the problem? If so, would you mind if I mark this bug RESOLVED WORKSFORME and file two new bugs in its place that say something like: 1. cfx xpi should skip or warn about directories that are empty or otherwise broken 2. Errors when loading a XPI should be more visible
Summary: Errors after installing XPI produced by cfx xpi, extension unusable → Errors after installing XPI produced by `cfx xpi` with empty 'tests' folder
Reporter | ||
Comment 14•14 years ago
|
||
Sure. Another option is to include the empty folder, I added the folder that was missing to the xpi, then re-installed it and that worked.
Reporter | ||
Comment 15•14 years ago
|
||
> Does removing the folder fix the problem?
Yes
Comment 16•14 years ago
|
||
(In reply to comment #14) > Another option is to include the empty folder Good point. (In reply to comment #13) > 1. cfx xpi should skip or warn about directories that are empty or otherwise > broken This bug describes the problem well enough, especially after you changed the name to better reflect it, so let's leave it open and use it. > 2. Errors when loading a XPI should be more visible Filed bug 561001.
Assignee | ||
Comment 17•14 years ago
|
||
Taking, as I have a fix for this.
Assignee: nobody → myk
Status: NEW → ASSIGNED
OS: Windows XP → All
Hardware: x86 → All
Assignee | ||
Comment 18•14 years ago
|
||
It's not clear whether or not |cfx xpi| should include empty directories in the list of resources. But certainly it should include those directories in the XPI if it includes them in the list of resources. This patch does that.
Attachment #446986 -
Flags: review?(avarma)
Comment 19•14 years ago
|
||
Comment on attachment 446986 [details] [diff] [review] patch v1: creates empty directories listed as resources Looks good, thanks!
Attachment #446986 -
Flags: review?(avarma) → review+
Assignee | ||
Comment 20•14 years ago
|
||
Dietrich: this would be handy to land for 0.4; folks seem to trip up on it occasionally, and although it's trivial to work around, it's hard to figure out what the problem is (and thus the work around). Can I land this for 0.4?
Comment 21•14 years ago
|
||
yep, a=me!
Assignee | ||
Comment 22•14 years ago
|
||
https://hg.mozilla.org/labs/jetpack-sdk/rev/9ed371412f69
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 23•14 years ago
|
||
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product. To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
Version: 0.3 → unspecified
You need to log in
before you can comment on or make changes to this bug.
Description
•