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

Doesn't work with TB 60.3.3 on Windows 7 #24

Closed
neon-dev opened this issue Dec 14, 2018 · 9 comments
Closed

Doesn't work with TB 60.3.3 on Windows 7 #24

neon-dev opened this issue Dec 14, 2018 · 9 comments

Comments

@neon-dev
Copy link

neon-dev commented Dec 14, 2018

It installs just fine, but none of its functions work.
There's no tray icon even when configuring it to always show and minimizing doesn't behave differently either.
If I set it to minimize on close, Thunderbird just exits like normally. It doesn't seem like the addon is active, even though the config window shows up.
Am I missing something?

Environment:

  • OS: Windows 7 x64
  • Thunderbird 60.3.3
  • MinimizeToTray Reanimated Version 1.4.7
@neon-dev
Copy link
Author

neon-dev commented Dec 14, 2018

Ok I just found out how to open the console in Thunderbird.
Here's the output:

mintrayr - extension path:  ///Server/[…]/extensions/[email protected]  trayservice.jsm:66:5
mintrayr - extraction path:  ///Server/[…]/extensions/mintray-reanimated@ysard  trayservice.jsm:72:5
NS_ERROR_FILE_UNRECOGNIZED_PATH: Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.initWithPath]  trayservice.jsm:78
	_directory< resource://mintrayr/trayservice.jsm:78:5
	<anonym> resource://mintrayr/trayservice.jsm:51:21
	<anonym> resource://mintrayr/mintrayr.jsm:10:1
	<anonym> chrome://mintrayr/content/messenger/messenger.js:14:5

Seems like it doesn't handle correctly being load from a network drive. My whole profile folder is located on this drive.

@ysard
Copy link
Owner

ysard commented Dec 16, 2018

Thanks for your feedback, you are the first user to use a profile on a network drive.
The path to your profile does not contain a drive letter?
Could you give me the path that allows you to reach your profile (without sensitive data)?
Is it:
//Server/[...]/extensions/[email protected]
with 2 leading slashs?

@neon-dev
Copy link
Author

neon-dev commented Dec 16, 2018

Thanks for looking into it. Path= in profiles.ini starts with A:\, so it is configured with a drive letter. The console output seems to just print the resolved path.
Also interesting to you may be that the configured path contains spaces. Otherwise there are no special characters in it.

@sonaux
Copy link

sonaux commented Jan 2, 2019

I am using network share too and extension does not work. (previous "revived" version worked well until TB60.x)
Thunderbird 60.4.0
Windows 10 x64
profile.ini:

Name=natalia
IsRelative=0
Path=\\fs\mail\natalia
Default=1

Console output:

mintrayr - extension path:  ///fs/mail/natalia/extensions/[email protected]  trayservice.jsm:66:5
NS_ERROR_FILE_UNRECOGNIZED_PATH: Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.initWithPath]  trayservice.jsm:78
mintrayr - extraction path:  ///fs/mail/natalia/extensions/mintray-reanimated@ysard  trayservice.jsm:72:5

I looked into code and saw that nsLocalFile::InitWithPath that called by nsIFile.initWithPath actually supports UNC paths, but backslashes in input string are converted into forward slashes and that causes error.
Maybe this code in function fixPath

    if (/^\/[A-Z]:\//.test(path)) { // detect if this is broken windows path: '\C:\xxx'
        path = path.substring(1, path.length); // remove leading slash
        path = path.replace(/\//g, '\\'); // also convert slash to backslash
    }
    return path;

should convert slashes to backslashes not only in case of broken windows path: '\C:\xxx' but always do so?
At least this dirty hack does the trick on my config (did not test on regular c:\Users\xxx... or some relative paths) and extension is working fine:

    // fix path for windows
    path = path.replace(/\//g, '\\'); // also convert slash to backslash
    path = path.substring(1, path.length); // remove leading slash
    return path;

@sonaux
Copy link

sonaux commented Jan 3, 2019

Better fix:

    // fix path for windows
    if (/^\/[A-Z]:\//.test(path) || /^\/\/\//.test(path)) { // detect if this is broken windows path: '\C:\xxx' or UNC path '\\\server\share'
        path = path.substring(1, path.length); // remove leading slash
        path = path.replace(/\//g, '\\'); // also convert slash to backslash
    }
    return path;

Console output after fix:

mintrayr - extension path:  \\fs\mail\natalia\extensions\[email protected]  trayservice.jsm:66:5
mintrayr - extraction path:  \\fs\mail\natalia\extensions\mintray-reanimated@ysard  trayservice.jsm:72:5

@ysard
Copy link
Owner

ysard commented Jan 3, 2019

Hi, thank you for your patch, this should be fixed in the version 1.4.8:
https://github.com/ysard/mintrayr/releases

Regards.

@dougbreaux
Copy link

No XPI for the release?

@ysard
Copy link
Owner

ysard commented Jan 3, 2019

Sorry there was an error during the upload. It's OK now.

@ysard ysard closed this as completed Jan 3, 2019
@ysard ysard reopened this Jan 3, 2019
@neon-dev
Copy link
Author

neon-dev commented Jan 3, 2019

Works fine now, thanks :)

@neon-dev neon-dev closed this as completed Jan 3, 2019
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

4 participants