function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
HaxacoHaxaco 

Contact Viewer HTML5 app access problems on org

After watching the webinar on the mobile sdk I downloaded the Contact Viewer app from github and deployed the code to my free developer org but I keep getting "Failed to obtain access" message from the site. I followed the instructions on the readme to the point except

 

" 4. Lastly, you need to whitelist the instance URL on which your users will live. You can add that whitelist from Setup -> Security Controls -> Remote Site Settings"

 

Since I'm just doing this to self test its alright to skip this step, I really don't know the case where I would need to whitelist the URL.

 

Any ideas on that "Failed to obtain access" message would be amazing, since I really want to jump into the html5/hybrid app bandwagon with salesforce.

 

Thanks,

Best Answer chosen by Admin (Salesforce Developers) 
akhilesh_sfdcakhilesh_sfdc

You actually need to add https://na12.salesforce.com to remote sites if the user account, which you are using for login, is on NA12 instance.

All Answers

akhilesh_sfdcakhilesh_sfdc

Actually you do need to whitelist your instance url even if you are doing a self test with your own org. This is because of the current design of the contact viewer which enables it work against any user/org. There is another (much simpler) version of contact viewer in works that will not require this whitelist step but would only work for users of the org having the code deployed.

 

Let me know if you still run into issues.

 

Thanks,

HaxacoHaxaco

Thanks for the prompt reply!

 

I tried adding the site url (http://haxaco-developer-edition.na12.force.com/app) to remote site settings, even then I still get the failed to obtain access error. Login is enabled for the site.

 

Any other pointers? I'd like to stick with this version of the app as I could play with the code and possibly deploy some variations of it to test out on my org.

akhilesh_sfdcakhilesh_sfdc

You actually need to add https://na12.salesforce.com to remote sites if the user account, which you are using for login, is on NA12 instance.

This was selected as the best answer
HaxacoHaxaco

Yep that was it! Thank you

nbhimasnbhimas

Hi ,

 

I am also  getting similar error: "Server Unavailable" Check network connection.

I have whitelisted the org in the remote settings. Can somebody please help?

 

Regards,

Narayan