SalesforceLabs / survey-force

86 stars 62 forks source link

Issue for guest user #149

Open shalukumariCloudanalogy opened 1 year ago

shalukumariCloudanalogy commented 1 year ago

The error occurs "refused to connect". I'm giving all the access for objects, Fields, classes, and vf page, sometime its works successfully submitted the form for the Guest user but most of the time giving the error "refused to connect" and does not display the form. Can you please suggest any information regarding this issue?

surveyError
jrattanpal commented 1 year ago

Is this random? or happens all the time?

Can you create a sample survey and share the link? I can try and see what may happen. But without Apex debug logs, I can't say for certain.

Having said that, this seems like a generic issue. I have seen others report this and different settings worked for different orgs (unrelated to Survey Force).

https://www.google.com/search?q=salesforce+my.salesforce.com+refused+to+connect

shalukumariCloudanalogy commented 1 year ago

When loading of the survey fails post chat, an error message like "Refused to frame 'https://*force.com/ because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'none' " this issue occurs here. I'm giving CSP and cors domain sites.

jrattanpal commented 1 year ago

Are you iframing your site somewhere? I haven't used a force.com site in iFrame. There is a setting on the site that you need to enable to turn it on but it's been a while since I used it

This may hep: https://salesforce.stackexchange.com/questions/229231/use-salesforce-sites-page-in-an-iframe-on-external-site

shalukumariCloudanalogy commented 1 year ago

I'm giving only the survey form URL link in post-chat, But sometimes an error occurs like "refused to connect" I think the access issue which I missed. I'm giving all the access for objects, Fields, classes, vf page, CSP, and cors because the error occurs only for guest users. How can be resolved this issue ?

jrattanpal commented 1 year ago

You will need to capture debug logs for the guest user on your site when this issue happens. We can take a look at that and see what the error maybe. Without those logs, it's hard to guess what the issue is.

shalukumariCloudanalogy commented 1 year ago

I'm giving only the survey form URL link in post-chat, Actually when clicking the survey URLLink doesn't open that's why the class and vf page are not invoked therefore debug logs aren't captured.

jrattanpal commented 1 year ago

I wonder if the url to survey is correct. That could be the reason where url is wrong somehow. That would lead to a wrong site.

I can only help with survey force errors. For any issue with site, that will need to be investigated by someone

On Thu, Dec 1, 2022 at 2:26 AM shalukumari8368 @.***> wrote:

I'm giving only the survey form URL link in post-chat, Actually when clicking the survey URLLink doesn't open that's why the class is not invoked therefore debug logs aren't captured.

— Reply to this email directly, view it on GitHub https://github.com/SalesforceLabs/survey-force/issues/149#issuecomment-1333322646, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV6HLBYJVG5FWLMSFSJBLLWLBHLPANCNFSM6AAAAAASH3HVGY . You are receiving this because you commented.Message ID: @.***>

--

Jaswinder Rattanpal www.rattanpal.com