|
POST
|
Mike, I put the handler in place - required I upgrade the Runtime as it was not there in 100.6. The log includes a "OnHttpResponseEnd" line before any log entry from there to differentiate from other locations. I also log other pertinent aspects of the process. Primary aspects of the log that relate to the timing of the HttpResponse messages _log.Debug("STARTING SYNC");
var results = await job.GetResultAsync();
_log.Debug("SYNC COMPLETE"); I also log to show when the ChallengeHandler is requested public async Task<Credential> CreateCredentialAsync(CredentialRequestInfo info)
{
try
{
_log.Info($"CHALLENGE ********** : {info.ServiceUri} ***********");
if ( info.ServiceUri == null ) return null;
var credential = await AuthenticationManager.Current.GenerateCredentialAsync(info.ServiceUri, Settings.UserName, Settings.Password);
_log.Info($"RETURN credential *********: {info.ServiceUri} ********");
return credential;
}
catch (Exception e)
{
_log.Error(e, e.Message);
return null;
}
} It seems the call is made to GetResultAsync which then does not have any token, so it calls into the ChallngeHandler to get a token. What seems to be happening, though is the Sync request is still processing while the Challenge is also occurring. So, the sync is trying to process without actually waiting for the token to be returned. Then you get some bizarre returning of all the html copies of the sync request pages (which I assume is where our json errors come from). Then I go into a sync again and it all works, I assume because the previous request for a token is complete. I had previously tried some other things to using a ChallengeHandler which had similar results but I don't have logging for right now. Prior to making the sync call instead of using a ChallengeHandler I simply added the credential AuthenticationManager.Current.AddCredential(await _portalManager.Credential(true)); Also I had things setup that the user connects to AGOL when they first log into the application, this way I can test that the user entered credentials are valid when the user first opens the application instead of waiting until they are doing something requiring a connection (sync or downloading an offline map). If my assumption is correct how can I process the Credential requests and be sure they are 100% complete prior to attempting the sync? I will email you he log file because the new GeoNet does not seem to want to allow me to upload
... View more
11-30-2020
10:26 AM
|
0
|
0
|
4347
|
|
POST
|
Just need to keep checking in the ProgressChanged until it is populated. It depends on how long it takes for the server to generate the job and it has a JobId. Behind the scenes the API is just making a post call to the server and until the server gives a response with a jobId it is unknown
... View more
11-30-2020
09:55 AM
|
1
|
3
|
1941
|
|
POST
|
I received a notification via email about a new post (from someone at esri if that matters). https://community.esri.com/t5/arcgis-runtime-sdk-for-net/offline-map-sync-error-job-error-6004-quot-invalid-start-of-json/m-p/1004757#M9589 When I go to the link for the thread the comment in the email is not there. There are no additional comments. I even cleared my cache and do not see the comment Thanks -Joe
... View more
11-25-2020
03:19 PM
|
0
|
1
|
873
|
|
POST
|
Anything? This is to where it seems to happen the first time we sync the map no matter what @MichaelBranscomb @dotMorten_esri
... View more
11-25-2020
10:26 AM
|
0
|
4
|
4396
|
|
POST
|
I get this error on a regular basis when syncing an offline map. I have noticed it seems to occur when I sync soon after opening a map, and before I have loaded the map into a MapView. I do check to confirm the map and all layers have a LoadStatus = Loaded. {
"isServerMessage": false,
"message": "Layer result: Sync failed. Name: LayerName LayerID: 9 TableName: ... URL: https://services3.arcgis.com/..../arcgis/rest/services/..../FeatureServer/9 Job error 6004 \"invalid start of json - expecting { or [\". < : 0.",
"severity": "warning",
"timestamp": 1605810526949
} The was this post a couple years ago: https://community.esri.com/t5/arcgis-runtime-sdk-for-android/quot-invalid-start-of-json-expecting-or-quot-when-updating-100-1/td-p/690089 But no resolution ever presented
... View more
11-19-2020
11:02 AM
|
0
|
6
|
4501
|
|
POST
|
You would need to do in the Xaml for the view containing the MapView. This could be done a number of ways. My preferred method is to setup a Grid and put the MapView where I want it. But I believe just adding a Margin to the view would suffice. Grid: <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
...
Title="{Binding Title}">
<Grid WidthRequest="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- Could setup Rows to set away from top -->
<Grid x:Name="MainGrid" Grid.Column="1" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid>
<esri:MapView />
</Grid>
</Grid>
</Grid>
</ContentPage> Margin: <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
...
Title="{Binding Title}">
<-- Margin="Left, Top, Right, Bottom"
<esri:MapView Margin="20,20,0,0"/>
</ContentPage>
... View more
11-19-2020
09:52 AM
|
0
|
1
|
1958
|
|
POST
|
I logged out of all accounts and cleared cookies and as of now the behavior seems to have stopped
... View more
11-12-2020
12:28 PM
|
1
|
1
|
1366
|
|
POST
|
Hi, I am getting really weird issues with sign on with the new site. As I navigate around I continually have the site refreshing through the login. Sometimes it kicks me out (I have the Sign In button visible again), other times I stay logged in but it is incredibly bothersome. I have multiple esri logins (different agol sites, my main account, etc) I am not sure if it is associated to that Thanks -Joe
... View more
11-12-2020
09:40 AM
|
0
|
3
|
1389
|
|
POST
|
I use a different approach and is based on the idea that one may want to manage drawing in a view other than the main view. I believe the approach from @JenniferNery would only work in the view model tied to the view that contains MapView. There is also an assumption that a library which provides event aggregation is being used (e.g., MVVMLight although I use Prism). One might argue is more complex, but I believe it offers a way to provide a true MVVM solution in a complex application that can go beyond a single view. I have a custom MapView control, which has it's own ViewModel. My Xaml (with only the relevant pieces) looks like this <esri:MapView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:prism="http://prismlibrary.com"
xmlns:esri="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms"
xmlns:behaviors="clr-namespace:Mobile.AsBuilt.Framework.MapView.Behaviors;assembly=Mobile.AsBuilt.Framework"
prism:ViewModelLocator.AutowireViewModel="True"
x:Class="Mobile.AsBuilt.Framework.MapView.MapViewControl"
x:Name="mapView"
Map="{Binding Map}"
SketchEditor="{Binding SketchEditor}"
GraphicsOverlays="{Binding GraphicsOverlays}"
</esri:MapView> In the supporting ViewModel I inject the IEventAggregator, also one thing I found is that the bound SketchEditor needs to be initialized in the constructor . public MapViewControlViewModel(IEventAggregator eventAggregator, ...)
{
eventAggregator.GetEvent<MapLoadedEvent>().Subscribe(OnMapLoaded);
EventAggregator = eventAggregator;
SketchEditor = new SketchEditor();
} The idea now is that the SketchEditor will be sent out to the rest of the application by publishing an event. There is one other caveat, and that is we can not send off our SketchEditor until the map in initialized. So we need a couple events. One event that can be published to the application to indicate the Map is loaded (MapLoadedEvent), and another that can send the SketchEditor out (SketchEditorInitializedEvent). We put a handler for our MapLoaded event in the MapViewControlViewModel and then in our handler publish out the SketchEditorInitializedEvent private void OnMapLoaded(MapLoadedEventArgs obj)
{
try
{
Map = obj.Map;
EventAggregator.GetEvent<SketchEditorInitializedEvent>().Publish(SketchEditor);
}
catch (Exception e)
{
Log.Error(e, e.Message);
}
} Now anywhere I need the SketchEditor I can handle this event protected EditBaseViewModel(IEventAggregator eventAggregator...) : base(eventAggregator)
{
SubscriptionTokens.Add(EventAggregator.GetEvent<SketchEditorInitializedEvent>().Subscribe(se => SketchEditor = se));
} This will then support a modular application with the ability to draw from any ViewModel that provides this functionality
... View more
11-12-2020
09:26 AM
|
0
|
0
|
1971
|
|
POST
|
You don't mention what platform. But I believe that LayerLegend has a Bindable ItemsTemplate which could be used to change the text color. I do not know if this is available in Xamarin Forms, it is in WPF
... View more
11-09-2020
11:31 AM
|
0
|
0
|
1068
|
|
POST
|
Hi, I don't have a sample readily available. But I think the better approach in Runtime 100.9 would be to use a callout GeoView.ShowCalloutAt Method (MapPoint, CalloutDefinition). This will allow you to setup the callout and then place in a location based on mouse location.
... View more
10-19-2020
12:23 PM
|
0
|
0
|
1927
|
|
POST
|
Are you using in-house portal? If so check the ArcGIS Server log it may give some additional information
... View more
10-15-2020
08:25 AM
|
0
|
1
|
1867
|
|
POST
|
That sample is from the older Runtime API (version 10.x). This would be a link to the current API OfflineMapTask Class See ArcGIS Runtime SDK for .NET (latest) | ArcGIS for Developers for top level site
... View more
10-08-2020
10:45 AM
|
0
|
0
|
1294
|
|
POST
|
It's hard to say, without knowing what is causing it to return that message. There could be an issue on an individual layer if the service has multiple layers. I really suggest trying to log out the job if you see an issue. This gives the full communication between the server and client so you should be able to isolate where the problem occurs. In AGOL it's tough because you cannot look at server logs like you could with on-premise AGS
... View more
10-07-2020
09:26 AM
|
1
|
0
|
2998
|
|
POST
|
If the schema does not match the schema of the replica when generated it will fail to sync. So if you add fields this will likely cause failure. Definitely removing a field will cause it to fail. I am not clear from the initial post, but 100% for sure if you deleted a feature service after generating the offline data that replica will never sync. When you create an offline replica it creates a replica endpoint (https://...../featureservice/replicas to list them). If you delete a feature service those would be deleted, although I thought AGOL would not allow one to delete a service that has associated replicas. If the replica endpoint is not there, the offline data cannot sync. One thing you can do is after the sync fails, log out job.ToJson(), this will give you full details of the sync and may help debug the issue.
... View more
10-07-2020
08:58 AM
|
1
|
2
|
2998
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-11-2026 09:07 AM | |
| 1 | 10-23-2025 12:16 PM | |
| 1 | 10-19-2022 01:08 PM | |
| 1 | 09-03-2025 09:25 AM | |
| 1 | 04-16-2025 12:37 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|