Navigation refresh throws JsonReaderException
See original GitHub issue“Unexpected character encountered while parsing value: e. Path ‘’, line 0, position 0.”
I’m trying to refresh a view. Refreshing with no arguments gives me an empty view, but when passing the proper argument i get a JsonReaderException. The same object is fine when navigating to a new instance of the same view. The OnNavigatedToAsync is not reached before the exeption is thrown. Running on .net core version 5.2.2
var nav = WindowWrapper.Current().NavigationServices.FirstOrDefault();
//Throws exception
nav.Refresh(someObject);
//Works fine
nav.Navigate(typeof(Views.myView), someObject);
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
JsonReaderException during JSON deserialization #62427
Description From time to time, I'm encountering the following exception when deserialising on of our JSON files: `---- System.
Read more >Navigation in React Native doesn't work after page refresh
When I just start the app, I can navigate from one page to another without any problem. But when I refresh any page,...
Read more >PropertyList serialization error after upgrade to CMS 12
Hi. We have a bunch of propertylists in our project, all of which started throwing serialization errors post upgrade to CMS 12.
Read more >NavigationService.Refresh Method (System.Windows. ...
To force NavigationService to re-navigate to the content, call Refresh. ... by calling Navigate or Refresh, a new entry is not added to...
Read more >Bugs & Issues v4.3.X #1126 | Support Center | ABP Commercial
To update your version to v4.3.x for both ABP CLI and ABP Suite run the following ... ReThrowWithPath(ReadStack& state, JsonReaderException ex) at System....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The problem is that the
NavigationService.Refresh()
method doesn’t serialize the given parameter, but theNavigate()
does. https://github.com/Windows-XAML/Template10/blob/master/Template10 (Library)/Services/NavigationService/NavigationService.cs#L340 https://github.com/Windows-XAML/Template10/blob/master/Template10 (Library)/Services/NavigationService/NavigationService.cs#L211Currently you need to serialize the parameter by hand like this:
I think we need to add serialization into the
Refresh()
too.That being said, I think Refresh(param) is a mistake.