MozillaZine

chrome.manifest content directive problem

Talk about add-ons and extension development.
BeginnerDeveloper
 
Posts: 8
Joined: July 13th, 2017, 12:48 am

Post Posted July 13th, 2017, 1:39 am

Hello, as my nickname says I'm a beginner in all of this.
I received a task to create an extension for Thunderbird but I can't even begin work on it because it does not work at all.
I tried (I know it says it is out-dated but I have no other source of information):
https://developer.mozilla.org/en-US/Add ... _extension
and
https://developer.mozilla.org/en-US/doc ... bar_button .
Every time pretty much the same error appears:
JS Error Message Box(or whatever the name of it is) says: Ignoring unrecognized chrome manifest directive '´╗┐content'. 1 chrome.manifest:1
next message: No chrome package registered for chrome://myfirstext/content/myhelloworld.xul .
I will be very grateful if you guys would help me with this one.

lithopsian
 
Posts: 3663
Joined: September 15th, 2010, 9:03 am

Post Posted July 14th, 2017, 3:30 am

Your chrome.manifest file is not in a valid format. It might help to post your chrome.manifest file.

BeginnerDeveloper
 
Posts: 8
Joined: July 13th, 2017, 12:48 am

Post Posted July 20th, 2017, 2:30 am

lithopsian wrote:Your chrome.manifest file is not in a valid format. It might help to post your chrome.manifest file.

I created this file with windows' notepad. I set encoding to UTF-8 and saved it as any file type, just put "chrome.manifest" as the name of file.
Then when I read your post I tried to create .manifest file with VS2015 and just replace the code. It did not help either.
This what I copied from tutorial and put in this file:
content myfirstext content/
overlay chrome://messenger/content/messenger.xul chrome://myfirstext/content/myhelloworld.xul

I've no idea why it does not work.

morat
 
Posts: 2447
Joined: February 3rd, 2009, 6:29 pm

Post Posted July 20th, 2017, 5:15 am

I got a simple commandline extension working here. No problems.

viewtopic.php?f=19&t=3021875

I created the files with Microsoft Notepad. I saved the files as text documents.

Thunderbird 52.2.1
Windows 7 SP1 32-bit

P.S.

Perhaps, there is an odd character in the chrome.manifest file.

Unicode code converter (paste text in the green box and convert)
http://r12a.github.io/apps/conversion/

Edit:

Sorry, I only tested ANSI not UTF-8 with Microsoft Notepad.
Last edited by morat on July 22nd, 2017, 6:42 am, edited 1 time in total.

lithopsian
 
Posts: 3663
Joined: September 15th, 2010, 9:03 am

Post Posted July 20th, 2017, 1:39 pm

There is a known problem with UTF-8 files having a BOM, which is exactly what notepad does. So don't do that. notepad++ can save files without a BOM, which should work. Or just don't save as UTF-8.

BeginnerDeveloper
 
Posts: 8
Joined: July 13th, 2017, 12:48 am

Post Posted July 21st, 2017, 12:04 am

lithopsian wrote:There is a known problem with UTF-8 files having a BOM, which is exactly what notepad does. So don't do that. notepad++ can save files without a BOM, which should work. Or just don't save as UTF-8.

Thank you very much! The solution was so simple!

morat wrote:I got a simple commandline extension working here. No problems.

viewtopic.php?f=19&t=3021875

I created the files with Microsoft Notepad. I saved the files as text documents.

Thunderbird 52.2.1
Windows 7 SP1 32-bit

P.S.

Perhaps, there is an odd character in the chrome.manifest file.

Unicode code converter (paste text in the green box and convert)
http://r12a.github.io/apps/conversion/

Thank you! I'll check it out.

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 2 guests