Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save selected to files don't work when path is too long or page not refreshed or something else #35

Closed
graad opened this issue Dec 18, 2012 · 7 comments

Comments

@graad
Copy link

graad commented Dec 18, 2012

This may work for issues #23 and #34
My add-on version 0.7.2012111301
Using Firefox 18 beta:

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0

I've selected 12 tabs and option "Save Selected Tabs in Archive as..".
Next, tabs where refreshed - probably automatically.
Next, I've selected 12 tabs and option "Save Selected fabs in files..".
which allowed 2 tabs at first.

When I've selected every tab one by one and assured that all were refreshed,
almost all tabs were saved.
The unsaved tabs addresses are:
{1} http://lgforum.pl/viewforum.php?f=29&sid=75427178be9481da60b52f18f9a5e6d4
{2} http://lgforum.pl/viewtopic.php?f=5&t=1806
At the moment, I'm not logged a that lgforum.pl forum.

When saved {1} tab, Error Console shows (all my add-ons where enabled)

Timestamp: 2012-12-18 12:04:32
Error: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFile.create]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: chrome://maf/content/collecting/persistResourceObject.js :: <TOP_LEVEL> :: line 129" data: no]
Source File: chrome://maf/content/saving/jobObject.js
Line: 361

When I disabled ALL add-ons(Safe Mode), I might found error source.

When saving pages {1} and {2}:
In original firefox 'Save Page As..' dialog, name of file,
derived probably from webpage title, is too long along with my system path, where I'm saving.
Also, file path for saved webpage files in webpage folder may be too long.
I would think people suffer from this error for long years, and mozilla's firefox don't have option
to automatically found and parse file paths(as long as they are on saving) and shorten file names or web folder name at least.

Propositions:

  • I would love to see your add-on to shortening website name to some sensible number of characters,
    like 30.
  • All saved tabs should be refreshed like one would do this by hand, one by one. Its the only way for saving to work?
@graad
Copy link
Author

graad commented Dec 18, 2012

Maximum path length limitation in Windows API is 259
http://msdn.microsoft.com/en-us/library/aa365247.aspx#maxpath
Also, "When using an API to create a directory, the specified path cannot be so long that you cannot append an 8.3 file name (that is, the directory name cannot exceed MAX_PATH minus 12)."

@graad
Copy link
Author

graad commented Dec 18, 2012

In short, this add-on allows saving multiple pages at once, automatically, but Firefox doesn't. Either this add-on or Firefox should have function to handle too long path names and unrefreshed tabs in this situation. Idea reported to Mozilla.

@piroor
Copy link
Owner

piroor commented Dec 20, 2012

The latest released version has some known issues around "Save Selected Tabs" feature. Does this problem appear with the latest experimental build? http://piro.sakura.ne.jp/xul/xpi/nightly/

@graad
Copy link
Author

graad commented Dec 21, 2012

Almost all tabs are saved perfectly and I can see them saved as they are loaded - wow, big improvement from previous situation. Now it works ok with all other handy addons!

Except it cannot load for this site(selection order doesn't matter, congrats):
http://lgforum.pl/viewtopic.php?f=5&t=1806

It shows "The download cannot be saved because an unknown error occured.
Please try again."

and it don't save the tab, because its title is too long.
(Due to Win API path length restriction)
When I save this tab alone with Multitab selection, standard error from firefox occurs:

"The path is too long.
Try a shorter name."

So, I imagine option: "Shorten too long site names to system path limitation".
That would be perfect.


I can see another thing to improve - when selecting multiple tabs
from left to right,
spreaded post right-arrow, maybe it should select them when they are showing, but it doesn't,
since cursor isn't over. (Hm, that would be tricky :)
(I know, I should press Shift)

Error Console(with all other handy addons, for selecting freely when holding Ctrl and saving with "Save selected .. files"):

Timestamp: 2012-12-21 21:05:16
Warning: XUL box for _moz_generated_content_before element contained an inline #text child, forcing all its children to be wrapped in a block.
Source File: chrome://browser/content/browser.xul
Line: 0
[xpconnect wrapped (nsISupports, nsIDocShell, nsIInterfaceRequestor, nsIWebNavigation, nsIWebProgress, nsIDocShellHistory, nsILoadContext)]
[object XULElement]
Timestamp: 2012-12-21 21:05:51
Warning: XUL box for _moz_generated_content_before element contained an inline #text child, forcing all its children to be wrapped in a block.
Source File: chrome://browser/content/browser.xul
Line: 0
Timestamp: 2012-12-21 21:06:22
Error: [Exception... "'JavaScript component does not have a method named: "onItemVisited"' when calling method: [nsINavBookmarkObserver::onItemVisited]" nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)" location: "native frame :: :: <TOP_LEVEL> :: line 0" data: no]
Timestamp: 2012-12-21 21:06:23
Error: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFile.create]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: chrome://maf/content/collecting/persistResourceObject.js :: <TOP_LEVEL> :: line 129" data: no]
Source File: chrome://maf/content/saving/jobObject.js

Line: 361

@Damienbarifon
Copy link

Try to long path tool. It is very helpful.

@Davehuu
Copy link

Davehuu commented Oct 28, 2015

I have the same issue when installing Chrome extensions. They fail with the note Path too long. Then google it and got Long Path Tool. This tool is resolve the issues.

@piroor
Copy link
Owner

piroor commented Mar 5, 2020

Outdated.

@piroor piroor closed this as completed Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@piroor @graad @Damienbarifon @Davehuu and others