-
Notifications
You must be signed in to change notification settings - Fork 30
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
TypeError: Cannot read property 'split' of undefined in Ubuntu #136
Comments
Hi, are you using the If you are using the class directly:
note: I no longer use that project, but I accept, review PRs and make new releases. |
I'm actually using the |
Is there a flag that allows to provide profile directory using the cli? According to the doc, the flag |
Yes. But anyway, after I fix the path, I end up with: this issue which is not related to your lib. The only thing that might be done in this lib is to update |
Happy that your (first) issue is solved. Good idea for |
Copy-pasting from mozilla/web-ext#2826 (comment): The error is in firefox-profile: firefox-profile-js/lib/profile_finder.js Lines 55 to 57 in 932b40e
When reading the file fails (e.g. due to it not existing), supposedly a callback should be called with the error. At line 56, the logic should not only invoke the callback with the error, but also return. Not returning results in the next line trying to parse non-existing content, which results in the error seen above. |
@Rob--W : you are right, I should fix that. I'll give it a try tonight. |
Hello, would it be ok if I provided a PR on this? I'd like to also provide support for the XDG spec in linux (https://bugzilla.mozilla.org/show_bug.cgi?id=1725011), but I'm not well versed in JS so it might be too amateurish. |
Of course, please do, no problem! If that makes you feel better, I wrote that package approximately one month after starting nodejs |
Actually, I opened a PR that should fix it (I hope you didn't spend to much time working on it already). Do you have an easy way on your end to test the fix? I do not heve an ubuntu environment. I can think of a couple of options to test it:
If it works, I'll publish a new package version (not sure where the firefox-profile version number will have to be updated then... in web-ext here I believe? |
version 4.6.0 published. Please let me know if you encounter any issue. |
The method
readProfiles
from the fileprofile_finder.js
seems to be looking forprofiles.ini
to the wrong place in Ubuntu.The file is located at
/home/<me>/snap/firefox/common/.mozilla/firefox/
in my computer, butthis.directory
is undefined during the execution, and, anyway, thelocateUserDirectory
would return/home/<me>/.mozilla/firefox
.The text was updated successfully, but these errors were encountered: