chatgpt-google-extension icon indicating copy to clipboard operation
chatgpt-google-extension copied to clipboard

when set extension site access to specific sites in chrome, we need add chat.openai.com in the list or it will encount cors error.

Open cjl3080434008 opened this issue 2 years ago • 7 comments

Is it a bug?

cjl3080434008 avatar Dec 05 '22 04:12 cjl3080434008

Is this an error message you encountered?

wong2 avatar Dec 05 '22 04:12 wong2

Access to fetch at 'https://chat.openai.com/api/auth/session' from origin 'chrome-extension://admendnbolgfafdbjdgdahlelnflpgia' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. background.js:440 Error: UNAUTHORIZED at getAccessToken (background.js:391:13) at async getAnswer (background.js:397:25) at async background.js:436:9

cjl3080434008 avatar Dec 05 '22 05:12 cjl3080434008

Have you logged in and been able to use https://chat.openai.com the web page to chat?

wong2 avatar Dec 05 '22 05:12 wong2

Yes and when I add the https://chat.openai.com/* to the specific sites it works.

cjl3080434008 avatar Dec 05 '22 06:12 cjl3080434008

Which field have you added it into? host_permissions?

wong2 avatar Dec 05 '22 06:12 wong2

I changed Extensions Detail > Site access > Allow this extension to read and change all your data on websites you visit from On all sites to On specific sites.

cjl3080434008 avatar Dec 05 '22 06:12 cjl3080434008

I was not able to make it work for specific sites (tried google.com) even after allowing chat.openai.com also. I also could not make it work setting on click. The extensions image background becomes white, and clicking it says: reload page to use this extension, even after reloading many times. (tested both in chrome and brave).

shacharhelmer avatar Dec 06 '22 10:12 shacharhelmer

I was not able to make it work for specific sites (tried google.com) even after allowing chat.openai.com also. I also could not make it work setting on click. The extensions image background becomes white, and clicking it says: reload page to use this extension, even after reloading many times. (tested both in chrome and brave).

I think you need specific the site like this https://chat.openai.com/*

cjl3080434008 avatar Dec 19 '22 18:12 cjl3080434008