mozilla-extensions / firefox-voice

Firefox Voice is an experiment in a voice-controlled web user agent
Mozilla Public License 2.0
286 stars 122 forks source link

Error displayed in "Doorhanger" for "Open homepage" command #816

Open alexandra-martin opened 4 years ago

alexandra-martin commented 4 years ago

Prerequisites:

Mic permission are enabled. "Allow" or "Don't Allow" button from “Allow Firefox Voice to Collect Voice Transcriptions” pop-up needs to be clicked. Command needs to be done in a tab, other than "Welcome to Firefox Voice".

STR:

  1. Use the shortcut or click on the mic icon from the browser toolbar.
  2. Say or write an "Open homepage" command.

Expected result:

The homepage is displayed without issues.

Actual result:

An "Internal error: Error: Illegal URL: about:home" error is displayed in the "Doorhanger".

Notes:

Reproduced on Mac 10.14.6 and Win10x64 with Firefox Nightly 73.0a1 (64-bit).

2

maitrella commented 4 years ago

I'll try to fix it as soon I figure out how to open about:home in a tab if no homepage urls are defined in Firefox settings.

maitrella commented 4 years ago

@ianb any suggestion will be welcome. Maybe about:home is privileged URL and can't be opened in a tab.

ianb commented 4 years ago

Ah... yeah, this is going to be a tough one. It's going to require some privileged code, which up until now we haven't had. This is kind of the pattern for opening a privileged page (this code is for opening about:reader URLs): https://github.com/ianb/sticky-reader-mode/blob/master/addon/experiment/api.js

We'll need to have privileged code for other things too, so I'll probably start to set this up come January (I'll be on vacation for two weeks).

maitrella commented 4 years ago

Thanks for the information. Enjoy your vacations!.

Simpcyclassy commented 4 years ago

@maitrella was this fixed? Please I will love to see what fixed it.

ianb commented 4 years ago

@Simpcyclassy I believe this is only partially fixed. Actually fixing it will be a bit harder, involving updating api.js which is privileged Firefox code. Otherwise we're not allowed to navigate to about:home

Simpcyclassy commented 4 years ago

This is an exciting project for me already, I love to delve deeper as I get a higher understanding of how everything works.

vandnakapoor19 commented 4 years ago

@ianb I'd like to check this issue.