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

Creating calendar fails with error #9

Closed
ingomueller-net opened this issue Nov 16, 2018 · 11 comments
Closed

Creating calendar fails with error #9

ingomueller-net opened this issue Nov 16, 2018 · 11 comments
Labels
good first issue This is a good issue to start helping out at this project. help wanted Please help with this issues as the core developer does not have time

Comments

@ingomueller-net
Copy link
Owner

ingomueller-net commented Nov 16, 2018

Users are reporting to me that creation of calendars is broken. They get the following error at the end of the calendar creation dialogue:

[Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getIntPref]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: jar:file:///C:/Users/User/AppData/Roaming/Thunderbird/Profiles/fcqbcs51.stw/extensions/%7B4C9FE6FE-2C83-11DC-90B4-DC8456D89593%7D.xpi!/js/calThunderBirthDay.js :: MyLOG :: line 948" data: no]

The related line looks like this:

MyLOG.mVerbosity = Components.classes["@mozilla.org/preferences-service;1"]
                             .getService(Components.interfaces.nsIPrefService)
                             .getBranch("extensions.thunderbirthday.")
                             .getIntPref("verbosity");

At a first glance, it seems like getIntPref has changed and now throws an exception if the value does not exist. It probably needs a default parameter aDefaultValue, see documentation.

I do not have time to try it. Help would be greatly appreciated.

@ingomueller-net ingomueller-net added help wanted Please help with this issues as the core developer does not have time good first issue This is a good issue to start helping out at this project. labels Nov 16, 2018
@ingomueller-net
Copy link
Owner Author

ingomueller-net commented Nov 18, 2018

I have created a test version with .getIntPref("verbosity", 0);, but two users told me that that doesn't fix the problem. Can anyone confirm?

@ingomueller-net
Copy link
Owner Author

Also, it seems like the problem also occurs on already-existing calendars.

@ingomueller-net
Copy link
Owner Author

Could somebody who experiences the problem let me know what the configuration value of extensions.thunderbirthday.verbosity is? To do that, do the following:

  1. Open the config editor as described here.
  2. Type extensions.thunderbirthday.verbosity.
  3. Report below what value and what type the entry has (if present).
  4. Try to add it/change it to 0 of type integer and see whether the problem goes away.

@mbrohl
Copy link

mbrohl commented Nov 19, 2018

This seems to work for me (I had to remove the existing calendar and create a new one).

@ingomueller-net
Copy link
Owner Author

@mbrohl You set it to 0? What was the value before? Not present I assume?

@mbrohl
Copy link

mbrohl commented Nov 19, 2018

Yes, it was not present and I set it to 0.

@ingomueller-net
Copy link
Owner Author

Great, thanks for the confirmation! Meanwhile, another user has confirmed that this method works.

What I don't understand is why .getIntPref("verbosity", 0); does not work. Also, why isn't the value from user.js inserted at installation?

@ulln
Copy link

ulln commented Nov 19, 2018

Remove this line:

https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Default_Preferences

The actual file, despite having .js extension, is not a JavaScript file. You may not set variables inside of it, nor may do any kind of program flow control (ifs, loops etc.) nor even calculated values (i.e. 3600 * 24 * 5). Doing so will cause Mozilla to stop processing your preferences file without any notification, warning, error, or exception. Think of it more as an .ini file. Comments are perfectly acceptable.

@inklebott
Copy link

I've had the same problem today after Thunderbirthday updated yesterday (Tbird 52.5.0 on Linux Mint 18 Cinnamon)
Adding "extensions.thunderbirthday.verbosity 0" as above has fully restored functionality.
Thank you.

@ingomueller-net
Copy link
Owner Author

Thanks @ulln for the pointer! That did the trick :) Thanks everybody else for testing.

I created a new version. Once it has been reviewed, it should be available here.

@klemens
Copy link
Contributor

klemens commented Nov 27, 2018

Oops, sorry about that. preferences/install.js still contains "use strict";, although it currently works fine here (the description string is displayed correctly, maybe because it is not retrieved programmatically?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This is a good issue to start helping out at this project. help wanted Please help with this issues as the core developer does not have time
Projects
None yet
Development

No branches or pull requests

5 participants