Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.
Moderators: FranklinDM, Lootyhoof
-
RealityRipple
- Astronaut
- Posts: 663
- Joined: 2018-05-17, 02:34
- Location: Los Berros Canyon, California
Unread post
by RealityRipple » 2018-08-18, 05:44
One of the extension forks I maintain, Palesomething, has a leftover easter egg from Firesomething - about:firesomething, an "extended edition" excerpt from the Book of Mozilla. It doesn't seem to be working on PM 28, though. The code that handles it is
here. And the error message I'm getting is:
Code: Select all
A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise
Date: Fri Aug 17 2018 22:33:11 GMT-0700 (Pacific Standard Time)
Full Message: Component returned failure code: 0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED) [nsIWebNavigation.loadURIWithOptions]
Full Stack: JS frame :: chrome://global/content/bindings/browser.xml :: loadURIWithFlags/< :: line 157
JS frame :: chrome://global/content/bindings/browser.xml :: _wrapURIChangeCall :: line 50
JS frame :: chrome://global/content/bindings/browser.xml :: loadURIWithFlags :: line 156
JS frame :: chrome://browser/content/tabbrowser.xml :: loadURIWithFlags :: line 2815
JS frame :: chrome://browser/content/urlbarBindings.xml :: loadCurrent :: line 315
JS frame :: chrome://browser/content/urlbarBindings.xml :: continueOperation :: line 350
JS frame :: chrome://browser/content/urlbarBindings.xml :: handleCommand/< :: line 286
JS frame :: chrome://browser/content/urlbarBindings.xml :: _canonizeURL/< :: line 415
JS frame :: resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js :: process :: line 932
JS frame :: resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js :: walkerLoop :: line 813
JS frame :: resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js :: scheduleWalkerLoop/< :: line 747
I've noticed a lot of nested function methods don't work on ES6, so maybe that's what's doing it. Once I find a good backward compatible methodology for faking modules, I'll probably switch all the extensions I've made or ported to use it, but that tends to get a "undefined" or "not a function" error, whereas this seems to be related to the component registrar? I'm not really sure...
-
Moonchild
- Pale Moon guru
- Posts: 35640
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Unread post
by Moonchild » 2018-08-18, 05:46
RealityRipple wrote:I've made or ported to use it, but that tends to get a "undefined" or "not a function" error, whereas this seems to be related to the component registrar? I'm not really sure...
Full Message: Component returned failure code: 0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED) [nsIWebNavigation.loadURIWithOptions]
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
-
Isengrim
- Board Warrior
- Posts: 1325
- Joined: 2015-09-08, 22:54
- Location: 127.0.0.1
Unread post
by Isengrim » 2018-08-18, 11:04
The newChannel method in the nsIAboutModule interface has changed. I had to make this change in one of my add-ons:
Code: Select all
- newChannel: function(aURI) {
- let channel = Services.io.newChannel(ABOUTPAGE_URI, null, null);
+ newChannel: function(aURI, aLoadInfo) {
+ let uri = Services.io.newURI(ABOUTPAGE_URI, null, null);
+ let channel = Services.io.newChannelFromURIWithLoadInfo(uri, aLoadInfo);
+ channel.originalURI = aURI;
+ return channel;
a.k.a. Ascrod
Linux Mint 19.3 Cinnamon (64-bit), Debian Bullseye (64-bit), Windows 7 (64-bit)
"As long as there is someone who will appreciate the work involved in the creation, the effort is time well spent." ~ Tetsuzou Kamadani, Cave Story
-
RealityRipple
- Astronaut
- Posts: 663
- Joined: 2018-05-17, 02:34
- Location: Los Berros Canyon, California
Unread post
by RealityRipple » 2018-08-18, 17:45
Moonchild wrote:RealityRipple wrote:I've made or ported to use it, but that tends to get a "undefined" or "not a function" error, whereas this seems to be related to the component registrar? I'm not really sure...
Full Message: Component returned failure code: 0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED) [nsIWebNavigation.loadURIWithOptions]
I meant a function I had defined. loadURIWithOptions is part of the framework. Or was.
Last edited by RealityRipple on 2018-08-18, 17:45, edited 1 time in total.
-
RealityRipple
- Astronaut
- Posts: 663
- Joined: 2018-05-17, 02:34
- Location: Los Berros Canyon, California
Unread post
by RealityRipple » 2018-08-18, 18:25
Isengrim wrote:The newChannel method in the nsIAboutModule interface has changed. I had to make this change in one of my add-ons:
Code: Select all
- newChannel: function(aURI) {
- let channel = Services.io.newChannel(ABOUTPAGE_URI, null, null);
+ newChannel: function(aURI, aLoadInfo) {
+ let uri = Services.io.newURI(ABOUTPAGE_URI, null, null);
+ let channel = Services.io.newChannelFromURIWithLoadInfo(uri, aLoadInfo);
+ channel.originalURI = aURI;
+ return channel;
Still getting the same error with just that. You helped me find
this, though, so I'm sure I'll find my mistake. Thank you!
Edit: Yep, I was missing the getURIFlags function as well!
Last edited by RealityRipple on 2018-08-18, 18:42, edited 1 time in total.
-
Isengrim
- Board Warrior
- Posts: 1325
- Joined: 2015-09-08, 22:54
- Location: 127.0.0.1
Unread post
by Isengrim » 2018-08-18, 18:57
Glad to hear, and happy to help.
a.k.a. Ascrod
Linux Mint 19.3 Cinnamon (64-bit), Debian Bullseye (64-bit), Windows 7 (64-bit)
"As long as there is someone who will appreciate the work involved in the creation, the effort is time well spent." ~ Tetsuzou Kamadani, Cave Story