docs.google.com refused to connect

1,674 views
Skip to first unread message

Jorge Forero

unread,
May 20, 2019, 11:29:34 AM5/20/19
to Google Apps Script Community
Hello. 

This is the scenario: I've created a Control Panel using GS and Bootstrap. In order to get some information from the user, I have created a spreadsheet with a sidebar that helps to do data conversions. Then, I've embed the spreadsheet into the Control Panel interface using an iframe. Until this point, so far so good.  But when the user call the sidebar, he gets the error: docs.google.com refused to connect (and from console: Refused to display '<URL>' in a frame because it set 'X-Frame-Options' to 'sameorigin', Document was loaded from Application Cache with manifest XXXX) I'm little lost with this error. Any ideas? Any help would be appreciated.  (I must say the sidebar works fine when the spreadsheet is not embed into the iframe.)

Eric Koleda

unread,
May 22, 2019, 9:08:54 AM5/22/19
to Google Apps Script Community
There was a change a while back to prevent add-ons from showing when the file is embedded within an iframe. This was done for security reasons and I don't think there is a workaround. You'll have to open the document in a new tab/window instead of embedding it if you want the add-on to function.

- Eric

Steve Webster

unread,
May 22, 2019, 9:27:51 AM5/22/19
to google-apps-sc...@googlegroups.com
Another alternative is an onEdit like a sheet cell with a dropdown and when that value changes fire off the function. Custom menu and custom functions may be other options. This works for mobile, too. You don't get the right-side bar UI you developed, but could get you to end goal. 

Kind Regards,

Steve Webster
SW gApps, President 
Google Product Expert in: Google Apps Script, Drive, and Docs 
Google Vendor (2012-2013) || Google Apps Developer Blog Guest Blogger 
Add-ons: Text gBlaster and Remove Blank Rows


--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/94a33897-4d8e-41ce-a433-50d0dc6a366c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jorge Forero

unread,
May 24, 2019, 12:47:06 PM5/24/19
to Google Apps Script Community
Eric, thanks for your answer. I think to open the document in a new tab solve the problem.

Greetings,
Jorge.

Jorge Forero

unread,
May 24, 2019, 12:50:45 PM5/24/19
to Google Apps Script Community
Steve, thanks for your answer.  I will explore the custom menu option.
Greetings,
Jorge.
Reply all
Reply to author
Forward
0 new messages