WP Windows Phone Invalid XAML - xaml

I get exception
An exception of type 'Windows.UI.Xaml.Markup.XamlParseException'
occurred in WP.MyOffice.exe but was not handled in user code
WinRT information: Unable to resolve property '%1' while processing
properties for Uid '%0'. [Line: 79 Position: 27]
1 - line 79 position 27
2 - "Invalid XAML" in Error List window
In Resources.recw has Hub.Header and HubSection1.Header
How found what is wrong?

Check your resources.resw file, you probably have something like Hub.Text, while the "Hub" element doesn't support that attribute (text). Maybe you already used the key Hub for something else

Strategy to fix:
Remove the x:uid properties and worry about localization later, get the Hub working.
If it still doesn't work create a basic hub with no items. Once working add the hub items/sections back until the point of failure.
Once the failure is determined resolve.

Related

UWP Radial Gauge maximum property causing exception

I have an UWP application that recieves data over MQTT from my ESP32 and displays on the screen. I have one radial gauge that was working nicely but now it's throwing a weird exception about the "Maximum" property.
Windows.UI.Xaml.Markup.XamlParseException
HResult=0x802B000A
Message=The text associated with this error code could not be found.
Failed to assign to property 'Windows.UI.Xaml.Controls.Primitives.RangeBase.Value'. [Line: 66 Position: 98]
Source=Windows
StackTrace:
at Windows.UI.Xaml.Application.LoadComponent(Object component, Uri resourceLocator, ComponentResourceLocation componentResourceLocation)
at UWP.Dcem.InitializeComponent() in C:\Users\ale_5\source\repos\UWP\UWP\UWP\obj\x86\Debug\Dcem.g.i.cs:line 59
at UWP.Dcem..ctor() in C:\Users\ale_5\source\repos\UWP\UWP\UWP\Dcem.xaml.cs:line 33
Without setting that property the gauge appears and doesn't throw any exception, but it's useless as it starts from 0 and ends at 0.
This is the code I'm currently using to render the gauge
<controls:RadialGauge Margin="0 65 0 10" x:Name="RadialGaugeControl" Value="0" Minimum="0"
Maximum="3300" TickSpacing="330" ScaleWidth="20" Unit="mV" TickBrush="Gainsboro"
ScaleTickBrush="AliceBlue" TrailBrush="#4c79a1" NeedleWidth="5" TickLength="18" Width="300"/>
The exception is thrown even when using the Microsoft's example from here
<controls:RadialGauge x:Name="RadialGaugeControl" Column="1" Value="70" Minimum="0"
Maximum="180" TickSpacing="20" ScaleWidth="26" Unit="Units" TickBrush="Gainsboro"
ScaleTickBrush="{ThemeResource ApplicationPageBackgroundThemeBrush}"
NeedleWidth="5" TickLength="18">
</controls:RadialGauge>
Control reference
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
Version 6.0.0
Does anyone know whats causing this issue?
I tested your rendering code and it worked. And from the error message, it should be that you assigned the wrong value type to Value (for example, a non-double value such as a string is assigned to Value), independent of the Maximum proeprty.
There are some omissions in the official example, RadialGauge does not contain the Column property, please remove this property, or change to Grid.Column="1", it can run normally.
We will report the problem with this document to modify it as soon as possible to avoid misunderstanding.

How to Call package successfully

got error when calling package
error is
Error starting at line : 1 in command -
PKG_Generate_GRNo.GenerateGR(TO_NUMBER(:P164_APP_ID,
'9999999'),:APP_USER,:P164_FIRST_NAME,:P164_LAST_NAME,:P164_EMAIL,:P164_SKYPE_ID,:P164_COUNTRY,:P164_DATE_OF_BIRTH)
Error report - Unknown Command
PKG_Generate_GRNo.GenerateGR(TO_NUMBER(:P164_APP_ID,
'9999999'),:APP_USER,:P164_FIRST_NAME,:P164_LAST_NAME,:P164_EMAIL,
:P164_SKYPE_ID,:P164_COUNTRY,:P164_DATE_OF_BIRTH);
Session state protection violation is definitely an Apex error, relating to your page settings. It seems your package is trying to change the state of a read-only page. See this other question.
The item identifier in the error message P164_COURSECOUNT has the same prefix as the parameters you pass to the package (:P164_APP_ID) so presumably they relate to the same page. We know nothing about your application or its architecture, so it's hard to offer concrete advice. Maybe you need to change the page or item settings, maybe you need to change what the package does. Only you can tell the right course of action.
As you didn't post the whole command, a note: you have to enclose it into begin-end block, e.g.
BEGIN
PKG_Generate_GRNo.GenerateGR (TO_NUMBER ( :P164_APP_ID, '9999999'),
:APP_USER,
:P164_FIRST_NAME,
:P164_LAST_NAME,
:P164_EMAIL,
:P164_SKYPE_ID,
:P164_COUNTRY,
:P164_DATE_OF_BIRTH);
END;
/

Parse.com preventing whitespaces in custom tracking events?

2 months ago I added custom tracking events with whitespaces in my app, such as:
[PFAnalytics trackEvent:#"Share Button Click" dimensions:dimensions];
However, it seems like Parse is no longer allowing whitespaces, which in turn has caused my code to stop registering analytics. Does anyone know a fix around this?
Here's the error:
Error: invalid event name: cannot contain whitespace (Code: 160, Version: 1.4.2)
2014-11-01 runEventually command failed. Error:Error Domain=Parse Code=160 "The operation couldn’t be completed. (Parse error 160.)" {code=160, error=invalid event name: cannot contain whitespace}
I'm curious as to why Parse has done this change and if there's anything we can do so that I'm not forced to create a new event.

getting Developer Notifications about OGNL exceptions after upgrading to struts 2.3.14.2 from 2.3.1.2

I have my web application built using struts 2.3.1.2. I have following pages/actions where I don't get any OGNL exception as a warning/notification.
JSP page - containing 3 text fields name, address, phone
struts.xml file - devMode = true and corresponding action entry using default interceptor stack
action class where I have properties only for two request parameters i.e. for name and address
Above is running fine and I don't get any warning/notification exception.
Now, recently I have upgraded to struts 2.3.14.2 And I have started to get below warning/notification exception on log file:
Developer Notification (set struts.devMode to false to disable this message):
Unexpected Exception caught setting 'start' on 'class com.xyz.DetailsActionSupport:
Error setting expression 'start' with value ['0', ] - Error setting expression 'start' with value ['0', ] - [unknown location] at
com.opensymphony.xwork2.ognl.OgnlValueStack.handleRuntimeException(OgnlValueStack.java:201) at
com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:178) at
com.opensymphony.xwork2.ognl.OgnlValueStack.setParameter(OgnlValueStack.java:152) at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:329) at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:241) at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) and more ...
By google search, found two answers:
to add the exclude parameters in struts.xml for Param interceptor
disable the development mode defined in struts.xml
I can do that, but, don't understand what has changed in struts version so it has started to print the exceptions as notifications/warnings?
Below link will tells us how it shows warning exception:
http://struts.apache.org/release/2.3.x/docs/parameters-interceptor.html
Refer the section Warning on missing parameters from above link

Access is denied in BackgroundTaskBuilder.Register

var builder=new BackgroundTaskBuilder();
builder.Name=name;
builder.TaskEntryPoint=taskEntryPoint;
builder.SetTrigger(trigger);
if(condition!=null)
builder.AddCondition(condition);
builder.Register(); // in this step I get exception System.UnauthorizedAccessException. Additional information: Access is denied.
This exception is throwed in Windows 8 release preview.
In consumer preview I did not get this exception.
I use SystemTrigger (SystemtriggerType.UserPresent) and SystemCondition(SystemConditionType.InternetAvailable)
In Package.appxmanifest file I set System event checkbox to true and input Entry point value.
Also in Package.appxmanifest code I removed 'Executable' attribute.
Maybe someone know how I can fix it?
Thank you in advance!
Some SystemTriggers,however do need the app to be on the lock screen:
SessionConnected ,UserPresent,UserAway and ControlChannelReset If you use these triggers without beging on the lock screen ,the BackgroundTaskBuilder.Register() call will fail with "acess denied"