SalesforceLabs / survey-force

86 stars 62 forks source link

Authorization error message #127

Closed jacbrt11 closed 2 years ago

jacbrt11 commented 3 years ago

Hi, I have followed all the steps to give access to guest user but i am still getting an authorization error message when trying to access my site publicly. However, i am unsure if i need to create an experience site and associate it to my force.com site domain? Am i able to set up a public force.com without creating an experience?

jrattanpal commented 3 years ago

Yes, you should be able to create a public force.com site.

Please make sure to go through ALL of the steps listed at https://github.com/SalesforceLabs/survey-force as well as update your code to the listed from this repo.

All the (new and old) configuration steps as well as upgrade options are listed in that guide. We have often found that a missed step can cause these issues. If you still face this error then please capture debug logs and attach here.

jacbrt11 commented 3 years ago

I am sure i have followed all the steps. Only thing is i haven't created a community (is this neccessary)? I installed this 2 weeks ago so would i have to still update the code?

When i open the VF page i can see the error:

Exception type: class common.apex.runtime.impl.ExecutionException Exception msg: Argument cannot be null. Stack trace: common.apex.runtime.impl.ExecutionException: Argument cannot be null.

Again, if i open the preview of this Active Site Home Page, we are getting the error 'Argument cannot be null'.

jrattanpal commented 3 years ago

If you want to expose this in community then you have to create one (but we haven't tested it on a community). If you want to expose this on Force.com site then yhou have to create that.

The argument null is because it needs survey ID in the url (like TakeSurvey?id=[SURVEY ID]). Are you giving it a survey to open?

SamindaYapa commented 2 years ago

Hi, We have installed and followed all the pre installation steps give but I am still getting an authorization error message when trying to access my site publicly.

jrattanpal commented 2 years ago

Can you capture and share the apex debug log? It should tell you what the error is.

SamindaYapa commented 2 years ago

Can you capture and share the apex debug log? It should tell you what the error is.

. guest user logs are getting generated and getting below error.

surveyId = String.escapeSingleQuotes(surveyId);

image

SamindaYapa commented 2 years ago

Can you capture and share the apex debug log? It should tell you what the error is.

Hi, do you have a update on this issue? I have attached the error above. please let me know if you need any other information.

jrattanpal commented 2 years ago

(Off for holidays hence delayed)

That error means that you are not supplying survey ID in the URL. When you open Survey, it should look something like TakeSurvey?id=[Survey ID}

Because that ID is missing, it's failing

SamindaYapa commented 2 years ago

We are passing right survey id as well, https://sossurveynextgen.secure.force.com/TakeSurvey?id=a1i1r000005nhQX&cId=0037a00001XpQHsAAN&soId=08p7a000004UVzAAAW

jrattanpal commented 2 years ago

Is there another error log?

If you are supplying that ID then it should work.

It could also be that survey is not visible to guest user. Can you confirm that you created all sharing rules for guest users and added all CRUD/FLS permissions?

SamindaYapa commented 2 years ago

Hi, We have created all sharing rules for guest users but it's still not working, is there a possibility to have a 30min call with you and discuss. please let us know. Thank you

jrattanpal commented 2 years ago

We can meet for30 mins. You can DM me on Trailblazer.salesforce.com and we I can send you times that work.