Geolocation not working on mobile browsers - google-maps

I have just finished my project that uses Google Maps API. when I tested on my mobile it failed. I started debugging and it seems to be having problems getting the current position
navigator.geolocation.getCurrentPosition(function(position){ ... }, function(error){ ... }):
This line fails on Chrome and default browser, the callback function is never called (and I don't know how to see what error is thrown).
So I started using the Chrome emulator ( Refer to this ) and no error is being triggered. Everything works well.
And I am passing a second function to handle errors to getCurrentPosition and nothing is displayed... what would be the problem?! Do you know what can I do to make it work on my mobile? Any other test I can do?
I tested on different computers and it works
The settings allow me to share my current position

Related

How to debug early hints loading in google chrome

https://chromium.googlesource.com/chromium/src/+/master/docs/early-hints.md suggest this is how one would debug if asset was loaded using early hints (103 HTTP status response) like so:
performance.getEntriesByName('https://a.test/style.css')[0].initiatorType
// => 'early-hints'
https://hg.mozilla.org/try/file/cc6f6c969877f92faf9ebda84653aff9fec62b0b/testing/web-platform/tests/loading/early-hints/resources/preload-initiator-type.html -> would confirm this is true.
Yet when I run this statement in chrome console, i'm getting:
performance.getEntriesByName('https://mywebsite.com/img.jpg')[0].initiatorType
'link'
Did early-hints was replaced with link?
Would assume so, but also am seeing no effect on the waterfall chart when early hints get enabled, so chances are chrome is really not respect 103 and does not preload asset. Any other ideas of how to debug early hints in chrome are more than welcome (Using Chrome 106 on OSX).

CORS not working with withCredentials=true sync ajax call on chrome

I am trying to make a cross domain ajax sync call with withCredentials=true, i am not getting any error, the browser just got stuck. My chrome version is 40.0.2214.115 m.
I also tried same with latest version (35.0) of firefox and facing same issue " Invalid access error a parameter or an operation is not supported by the underlying object".
What could be the possible reason, any input would be helpful.

Cordova geolocation fails when turned on after the app was started

i'm having this thing on a cordova app (on Android; on iOS works just fine) that implies some location issues. Let me explain:
Since the app requires a location check at start-up, I display a warning message with a retry button.
So i have this very simple scenario:
start the app with the location turned off. The warning is shown
Turn the location on, then retry to locate
the location is still not detected
I have this very simple testcase:
navigator.geolocation.getCurrentPosition(
function(e){ console.log(e) },
function(e){ console.log(e) },
{
enableHighAccuracy : true
}
);
Any idea of what's wrong here?
I have the same problem, and no idea why it happens, but I solved it this way:
use navigator.geolocation.watchPosition instead of navigator.geolocation.getCurrentPosition ;
be it on success or on error, call clearWatch.
A subsequent call to navigator.geolocation.watchPosition should be successful even if the GPS/location was not turned on at the first time.
This solution does however not work on iOS, so that you should insert a platform detection.
Does it make sense ?

IMobileServiceSyncTable PullAsync doesn't return

I currently use Azure Mobile Services with Offline Sync and I it has been working fine. However I now have come to a problem I can't seem to debug. On the PullAsync it never returns, never goes to the Web API, it never errors, it just seems to be stuck somewhere and I don't know where.
IMobileServiceSyncTable<ResponseType> responseTypeTable = MobileService.GetSyncTable<ResponseType>();
await responseTypeTable.PullAsync(responseTypeTable.Where(c => c.CompanyId == companyId));
I use identical code elsewhere with a different type and it works well.
The only thing that happens is the Windows Phone emulator UI locks up, I can press buttons on the keyboard but the input or buttons are all frozen.
I get this on the Debug Output
The thread 0xb80 has exited with code 259 (0x103).
After a 5 seconds and that's about it. Breakpoints everywhere, nothing happening.
The method was in a Command (I'm using MVVMLight). When I call the function on the class initialization and just hold the value it works fine. There is obviously some bug that occurs when calling PullAsync on an event, in an async RelayCommand but getting the call out of there solves the issue.
I'll leave it at that unless anyone comes back with why it is actually happening. This is just a workaround at the moment.

Map issues when testing in IOS 8

I have an application that uses MapBox's API to stylize the underlying map which uses Google Places. This all worked perfectly fine when running in IOS 7+, but when I try testing this in IOS 8, it immediately crashes with the following error message:
Terminating app due to uncaught exception NSInternalInconsistencyException, reason: 'The layout constraints still need update after sending -updateConstraints to MapView at {0,0}-{320x444}.
RMMapView or one of its superclasses may have overridden -updateConstraints without calling super. Or, something may have dirtied layout constraints in the middle of updating them. Both are programming errors.'
I have been looking around the Web and Stack for a while but have been unable to find anything helpful unfortunately. Any suggestions?
I deleted all Mapbox framework / headers / lib from my project and reinstalled the latest (1.4.1) mapbox static library (libMapbox.a) and the Headers, and everything was ok after that without changing a line of my code.