extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Getting an error when opening "New Tab"

Open ryan6416 opened this issue 4 years ago • 2 comments

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

  1. open Raycast
  2. type in "New Tab"
  3. as soon as I press enter 1-2 seconds later I get below image

The current behavior

when I go to "New Tab" image

I instantly get this screen/message: image

The expected behavior

I should be able to enter a query and open a new tab

Raycast version

Version: 1.28.0

ryan6416 avatar Feb 13 '22 00:02 ryan6416

@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!

ron-myers avatar Feb 14 '22 02:02 ron-myers

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.

stale[bot] avatar Apr 13 '22 01:04 stale[bot]