×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    29

    Accessing GPS with WRT - Error: Security Access Check Failed

    I was following this tutorial found on the wiki to access my phone's GPS and I got a script alert for the error
    "Error: Security Access Check Failed".

    The tutorial was found from: http://wiki.forum.nokia.com/index.ph...ition_with_WRT

    The code I used was:
    Code:
    function alertMyLoc(){
        var myLoc = new GPSLocation ();
    
        var so;
    
        try {
            //Retrieves the Service object to the ILocation interface
            so = device.getServiceObject("Service.Location", "ILocation");
        } catch (e) {
            alert(' ' +e);
        }
    
        // This specifies update option used while retrieving location estimation. 
        var updateoptions = new Object();
        // Setting PartialUpdates to 'FALSE' ensures that user get atleast 
        // BasicLocationInformation (Longitude, Lattitude, and Altitude.) is the default when no LocationInformationClass criteria is given.
        updateoptions.PartialUpdates = false;
     
        var criteria = new Object();
     
        criteria.Updateoptions = updateoptions;
     
        try {
        //Executes the GetLocation method and sets the callbackLocation as the callback function to be called.
        so.ILocation.GetLocation(criteria,function(transId, eventCode, result) {
    		myLoc.lat = result.ReturnValue.Latitude;
    		myLoc.lng = result.ReturnValue.Longitude;
    		
    		alert("My Location: " + myLoc.lat + " & " + myLoc.lng);
    		
    	});
        } catch (e) {
            alert ("getLocationAsync: " + e);
        }
    
    }
    GPSLocation() is basically a simple object I created with 2 properties and some simple methods to store the longitude and latitude values.

    The error came from the first "try".

    Can someone advise what went wrong?

    Many thanks!
    Last edited by Aimevous; 2010-09-21 at 04:28.

  2. #2
    Registered User
    Join Date
    May 2010
    Posts
    29

    Re: Accessing GPS with WRT - Error: Security Access Check Failed

    I just installed the S60V5 emulator and the code worked but not on the actual device.

    I had made sure that the GPS had a lock on before running my app, can anyone help?

  3. #3
    Regular Contributor
    Join Date
    May 2009
    Location
    sydney
    Posts
    117

    Re: Accessing GPS with WRT - Error: Security Access Check Failed

    hi mate, put a real sim into yout phone and set it to online mode and then give a try. if it still not success you may need to perform a firmware update then give another try then.

  4. #4
    Registered User
    Join Date
    May 2010
    Posts
    29

    Re: Accessing GPS with WRT - Error: Security Access Check Failed

    Quote Originally Posted by wenz View Post
    hi mate, put a real sim into yout phone and set it to online mode and then give a try. if it still not success you may need to perform a firmware update then give another try then.
    Hi,

    I did that actually. 3G connection was on and I managed to get a lock via AGPS.

    I'm already using the latest firmware on my N97 mini. =/

  5. #5
    Registered User
    Join Date
    Sep 2010
    Posts
    13

    Re: Accessing GPS with WRT - Error: Security Access Check Failed

    One difference I notice between your code and the example is that yours obtains the service object inside your function and the example obtains it in global code (which will be run at the point of inclusion) and stores it in a global variable.

    You don't mention where your function is called from.

    Have you tried moving the service object access out to a global variable and then assigned it either globally (as per the example) or in a function called from the body onload event (this also works)?

    FWIW, I have had trouble obtaining the service object on my 5800 when not doing so right up front (in my case I was obtaining it when the user navigated to a second HTML page) and this also failed. I never figured out the reason and I can't recall whether it caused the same error, but it's something to bear in mind.

  6. #6
    Regular Contributor
    Join Date
    May 2009
    Location
    sydney
    Posts
    117

    Re: Accessing GPS with WRT - Error: Security Access Check Failed

    Quote Originally Posted by Aimevous View Post
    Hi,

    I did that actually. 3G connection was on and I managed to get a lock via AGPS.

    I'm already using the latest firmware on my N97 mini. =/
    hello mate,
    umm, try to remove the default ServicePlatform 1.0 remains in your handset, and reference the ServicePlatform 2.0 .js file in your project and give another go, and make sure all network settings are correct. it works for me last time.

  7. #7
    Registered User
    Join Date
    May 2010
    Posts
    29

    Re: Accessing GPS with WRT - Error: Security Access Check Failed

    Quote Originally Posted by wenz View Post
    hello mate,
    umm, try to remove the default ServicePlatform 1.0 remains in your handset, and reference the ServicePlatform 2.0 .js file in your project and give another go, and make sure all network settings are correct. it works for me last time.
    Hi, thanks for the advice and sorry for the long break before reply. I was figuring out solutions to some other major problems in my app.

    Anyway, I tried to download the PlatformServices 2.0 from Forum Nokia and I installed the demo GeoLocation app onto my N97 Mini with the latest firmware and the same error appeared.

    I have also tried to ensure that my phone already has a GPS fix before running the demo app and it still failed with the same error.
    I have also installed the platformservices.sis file that was included with the zip file of the platformservices download and tried the demo app again and it still failed with the same error.

    Can anyone provide me with a real working sample? a simple example that just alerts the latitude and longtitude?

    Many thanks

  8. #8
    Registered User
    Join Date
    May 2010
    Posts
    29

    Re: Accessing GPS with WRT - Error: Security Access Check Failed

    I just tried the PlatformServices 2.0 GeoLocation demo on a E72 and it works perfectly. Anyone knows why?

    I'm going crazy over this =/

  9. #9
    Nokia Developer Expert
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Accessing GPS with WRT - Error: Security Access Check Failed

    The issue you are facing sounds much like the on discussed on this thread. As Wenz said this is most likely because of some conflict between platform serivces 1.0 and 2.0 enablers. Please see if you have "Platfrom Services Extensions v1.00(0)" installed on your device and then try to remove it.

    -Ilkka

Similar Threads

  1. *PlatSec* ERROR - Capability check failed -
    By priykuma in forum [Archived] Flash Lite on Nokia Devices
    Replies: 5
    Last Post: 2010-05-14, 17:15
  2. Replies: 1
    Last Post: 2010-05-01, 12:48
  3. Access denied (-21) error, while accessing private directory
    By acl_symbian in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 6
    Last Post: 2009-09-07, 14:16

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×