question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

windows.create() promise will never be fulfilled

See original GitHub issue

Snippet from this example: https://github.com/mdn/webextensions-examples/blob/master/window-manipulator/window.js#L28

let creating = browser.windows.create(createData);
  creating.then(() => {
  console.log("The normal window has been created");
});

I cant see console.log message while i am inspecting this extension.

I only see such messages:

Navigated to chrome://devtools/content/shared/webextension-fallback.html
Webconsole context has changed

It seems that this promise will never be fullfiled. Looks like a bug in WebExtensions API because examples from MDN don’t work too.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rplcommented, Nov 5, 2019

@rebloor I just closed Bug 1593504 as invalid because this behavior is expected, but we should also fix the window-manipulator example accordingly, see:

0reactions
rebloorcommented, Nov 25, 2019

Thanks @chrisdavidmills, I’ll probably go for duplicating as I would prefer to have a single definitive list.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fulfill (don't resolve) promise with another promise
This solution works if you already know that val is a promise. If you cannot make any assumptions about val 's type, then...
Read more >
windows.create() - Mozilla - MDN Web Docs
A Promise that will be fulfilled with a windows.Window object containing the details of the new window. This Window object will always have...
Read more >
JavaScript Promises: an introduction - web.dev
fulfilled - The action relating to the promise succeeded ... The JavaScript promises API will treat anything with a then() method as ...
Read more >
Implementing - Promises
var PENDING = 0; var FULFILLED = 1; var REJECTED = 2; function Promise() ... A promise must never be fulfilled with another...
Read more >
Working with promises in R
The promise library guarantees that only one of onFulfilled or onRejected will be called, never both. And a callback will never be invoked...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found