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
raghav.Mraghav.M 

Unable to start HTML 5 application from Workbook

Hi,

 

I have installed WAMP server on my laptop and deployed HTML5 application from Salesforce.com for Mobile workbook.

 

 

App location: 

C:\wamp\www\HTML5

 

Modified Login.js:

var clientId    = 'valid client key';

var redirectUri = 'http://localhost/HTML5/oauthcallback.html';

var proxyUrl    = 'http://localhost/HTML5/proxy.php?mode=native'; 

 

Problem:

========

After successful login I am not able to load the application. I am seeing spinning wheel "loading" .

 

Could someone help me. 

 

Thanks,

Rag

withamlawithamla

I am stuck in the same spot, however I am using a local apache server.  I have tried this on both a Windows/Apache setup and an iOS/Apache setup.  It looks like I am getting a response from the query to get albums, and the problem is occuring on the callback method back to the cloudtunes.js.  Any suggestions would be greatly appreciated.

cloudcodercloudcoder

double check the permissions on the proxy.php. They must be executable.

designdesign

try to add at begining of proxy.php

error_reporting(0);

 

clawtonclawton

I get the same thing.  Firebug indicates a problem with request to the proxy.  The GET url is http://localhost/Salesforce/MobileTutorial4/proxy.php?mode=native&_=1317748640885, which has a 500 response, and the the RequestHeaders are(OAuth removed and cookie truncated)

 

 

Hostlocalhost
User-AgentMozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20100101 Firefox/6.0
Acceptapplication/json, text/javascript, */*; q=0.01
Accept-Languageen-us,en;q=0.5
Accept-Encodinggzip, deflate
Accept-CharsetISO-8859-1,utf-8;q=0.7,*;q=0.7
Connectionkeep-alive
Content-Typeapplication/json
SalesforceProxy-Endpointhttps://na12.salesforce.com/services/data/v21.0/query?q=SELECT%20Id%2C%20Name%2C%20Price__c%20FROM%20Album__c%20ORDER%20BY%20Name%20LIMIT%2020
X-AuthorizationOAuth
X-User-Agentsalesforce-toolkit-rest-javascript/v21.0
X-Requested-WithXMLHttpRequest
Refererhttp://localhost/Salesforce/MobileTutorial4/
Cookieoracle.uix=0^^GMT-4:00; _neig



Oliver WoolgarOliver Woolgar

For Windows Environments (Tested using  WAMP Server, and possibly apache)...

 

One thing to check is if the php server or web server  has the php_curl extension enabled.

 

If this is causing your problem within your one of the webserver log files you might see a log entry like this:

 

"Call to undefined function curl_init() in x:\???\???\proxy.php" where the path is our web application path.

 

To solve this problem open up the php.ini file and find a line similar to this.

";extension=php_curl.dll"

 

If you find this line it may  be commented by using  preceeding ";".  This means php_curl is not enabled. (This is the default setting). If so uncomment save the php.ini file and then restart your web server. You may have solved your problem.

 

Hope this helps

gmanojkumargmanojkumar

The issue could be because of 2 things. 

 

1. Check if your wampserver (or other web server) install has php_curl enabled. To achieve this on wampserver left-click on the server's taskbar icon, choose PHP --> PHP Extensions - php_curl. This will enable the library for you

2. As we are accessing https from javascript curl will expect the security certificate authentication which is not present by default. Follow either of the fixes from the link here http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/ that would fix this. I followed the quick fix instructing curl not to do a ssl validation.

 

I hope this helps

SangitaSangita

I am facing the same issue. I have the HTML 5 app setup as described in the workbook. I followed the setps to uncomment php_curl and the SL certificate settings in the proxy.php. Still the App is unable to fetch any data. I see the sppininh wheel always.

Any help greatly appreciated.