extensions
extensions copied to clipboard
Getting an error when opening "New Tab"
Extension – Google Chrome
Author: @rgomezcasas
Description
Error:
TypeError: Invalid URL
vu:google-chrome-new-tab.js:46:1585
---
43: set index of window (${n.windowsIndex} as number) to (${n.windowsIndex} as number)
44: set active tab index of window (${n.windowsIndex} as number) to (${n.tabIndex} as number)
45: end tell
46: `)}function lo(){let[n,o]=(0,Je.useState)(),{isLoading:c,error:u,entries:d}=uo(n),{useOriginalFavicon:i}=(0,P.getPreferenceValues)(),[p,w]=(0,Je.useState)({});async function x(g){let A=await pu(i);g&&(A=A.filter(function(L){return L.title.toLowerCase().includes(g.toLowerCase())||L.urlWithoutScheme().toLowerCase().includes(g.toLowerCase())})),w({tabs:A})}return(0,Je.useEffect)(()=>{x(null)},[]),u&&(0,P.showToast)(P.ToastStyle.Failure,"An Error Occurred",u.toString()),_jsx(P.List,{onSearchTextChange:function(g){o(g),x(g)},isLoading:c,throttle:!1},_jsx(P.List.Section,{title:"New Tab",key:"new-tab"},_jsx(P.List.Item,{title:n?`Search "${n}"`:"Open Empty Tab",icon:{source:n?P.Icon.MagnifyingGlass:P.Icon.Plus},actions:_jsx(yu,{query:n})})),_jsx(P.List.Section,{title:"Open Tabs",key:"open-tabs"},p.tabs?.map(g=>_jsx(vu,{key:g.key(),tab:g,useOriginalFavicon:i}))),_jsx(P.List.Section,{title:"Recently Closed",key:"recently-closed"},d?.map(g=>_jsx(wu,{entry:g,key:g.id}))))}var yu=n=>{let o=n.query;return _jsx(P.ActionPanel,{title:"New Tab"},_jsx(P.ActionPanel.Item,{onAction:function(){hu(o)},title:o?`Search "${o}"`:"Open Empty Tab"}))},wu=n=>{let{url:o,title:c}=n.entry,u=n.entry.id.toString(),d=En(64,o);return _jsx(P.List.Item,{id:u,title:c,subtitle:o,icon:d,actions:_jsx(gu,{entry:n.entry})})},gu=n=>{let{title:o,url:c}=n.entry;return _jsx(P.ActionPanel,{title:o},_jsx(P.OpenInBrowserAction,{title:"Open in Tab",url:c}),_jsx(P.CopyToClipboardAction,{title:"Copy URL",content:c,shortcut:{modifiers:["cmd","shift"],key:"c"}}))};function vu(n){return _jsx(P.List.Item,{title:n.tab.title,subtitle:n.tab.urlWithoutScheme(),keywords:[n.tab.urlWithoutScheme()],actions:_jsx(_u,{tab:n.tab}),icon:n.useOriginalFavicon?n.tab.favicon:n.tab.googleFavicon()})}function _u(n){return _jsx(P.ActionPanel,{title:n.tab.title},_jsx(Su,{tab:n.tab}),_jsx(P.CopyToClipboardAction,{title:"Copy URL",content:n.tab.url}))}function Su(n){async function o(){await bu(n.tab),await(0,P.closeMainWindow)()}return _jsx(P.ActionPanel.Item,{title:"Open Tab",icon:{source:P.Icon.Eye},onAction:o})}module.exports=ds(xu);0&&(module.exports={});
47:
---
at ray-list-section
wc:index.js:24:20951
at ray-list
sn:index.js:24:20482
lo:google-chrome-new-tab.js:46:44
at ray-navigation-stack
bc:index.js:24:22698
eo:index.js:24:22803
jr:index.js:23:514
nA:index.js:1:5142
at ray-root
Mi:index.js:24:2094
Steps To Reproduce
- open Raycast
- type in "New Tab"
- as soon as I press enter 1-2 seconds later I get below

The current behavior
when I go to "New Tab"

I instantly get this screen/message:

The expected behavior
I should be able to enter a query and open a new tab
Raycast version
Version: 1.28.0
@ryan-efendy can you share the log by:
- following the instructions to copy the log from the action panel
- share that log here
will help us diagnose the issue.
Thanks!
This issue/pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs in the next 7 days to keep our backlog clean. Thanks for your contributions.